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

nRF52810 buttonless DFU not working

Hello all:

I've developed an nRF52810 application based on the UART example, but when I include buttonless DFU support to my application, it doesn't work. I'm using SDK 17.0.2, SD 112 7.2.0

The instructions followed are shown here. In summary:

- Generated private/public key pair,

- replaced dfu_public_key.c for the example secure bootloader project at: <nRF5 SDK Folder>/examples/dfu/,

- built application <nRF5 SDK Folder>/examples/dfu/secure_bootloader/pca10040e_ble/ses/secure_bootloader_ble_s112_pca10040e.emProject,

- updated my app according to Nordic instructions (RAM parameters modified, added dfu .c files to project, added preprocessor definitions, added include directories, made changes to sdk_config.h, added includes and source additions to main.c),

- built my application

- generated the bootloader settings file using nrfutil for the hex file of my application,

- using mergehex, merged the bootloader settings, bootloader, softdevice and my application together

- used nrfjprog to erase and program chip

Using nRF Connect for Desktop for discover the device, the name of the device advertising is DfuTarg. It belongs to the bootloader instead of my application. However, using the Programmer option of the application, I can see all the hex files in the device.

Doing the same method with a nRF2832, it works properly. So, as one difference with the nRF2832 chip is the memory capacity, maybe the problem is related to the memory limitation of the nRF2810. In fact, I'm not sure about the correct values of RAM_SIZE and RAM_START in the linker options of the application.

All help is welcome

Thanks in advance,

Marta

Parents
  • Hi Marta, 


    To narrow down the issue, I would suggest to do the following test: 

    1. Please test doing DFU update with the bootloader. This is to verify that your bootloader is working well. I have made a blog that you can follow here. You can just update a simple application for example blinky application. 

    2. Try generating the bootloader setting for the blinky application. Then write to flash the SD + BL + APP + BL setting. Please don't use mergehex at this point. 

    If it doesn't work please show the script you used to generate the BL setting. 
    You can think of building the bootloader in debug setting so that you can step into the code and check why it doesn't jump to the application. The function that check if the bootloader should enter the application is in app_is_valid() in nrf_bootloader.c 

    You may also want to check if the NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN is always 0 or not. If it's 0, then the DFU bootloader will enter DFU mode anyway (check dfu_enter_check() )

Reply
  • Hi Marta, 


    To narrow down the issue, I would suggest to do the following test: 

    1. Please test doing DFU update with the bootloader. This is to verify that your bootloader is working well. I have made a blog that you can follow here. You can just update a simple application for example blinky application. 

    2. Try generating the bootloader setting for the blinky application. Then write to flash the SD + BL + APP + BL setting. Please don't use mergehex at this point. 

    If it doesn't work please show the script you used to generate the BL setting. 
    You can think of building the bootloader in debug setting so that you can step into the code and check why it doesn't jump to the application. The function that check if the bootloader should enter the application is in app_is_valid() in nrf_bootloader.c 

    You may also want to check if the NRF_BL_DFU_ENTER_METHOD_BUTTON_PIN is always 0 or not. If it's 0, then the DFU bootloader will enter DFU mode anyway (check dfu_enter_check() )

Children
No Data
Related