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

An application with buttonless_dfu service and customize service could not working and cannot enter bootloader either.

As the subject description.

I have already test the official sample buttonless_dfu_app and the secure bootloader already. It could work for OTA fucntion.

And my application could run successfully before add DFU.

Thus, I would like to add the DFU service in my application in further. Somehow, I just encountered some difficulties while I simulate the setting and program with the sample.

IROM1 Size changed  0x17000 -> 0xF000

IRAM1 Start changed 0x20001A40 -> 0x20001A60 (There are 2 customize UUID service include the DFU service)

IRAM1 Size changed 0x45C0 -> 0x45A0

Add predefined:

BL_SETTINGS_ACCESS_ONLY

NRF_DFU_SVCI_ENABLED

NRF_DFU_TRANSPORT_BLE=1

After I change the setting as below, my program couldn't work anymore, but before I flash the APP with setting page the bootloader is worked. 

BLE_DFU_ENABLED 0 -> 1

NRF_SDH_BLE_VS_UUID_COUNT 1 -> 2

NRF_SDH_BLE_SERVICE_CHANGED 0 -> 1

I have already check the bootloader address is registered successfully.

Do you know whether there is any reason to make it failed?

Parents
  • Hi,

    IROM1 Size changed  0x17000 -> 0xF000

    This is SDK 16.0 with s112_nrf52_7.0.1_softdevice.hex ?

     For s112_nrf52_7.0.1_softdevice.hex, the correct IROM1 start value is 0x19000 , and IROM1 Size is 0xF000

  • Hi Sigurd,

    Yes, the SDK is 16.0 with the soft device s112_nrf52_7.0.1_softdevice.

    Actually, my setting is set like you mentioned.

    And I also took the below website as nRF52810 's reference Bootloader.

    Thus, I am still not sure whether I has missed anything.

    Moreover, if I block the following program by setting OTA_FUNCTION 0, my application could start advertising.

    static void standard_services_init(void)
    {
        ret_code_t         err_code;
    	nrf_ble_qwr_init_t qwr_init  = {0};
    		
    	// Initialize Queued Write Module.
        qwr_init.error_handler = nrf_qwr_error_handler;
    
        err_code = nrf_ble_qwr_init(&m_qwr, &qwr_init);
        APP_ERROR_CHECK(err_code);
    
    		
    	#if OTA_FUNCTION==1
    	ble_dfu_buttonless_init_t dfus_init={0};
    	dfus_init.evt_handler = ble_dfu_evt_handler;
    
        err_code = ble_dfu_buttonless_init(&dfus_init);
        APP_ERROR_CHECK(err_code);
    	#endif
    }
    		
    int main(void)
    {
        bool erase_bonds;
    		
    	//1120 add for DFU
    	#if OTA_FUNCTION==1
    	ret_code_t err_code;
    	err_code = ble_dfu_buttonless_async_svci_init();
        APP_ERROR_CHECK(err_code);
    	#endif
    	
        // Initialize.
        log_init();
        timers_init();
        buttons_leds_init(&erase_bonds);
    	leds_init();
    	
        power_management_init();
        ble_stack_init();
        gap_params_init();
        gatt_init();
    	advertising_init();
    	standard_services_init();
    
        conn_params_init();
        peer_manager_init();
    
    
        application_timers_start();
    
        advertising_start(erase_bonds);
    
        // Enter main loop.
        for (;;)
        {
            idle_state_handle();
        }
    }

    Thus, I am not sure what happened in the part of DUF.

     

    Thanks.

  • You can get that issue if the bootloader is not flashed to the chip. Make sure that the bootloader is flashed to the chip.

  • I did flash the boot loader, that is why I could show the Address in UICR. ( I have post it in the beginning)

Reply Children
Related