AnsweredAssumed Answered

The easiest way to debug a lockup reset on RT1051

Question asked by Massimiliano Cialdi on Apr 1, 2019
Latest reply on Apr 2, 2019 by Jing Pan

In my RT1051 based project I am in a condition where often a reset takes place apparently for no reason.

in my code I have the enabling of faults and the code to analyze them, as explained here:


I have the fault enabled:

                    |  SCB_SHCSR_BUSFAULTENA_Msk
                    |  SCB_SHCSR_MEMFAULTENA_Msk; // enable Usage-, Bus-, and MMU Fault


I have no watchdog active, however the core is reset.
The SRC->SRSR register tells me that the reset was done by lockup (I'm pretty sure that a SYSRESETREQ is never triggered). It happens quite early, after the startup code has populated the .data section and reset .bss in RAM. Then it jumps to the main(), and the first function it calls (BOARD_InitPins(), to set pins and their multiplexing) does not exit. The things that are done within this function are mostly repetitive, and it fails about halfway. So I would like to understand what kind of event caused the lockup without (apparently) raising faults.


Is there a way to debug this?


best regards