Finding out the cause for hardware reset

キャンセル
次の結果を表示 
表示  限定  | 次の代わりに検索 
もしかして: 

Finding out the cause for hardware reset

865件の閲覧回数
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.

ラベル(1)
0 件の賞賛
5 返答(返信)

676件の閲覧回数
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 件の賞賛

676件の閲覧回数
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 件の賞賛

676件の閲覧回数
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 件の賞賛

676件の閲覧回数
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 件の賞賛

676件の閲覧回数
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 件の賞賛