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

Jumping to bootloader without DFU

Hello! We have an app with bootloader on SDK 15.3.0. Is there a way to jump from application into bootloader without setting byte 0 of GPREGRET register? I.e. without this: 

sd_power_gpregret_set(0, BOOTLOADER_DFU_SKIP_CRC)

The reason is: app has several ways to go into firmware update.
One is the standard Nordic DFU way, which triggers GPREGRET before resetting the device. The other way is receiving the firmware in the application.

If the firmware was received in the app, it replaces the old firmware in the modified bootloader before nrf_bootloader_init. So the application is valid, and it's the new firmware.
However it still gets stuck in the BLE DFU because of this check in nrf_bootloader.c, function dfu_enter_check():

if (NRF_BL_DFU_ENTER_METHOD_GPREGRET &&
(nrf_power_gpregret_get() & BOOTLOADER_DFU_START))
{
NRF_LOG_DEBUG("DFU mode requested via GPREGRET.");
return true;
}

We just need to enter the bootloader without triggering DFU advertising here. Maybe there's a way to jump directly to a bootloader address or something different?

Related