Is it possible to enter DFU / OTA from a DWT
i.e if the code crashes, and I can't trigger DFU mode by writing to a characteristic, can the WDT jump straight to the DFU / OTA ?
Is it possible to enter DFU / OTA from a DWT
i.e if the code crashes, and I can't trigger DFU mode by writing to a characteristic, can the WDT jump straight to the DFU / OTA ?
DFU always get executed at reset so technically yes. The thing is dfu will check for valid App and jump right to it immediately so you'll end up in a jumping loop. You can have the DFU stay in DFU mode by holding a button when DFU is booting. If you don't have a button then you need to modify the DFU code to stay in DFU for a certain amount of seconds before booting the App. That would give a chance to reflash.
Hi Roger,
You may need to write to flash before you let the WDT trigger a reset. The retained register GPREGRET is reset when WDT. If you have a look at the buttonless example in SDK v12, we write to flash before we trigger a reset, you can use that example and WDT to enter DFU bootloader. In SDK v13, we switch to GPREGRET instead.
Hi Roger,
You may need to write to flash before you let the WDT trigger a reset. The retained register GPREGRET is reset when WDT. If you have a look at the buttonless example in SDK v12, we write to flash before we trigger a reset, you can use that example and WDT to enter DFU bootloader. In SDK v13, we switch to GPREGRET instead.