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

UART based DFU works but then the application does not start

I can successfully download an image using nrfutil dfu serial when I use a test image (compiling the bootloader with the Nordic default public key) and the application starts.

I can do the same using nRF Connect Programmer.

I can successfully download an image using nrfutil dfu serial when I generate an image using a generated key, compiling the bootloader with the generated public key.

The download is successful, however the application will not start. The application is the example ble_app_uart_pca10040_s132.

I try to use the nRF Connect Programmer and after programming the application does not start either (SoftDevice (with MBR) and application hex files).

I then created a bootloader settings hex file, thinking this was the problem. But "nrfjprog --program settings.hex --sectorerease" did not help, the application still does not start after download.

I added the bootloader settings hex file while trying the nRF Connect Programmer and this did not help either. (SoftDevice (with MBR), bootloader settings and application hex files).The application still does not start after being programmed.

Ubuntu Linux 16.04.6 LTS

S132 SoftDevice v6.1.1

Nordic SDK v15.3.0

Application: ble_app_uart_pca10040_s132

Bootloader: secure_bootloader_uart_mbr_pca10040_debug

  • Hi KSV, 

    I think the reason why you don't see anything after the image is transferred successfully is that the softdevice was missing. 


    The bootloader was created to work with or without the softdevice. So it only requires you to flash the MBR, instead of the bootloader. Have you tried flashing the softdevice before testing ? 

    Without the softdevice, the ble_app_uart won't work. 

  • Hung,

       I am not sure what you mean. I did flash the softdevice, per my description above, when using the nRF Connect Programmer I add both the softdevice hex file and the application hex file, and it does not work (loads image successfully but then doesn't start the application).

    Doing the same with the test image (hrs_application_s132.hex) does work, using nrfutil or the nRF Connect Programmer.

    I can try doing the nrfutil dfu with the softdevice and the application, but it doesn't work using nRF Connect Programmer, but I will try it.

  • Hi KSV, 

    If you flash the bootloader, the softdevice and the application with the NRFConnect app, it will still not work. You need to have the bootloader setting flashed as well, if you want to do that. Please have a look at the appendix A here.

    Please try one of this: 

    1. Flash bootloader and softdevice with NRFConnect app. Then do DFU of ble_app_uart with nrfutil (please recompile the bootloader with your own public key and generate the ble_app_uart with your own private key)

    2. Flash bootloader with nRFConnect app. Then do DFu of a blinky example with nrfutil (blinky example doesn't require softdevice. But don't do ble_app_blinky that requries a softdevice)

  • I did #1 as you suggested and it worked only if I used the application .hex file generated from the command line make.

    If I used the application .hex file generated from the SES IDE, then the application would not start after DFU.

    What is the difference?

    Thanks.

    I spoke with the FAE and he pointed out I needed to generate a new bootloader settings file for the SES generated application versus the make generated application.

    Problem solved, all is good.

Related