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

Buttonless Secure DFU with WDT needs DFU twice

I use nrf51822xxAC,SDK 12.2,Buttonless Secure DFU and WDT in application.

I added NRF_WDT->RR[0] = WDT_RR_RR_Reload; to the wait_for_event loop in the DFU to pet the dog.

But it needs to DFU twice to let the chip run into application.

The same question in this link.

Could anyone help me?

Parents
  • It's pretty clear that the WDT was not fed properly in the bootloader , causing a reset and it enter the DFU bootloader again, this time without WDT and it works. I don't know how would it enter DFU on the second reset instead of starting application. Should be pretty easy to figure out why, by debugging the bootloader.

    The NRF_DRV_WDT_DEAFULT_CONFIG will set the WDT timeout to 2 seconds which should be long enough. My suggestion for testing is to modify DFU mode , that instead of starting advertising, you can put an infinite loop there and do only one task of feeding the dog. Just to check if it can run normally or a reset would occurs.

Reply
  • It's pretty clear that the WDT was not fed properly in the bootloader , causing a reset and it enter the DFU bootloader again, this time without WDT and it works. I don't know how would it enter DFU on the second reset instead of starting application. Should be pretty easy to figure out why, by debugging the bootloader.

    The NRF_DRV_WDT_DEAFULT_CONFIG will set the WDT timeout to 2 seconds which should be long enough. My suggestion for testing is to modify DFU mode , that instead of starting advertising, you can put an infinite loop there and do only one task of feeding the dog. Just to check if it can run normally or a reset would occurs.

Children
No Data
Related