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
  • Thanks for your quick reply, Hung. 

    I've done the suggested test: DFU bootloader works well, i can update the blinky application. After that, I've modified the RAM parameters, added dfu .c files to project, added preprocessor definitions, added include directories and all the DFU buttonless support to the blinky application. Then, i've generated the BL settings with the following command: 

    nrfutil settings generate --family NRF52810 --application ble_app_blinky_pca10040e_s112.hex --application-version-string "2.0.0" --bootloader-version 2 --bl-settings-version 2 bl_setting.hex
    

    Then, i've written to flash SD + BL + APP + BL setting.

    Now, i can't see any device advertising. However, i've checked that the application is valid looking at app_is_valid(). I've noticed that the reason of my previous mistake (the program didn't jump to the application) was that I was using an incorrect bootloader settings file.

    Now, this is solved, but... why I can't see my application? Do you think it could be related to the memory limits of the chip?

    Marta

  • Hi Marta,

    Please don't skip the step, just test doing SD+BL+Blinky app + BL Setting. 

    We need to verify that the application can be updated and can run normally. 

    You can test first with the simple blinky that only does LED Blink, no BLE. After it 's verified, you can test with the BLE blinky. 


    I suspect that the app (that you added DFU Buttonless)  may crash for some reason. You can try debug it, if the bootloader works as it should you should be able to stop the PC at main() in the application when debugging. 

  • Hi Hung,

    I've written to flash SD+BL+Blinky BLE + BL Setting. As a result, the bootloader works well and the program enter to the Blinky app. I can see "Nordic_Blinky" device advertising.

    I able to debug from the Secure bootloader code, but when I try to do it from the Blinky application, it never jumps into the app. I'm working with SEGGER Embedded Studio 5.5.

    Regards,

    Marta

  • Hi Marta, 


    When you debug the blinky application, please make sure that you don't have the SES project of the bootloader also in debug mode. 
    You can try trigger a reset from the Debug menu in the blinky application. If it doesn't jump to the application, please pause and check where the PC is. 
    Note that you should have the exact same application that you DFU update via the bootloader. If you have any modification (for example switch from "release" to "debug" compiling mode or if you change anything) the CRC check will not match and the bootloader will not jump to the application.  

  • Hi Hung,

    Sorry for the delay in replying. 

    Finally, I solve the debug issue writting in flash the program after start debugging.

    Also, I did all the changes related to the DFU buttonless and adapted the blinky example to my application and it works. I don't know why it didn't worked with the UART example but it's not a problem now.

    Many thanks for your help!

    Marta

  • Hello, 

    I've got another issue related to this ticket. It's because i'm able to update the firmware by an nRF52 dev kit + PC (nRF Connect for Desktop), but when I try to do the same process with a mobile phone (app nRF Connect) I get an error.

    I'm doing the following steps:

    Connect to the board I want to update -> DFU -> Select file type: Distribution packet (ZIP) -> Drive ->  select zip file.

    It starts DFU but I get "Error  (0x8): GATT CONN TIMEOUT"

    Do you know why this is happening?

    Marta

Reply
  • Hello, 

    I've got another issue related to this ticket. It's because i'm able to update the firmware by an nRF52 dev kit + PC (nRF Connect for Desktop), but when I try to do the same process with a mobile phone (app nRF Connect) I get an error.

    I'm doing the following steps:

    Connect to the board I want to update -> DFU -> Select file type: Distribution packet (ZIP) -> Drive ->  select zip file.

    It starts DFU but I get "Error  (0x8): GATT CONN TIMEOUT"

    Do you know why this is happening?

    Marta

Children
Related