MCU freezes when watchdog is triggered. (RT1061)

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

MCU freezes when watchdog is triggered. (RT1061)

ソリューションへジャンプ
1,179件の閲覧回数
bjorns
Contributor III

Hello,

MCU: RT1061
Flash: 25LPWP032D

I'm experienceing some issues with the watchdog, have tried both RTWDOG (WDOG3) and WDOG1 with the same result. Most of the time the watchdog is resetting the mcu correctly and the boot rom is able to boot the application again. Once in a while the watchdog is resetting the device but it leads to a complete freeze. The behavior is much more frequent if the watchdog trigger while we are doing a lot of flash accesses for example when updating firmware.

Found this thread regarding software resets. (https://community.nxp.com/t5/i-MX-RT/RT1062-software-reset/m-p/1261869) where it is suggested to do a "JEDEC reset" before resetting the mcu. If I do this in the watchdog interrupt (before the reset) I have not been able to reproduce the issue. However I do not feel comfortable with this solution. It is also mentioned that there is a fuse that will tell the bootrom to do a JEDEC reset on boot however I can't find this documented in the RT1061 reference manual. Where is this feature documented and why is it not enabled by default?

If this is indeed caused by flash synchronization I assume this will be an issue for all usecases of the RT106x. How should this be handled? or can you see another cause for this issue?

Thanks
/Björn

ラベル(1)
タグ(1)
0 件の賞賛
返信
1 解決策
866件の閲覧回数
bjorns
Contributor III

If anyone is experiencing similar issues here is the conclusion and workaround. To be honest most if not all applications based around this device should take this into consideration. It might only happen in rare conditions (e.g. firmware update) but when it does the device is not recovering by itself. (@NXP perhaps time to write an application note regarding this issue and how to prevent not being able to boot)

The reason for this issue is that if a reset is happening while a flash operation is ongoing it might not, at least in the case of a flash erase operation, have time to complete before the Boot ROM tries to access the flash. This causes the boot to fail and enter Serial Download Mode indefinitely.

There are a few things that can be done to prevent this from happening. We opted to implement all of these precautions even though some of them might be redundant.

1. Enable the fuse WDOG_ENABLE which will enable the watch dog in serial download mode triggering a new reset which will allow the system to boot again.

2. Configure the WDOG interrupt, this introduces a delay before the reset where no new flash operations can start. This allows the ongoing operations to finish before the reset.

3. You could probably also disable the Serial Download Mode (fuse SDP_DISABLE) but this has to be tested, I'm not sure what the boot rom does in case of a failed boot if the Serial Download Mode is not available.

Best Regards
Björn

元の投稿で解決策を見る

0 件の賞賛
返信
3 返答(返信)
867件の閲覧回数
bjorns
Contributor III

If anyone is experiencing similar issues here is the conclusion and workaround. To be honest most if not all applications based around this device should take this into consideration. It might only happen in rare conditions (e.g. firmware update) but when it does the device is not recovering by itself. (@NXP perhaps time to write an application note regarding this issue and how to prevent not being able to boot)

The reason for this issue is that if a reset is happening while a flash operation is ongoing it might not, at least in the case of a flash erase operation, have time to complete before the Boot ROM tries to access the flash. This causes the boot to fail and enter Serial Download Mode indefinitely.

There are a few things that can be done to prevent this from happening. We opted to implement all of these precautions even though some of them might be redundant.

1. Enable the fuse WDOG_ENABLE which will enable the watch dog in serial download mode triggering a new reset which will allow the system to boot again.

2. Configure the WDOG interrupt, this introduces a delay before the reset where no new flash operations can start. This allows the ongoing operations to finish before the reset.

3. You could probably also disable the Serial Download Mode (fuse SDP_DISABLE) but this has to be tested, I'm not sure what the boot rom does in case of a failed boot if the Serial Download Mode is not available.

Best Regards
Björn

0 件の賞賛
返信
1,170件の閲覧回数
jay_heng
NXP Employee
NXP Employee

It depends on the Flash working mode you configured in application, if Flash has been switched to Continuous mode or QPI mode or lower-power mode, then it should be reset to normal mode before next time ROM boot.

You can refer to below blog for reset enablement in BootROM (it is in chinese)

了解i.MXRT1060系列ROM中串行NOR Flash启动初始化流程优化点

1,147件の閲覧回数
bjorns
Contributor III

Hello,

Thanks for the response.

My Chinese is unfortunately non existent and I'm not that keen on burning fuses without a good understanding.

NXP must certainly have this documented somewhere in a reference manual, application note or something?!

Thanks
/Björn

0 件の賞賛
返信