This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Can I enter DFU from WDT ?

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 ?

Parents
  • 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.

Reply
  • 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.

Children
Related