I figured there must be some hardware register where the reason for the chip restarting itself is encoded. Where can I find it? I'm trying to debug an intermittent problem where the chip unexpectedly resets itself.
Some of the i.MXs have bits that indicate the reset cause after the processor has been reset, unfortunately, I can't find an equivalent in the MX28.
- Do you have the WDOG enabled? If so, are you feeding it?
- Are you using the CHIP or DIG bits at any time?
- Is there any specific time when your application is resetting? What happens right before the processor resets?
Hi again, Fredrik,
Found one bit that may be useful, it's EXTERNAL_RESET in Persistent State Register 0. It only indicates if the reset was external or not, it doesn't cover all resets but it may help you:
This bit is set by the analog hardware. On powerup, it indicate to software that that the chip had previously
been powered down due to a reset event on the reset pin by an external source. This bit must be cleared
by software. Note this bit is only valid when 32K XTAL is selected as the clock source of RTC, otherwise
the external reset event might not be correctly captured when the reset happens.
Hi Jorge, and thanks a lot for you help!
- WDOG is not enabled.
- CHIP and DIG bits are not used.
- I didn't notice if the resets occured at any specific time. I was testing USB OTG functionality before the resets (connecting to PC host, disconnecting, connecting USB stick, disconnecting, and so on).
Thanks for the tip about the EXTERNAL_RESET bit! Unfortuately, my imx28evk card does not seem to have the required 32K XTAL clock source, so I guess it's not an option for me.
The bit field PWRUP_SOURCE in the HW_POWER_STS register might be useful:
These read-only bits determine which source was active when the dcdc converter powerup sequence wascomplete. This can be used to determine what event caused the device to powerup.
Retrieving data ...