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
解決済! 解決策の投稿を見る。
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
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
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)
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