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.
OK.
I have a button, but I was hoping to have some sort of buttonless method, as it may not be easy to get to the device to press the button.
I'll need to read the buttonless source code and see how it manages.
(On other processors I use, they have some internal registers that survive a reset, which can be used to lock the code into upload mode, but I don't know if the nRF52 does it that way, or some other way)
OK.
I have a button, but I was hoping to have some sort of buttonless method, as it may not be easy to get to the device to press the button.
I'll need to read the buttonless source code and see how it manages.
(On other processors I use, they have some internal registers that survive a reset, which can be used to lock the code into upload mode, but I don't know if the nRF52 does it that way, or some other way)