How to LBIST
In this topic:
This topic describes how to execute LBIST via boot rom (SSW) through user code with code examples. Logical Built-In Self Test (LBIST) is a form of built-in self-test in which the logic inside a chip can be tested on-chip itself.
Prepare LBIST Execution. |
LBIST can be executed by the application. Below is a simple, working code sample using TASKING Compiler:
SCU_LBISTCTRL0.B.LBISTRES = 1; //Reset LBIST controller |
Run the application |
When LBIST is finished, the debugger detects an internal AURIX Reset. This special reset is not visible on the debug port. Therefore, the debugger recognizes the lost connection when it periodically (every 500 ms) checks the SoC status. Normally, this check is not performed as often for performance reasons (e.g., Real-Time watches). After losing connection, the debugger needs to re-establish the Debug session, breakpoints, and other settings.
Debug status in winIDEA will be SoC ATTACHING .
Breakpoints are re-established once the Debug connection is valid again. This process takes a significant amount of time while the SoC runs code uncontrolled after the LBIST reset.
(optional) Investigate the gap period. |
Instrument your code using the example provided below.
If the measured gap is too large, use the Hardware | CPU Options | SoC | Quick LBIST detection option. Be aware that having this option enabled will reduce some other metrics of debug performance.
Control the Code Execution. |
•Use the debug() instruction to stop code execution. This instruction behaves as a nop if the debug system is disabled.
•Exit the _debug() loop using the Goto option in the Context menu of the Editor pane.
Instrument code. |
Software instrumentation allows you to stop your application at a certain point in code after LBIST execution and continue with debugging and tracing from there. The _debug() instruction is a universal approach to stop within code.
volatile unsigned int iCounter, iLBISTExecuted; |
If the chip’ debug peripherals are password-protected, enable Detect application LBIST execution option in Hardware | CPU Options | SoC Advanced.
Because the debug password can only be applied for a short period after the LBIST reset, this option aids winIDEA in detecting the LBIST execution on time. When using this option, one hardware breakpoint will be used to detect application LBIST execution.
•SoC
•Knowledge Base - Troubleshooting tips