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

App not starting after DFU

Hi,

I am working on programming a bootloader to have DFU capabilities. I have been using the secure_bootloader_uart example for SDK 15.3.0. I have modified the code to send the firmware image to the onboard external memory, and once validated, it would send the whole firmware from external memory to internal memory. It currently works when there is no valid app on the DK with the example blinky peripheral application also located in the SDK. However, when I try updating it with the example bsp project, after it performs a successful DFU, the application does not start. I have no idea why this is happening. I tried again with the blinky app and it still works fine, but the bsp example is still not starting after reset. I know that the DFU is successful since I am able to force it back into DFU mode by pressing Button 4 and reset at the same time. If anyone has any advice on how to go about this please let me know!

Parents
  • Hi Amarin, 

    Have you tried to run the IDE in debug mode and step into the code of the application (after you do DFU update)  ? 

    If the start address of the image you copy into the nRF5 chip is not 0x00000000 you need to configure the start address of the application to match the custom start address. 

    If you simply modify the code of the bsp example so that it blink an LED would it work ? 

    What else you can do is to read the flash content of your chip after you do DFU update with "nrfjprog --readcode " you then can compare the hex with the hex content when you simply write the bsp example into flash using a programmer. I usually use Notepad ++ to compare hex files. 

  • Hi Hung Bui,

    I just tried running the IDE in debug mode after I do a DFU update and found everything to be correct. The start address looks to be starting at the new custom address and the flash code is the same as the code copied into the external memory after using the code "nrfjprog --readcode".  

    To make sure that it is just my code, I ran the unmodified example/dfu/secure_bootloader_uart/ project and tried to do a dfu with the bsp_pca10056 packet and found that the same thing that happens with my code is happening to the unmodified code.

  • Hi again, 

    Could you let me know the custom address you used ? 

    You mentioned that when running in debug , everything was correct , does that mean you can debug the application and step into the code ? 

    You may want to check if the bootloader actually jump to the application after booting. Have you tried to just blink an LED inside your app ? 

Reply Children
Related