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

jump to bootloader from app iuuse

The chip runs in the app stage and calls a function to make the chip jump to the bootloader stage (DFU mode).

The SDK we use is nrf5_ SDK_ 15.3.0_ 59ac345,

We made the following attempts

method 1:

NRF_POWER->GPREGRET = 0xB1;

NVIC_SystemReset();

it occur error INVALID MEMORY ACCESS

method 2:

use the API : ble_dfu_buttonless_bootloader_start_finalize()

But it didn't work

  • Hi,

    NRF_POWER->GPREGRET = 0xB1;

    NVIC_SystemReset();

    it occur error INVALID MEMORY ACCESS

    That is expected when the SoftDevice is enabled. You need to use sd_power_gpregret_set() to write to GPREGRET in that case. This approach should work well.

    method 2:

    use the API : ble_dfu_buttonless_bootloader_start_finalize()

    In what way does this fail? It is essentially the same approach as your method 1, but it correctly use the SoftDevice API. Also it uses the power management library, but that might just add complexity if not needed. So your method 1, with the suggested fix is probably the best approach.

Related