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

How to use the watchdog when DFU

Hi

I opened the Watchdog in the user application,and do nothing in the bootloader.Then when I use DFU,the CPU reset appears.How can I to deal with it?

And when I upgrade willful termination APP(nRF Toolbox),the CPU(nRF52832)is down,and can't work.Do you have any suggestions on how to solve this fault tolerance?

Thank you!

Parents
  • You'll have to "feed" the watchdog in the bootloader, i.e. call

    NRF_WDT->RR[0] = 0x6E524635UL;
    

    in order to prevent the watchdog timer from timing out and resetting the chip.

    -Bjørn

  • The legacy bootloader from SDK 8 does not perform a reset when jumping from the application to the bootloader. Thus, if the WDT has been started in the application, then its not possible to stop or configure the WDT as the watchdog’s configuration registers, which comprises registers CRV, RREN, and CONFIG, will be blocked until the device has reset. It is possible to check whether the WDT is running or not by reading the RUNSTATUS register, but as I stated previously, you're not able to pause it if the application started it before branching to the bootloader. You could just feed the WDT regardless of the WDT state(i.e. running or not running). If its not running then you will just write to the WDS reload register which will have no effect.

Reply
  • The legacy bootloader from SDK 8 does not perform a reset when jumping from the application to the bootloader. Thus, if the WDT has been started in the application, then its not possible to stop or configure the WDT as the watchdog’s configuration registers, which comprises registers CRV, RREN, and CONFIG, will be blocked until the device has reset. It is possible to check whether the WDT is running or not by reading the RUNSTATUS register, but as I stated previously, you're not able to pause it if the application started it before branching to the bootloader. You could just feed the WDT regardless of the WDT state(i.e. running or not running). If its not running then you will just write to the WDS reload register which will have no effect.

Children
No Data
Related