nrf beacon can not enter bootloader from application

Hi support team,

I have a nrf 51822 beacon black version and developing with nRF5SDK1230. i'm learning about update firmware for it over BLE. i try to run example dfu/bootloader_sercure and create zip file by using nrfutil command. First i erase flash by jlink tool, program s130_nrf51_2.0.1_softdevice and bootloader_sercure example. then i use nrf connect app with usb dongle for updating firmware. the process is good, i can enter to my app. But then, in my application, i try to jump to bootloader by command NRF_POWER->GPREGRET = 0xB1; and call reset function, but it can not enter bootloader. i don't know why so i need your help. 

Here is my config

  • Thanks Thorsrud, I was deep checking nrf libraries. For everyone, you guy can use as easiest sample to enter bootloader from app using sdk12.3

    #include "nrf_dfu_settings.h"
    #include "crc32.h"
    #include "nrf_nvmc.h"
    
    uint8_t  m_dfu_settings_buffer[CODE_PAGE_SIZE] __attribute__((at(BOOTLOADER_SETTINGS_ADDRESS)))
                                                   __attribute__((used));
    nrf_dfu_settings_t s_dfu_settings;
    
    //boot function
    static uint32_t nrf_dfu_settings_calculate_crc(void)
    {
        // the crc is calculated from the s_dfu_settings struct, except the crc itself and the init command
        return crc32_compute((uint8_t*)&s_dfu_settings + 4, sizeof(nrf_dfu_settings_t) - 4 - sizeof(s_dfu_settings.init_command), NULL);
    }
    
    void enter_boot(void) {
    	s_dfu_settings.enter_buttonless_dfu = true;
    	s_dfu_settings.crc = nrf_dfu_settings_calculate_crc();
    	
    	nrf_nvmc_page_erase(BOOTLOADER_SETTINGS_ADDRESS);
    	nrf_nvmc_write_bytes(BOOTLOADER_SETTINGS_ADDRESS, (void*)&s_dfu_settings, sizeof(nrf_dfu_settings_t));
    }
    


Related