Finding out the cause for hardware reset

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Finding out the cause for hardware reset

976 Views
FredrikMoller
Contributor III

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.

Labels (1)
0 Kudos
5 Replies

787 Views
FredrikMoller
Contributor III

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 was
complete. This can be used to determine what event caused the device to powerup.

0 Kudos

787 Views
FredrikMoller
Contributor III

Jorge,

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.

 

Best regards,

Fredrik

 

0 Kudos

787 Views
FredrikMoller
Contributor III

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).

0 Kudos

787 Views
JorgeRama_rezRi
NXP Employee
NXP Employee

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.

 

Best regards.

Jorge.

0 Kudos

787 Views
JorgeRama_rezRi
NXP Employee
NXP Employee

Hi Fredrik,

 

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?

 

Best regards.

Jorge.

0 Kudos