I am using the DFU example given in the SDK15.2.0 to try and update the application on my NRF52840. Currently, I have been able to update the application to run the blinky_mbr.hex file given in the secure_dfu_test_images. I works great. However, I wanted to see if I can update the application to run the sample ble_app_blinky example. I placed the corresponding hex file into a zip file and according to the terminal, I was able to download it onto the NRF52840, however, the application is not able to start. If I press Button 4, it goes back into DFU mode. If anyone has any advice on how to go about this, please let me know!
amarin said: I wanted to ask if this makes a difference in how I should be programming the dfu since originally I thought I was just updating the application without a softdevice?
From the figure,…
ble_app_blinky needs to run with softdevice. Do you flash the softdevice? You need to program the softdevice first or pack the softdevice and ble_app_blinky to upload.
It does have a softdevice programmed. It was programmed before uploading the new application zip file.
I do now notice that after I program the nrf52840, the leds all turn off for a brief moment before going into dfu mode again rather than waiting for me to press button 4 to return it to dfu mode.
As I was still trying to go about different ways as to how to fix this problem, I realized that the bootloader hex file is called secure_bootloader_uart_mbr_pca10056.hex and the application is called ble_app_blinky_pca10056_s140.hex . From this I noticed that the bootloader is functioning via MBR and the app is running on softdevice s140. I was wondering if this is could be the reason why the app is not loading? If it is, how should I go about fixing this?
Update: I downloaded nRF Programmer on my laptop and have reprogrammed the nrf52840 the same way I have been. I check on the nRF Programmer and it looks as if the application, softdevice and the bootloader were downloaded as seen in the picture below, but the nrf52840 is now no longer going back into dfu mode once the application is uploaded.
If you use s140_nrf52_6.1.0, you should use --sd-req 0xAE for s140_nrf52_6.1.0 for ble_app_blinky_pca10056_s140.
If a valid application is installed on the device, hold Button 4 during startup to prevent the bootloader from starting the application and force it to enter DFU mode instead.
I am using s140_nrf52_6.1.0 for the softdevice and programmed the nrf52840 using the following steps in the picture. The setbl.hex file is a merge file of my generated settings.hex and the secure_bootloader files.
However, I am still getting the same result that the application is still not running. All of the leds turn off and nothing happens. I tried running the blinky_mbr.hex application file given in your test images and it works, so maybe it has to do with the ble_app_blinky file?