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

Device stuck after NVIC_SystemReset() or sd_nvic__SystemReset()

Hello,

I'm using a nRF51422 uController (Custom board) with the Softdevice s130 withe SDK 11. I want to go back into the bootloader from my application after I told the application that a new update is avalible. I set NRF_POWER->GPREGRET to 0xB1 so it would start the DFU and used NVIC_SystemReset() afterwards to reset the device. I already tired to use sd_nvic_SystemReset() aswell but the same error happens. I set a LED to light up when the device goes into bootloader mode but it's just black.

Why am I stuck? How can I reset my device as wanted?

Parents
  • UPDATE:

    The problem was that I used NRF_POWER->GPREGRET in the application but I needed to use sd_power_gpregret_set(0, 0xB1) to set the Bits. Now the bootloader is started (I can tell because of the LED) but it exist the bootloader direktly. I don't understand why it wouldn't wait for the DFU as usual.

    What is the problem?

  • The application has limited access to the POWER peripheral when the softdevice is enabled. I.e., can only be accessed through SD API. So your program probably didn't reach sd_nvic_SystemReset().

    Try to comment out the init_softdevice check in ble_stack_init in the bootloader. Softdevice needs to be invoked again if you do a system reset from the application. The Buttonless DFU example does not do full system reset to "jump" to the bootloader, but branches to its reset handler instead.   

Reply
  • The application has limited access to the POWER peripheral when the softdevice is enabled. I.e., can only be accessed through SD API. So your program probably didn't reach sd_nvic_SystemReset().

    Try to comment out the init_softdevice check in ble_stack_init in the bootloader. Softdevice needs to be invoked again if you do a system reset from the application. The Buttonless DFU example does not do full system reset to "jump" to the bootloader, but branches to its reset handler instead.   

Children
No Data
Related