Infineon AURIX: LBIST handling in winIDEA
In this topic:
•Invoking LBIST via boot rom (SSW) via setup a certain bit within UCB BMHD0
This topic describes how to execute LBIST via boot rom (SSW), either by setting a certain bit within UCB BMHD0 or via user code.
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 without any expensive Automatic Test Equipment. For AURIX TC3xx memory parts (MBIST) are not included.
There are two possibilities to execute LBIST, each with different impacts for debugging and tracing:
•Invoking LBIST via boot rom (SSW) via setup a certain bit within UCB BMHD0
•Invoking LBIST via user code with code examples
•winIDEA IDE
•BlueBox iC5000, iC5700
If a bit is set, SSW executes LBIST automatically on power-on only. LBIST is not executed on all other kinds of RESET (e.g. warm PORST, system\application reset).
Ensure that Vref is enabled via Hardware / CPU Options / Hardware. |
Run the application. |
Debug status should be RUNNING .
Power-cycle the target. |
Due to VCC loss, winIDEA will quickly reconnect.
winIDEA Debug status will change from SoC RESET to RUNNING . If you already have a breakpoint set, it will stop the execution when hit.
Stop the execution. |
Debug status will be STOP .
Verify whether LBIST was successfully executed via the SFR bit LBISTDONE using the SFR Window. |
LBIST executed
LBIST not executed
The bit that was set will be erased if a reset occurs! |
Because of the Vref loss, the debugger can react very quickly compared to checking MCU state via status read (every 500 ms by default) as in the second example (below), because the debugger doesn't get notification about LBIST as it does via Vref or the normal RESET line. |
If LBIST is not successfully executed or other reasons are preventing using the Boot-Rom/BMHD related LBIST execution, user code could invoke it independently. Below is a simple, working example using TASKING Compiler:
SCU_LBISTCTRL0.B.LBISTRES = 1; |
When LBIST is finished, the debugger gets hit by an internal AURIX System Reset. This special reset is not visible at MCU Reset, meaning there is no signaling via the Reset line. Therefore, the debugger recognizes the lost connection when it periodically (every 500 ms) checks the MCU 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 MCU runs code uncontrolled after the LBIST reset.
The timeline shows what happens when LBIST is started from the user code.
If you need investigate the gap period when MCU runs uncontrolled, you can:
•Check Quick LBIST detection option via Hardware / CPU Options / SoC in winIDEA which yields status check more often (but reduces debug performance) OR
•Instrument your code using the example provided
Code execution stops after debug connection is restored.
The debug() command becomes active, if/after debug connection is established. If you try without the while() loop, it will get ignored. |
In the example the iCounter value was between 2.3 and 9.6 million with Quick LBIST detection and between 12 and 14 million without this feature after several measurements. These values are expected to be very different because it is not known on a timeline when the status request failed and winIDEA started re-connection to MCU. Note that you have to get out of this _debug() loop via winIDEA Goto option.
The software instrumentation is a solution to stop your application on a certain point in code after LBIST execution was invoked by code and continue with debugging and tracing from there. The_debug() instruction is a universal approach to stop within code.
volatile unsigned int iCounter, dummy1; |