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

Unable to flash another BLE code after flashing a secure BLE bootloader

I Flashed the DK using segger embedded studio with example "pca10056_s140_ble_debug" After that I am unable to flash "ble_app_uart" example.

I tried another example like "gpiote", it worked but unable to flash "pca10056_s140_ble_debug" as well as "ble_app_beacon".

  • Hi Venus,

    What version of SES(SEGGER Embedded Studio) are you using?  and what version of the nrf52840dk do you have?

    I was not able to reproduce the problem that you describe whit SES v4.52.

    Regards,
    Jonathan

  • I am using "SEGGER Embedded Studio for ARM 5.10a" and  nrf52840dk Rev. 2.0.1.

    Initially I flashed and debug multiple examples for peripherals like gpio, spi, uart, timer, ble_app_uart etc and all of them were working fine. After that I wanted to test the DFU functionality of the controller with the android application "nRF connect". Therefore I flashed the example code "pca10056_s140_ble_debug"  and it also worked fine but I was unsuccessful in DFU because I didn't have an "init"( .dat ) file. After this unsuccessful attempt I tried to run the example "ble_app_uart"  again in debug mode and it entered into debug mode but the debugger didn't stop initially at main.c and nor did it stopped at any of the breakpoint. And I noticed that the firmware which was running in the controller was still  the "pca10056_s140_ble_debug" not the  "ble_app_uart". Then I tried "gpiote" example and it ran successfully even in debug mode. then again I tried "ble_app_uart" and same as in the last time it entered into debug mode but the code which was running is "pca10056_s140_ble_debug". same for "ble_app_beacon". 

    I think in the case of "ble_app_uart" and "ble_app_beacon"  boot loader isn't jumping to application firmware but in the case of "gpiote" it jumps successfully. 

    can you help me in solving this problem? I need to run the "ble_app_beacon" example code.

  • Hi,

    Try to erase the device befor programming, two ways to do this

    1. nRF Desktop Programmer app. Connect the dk and select erase.

    2. nrf Command line tools. run the comand: nrfjprog --recover to erase the device, then reprogram whit ble_app_beacon

    Regards,
    Jonathan

  • Thanks for your reply. I will try the solution.

    what do you think about this problem? why this is happening?

    one more, can I erase the device with SES? is there any functionality available in SES, like after setting that SES automatically erase the device every time before programing the device.

  • In SES go to >Target and click on connect J-Link, then you can press Erase All or use hot keys Ctrl+T,K.

    Do you have more than one device connected? maybe the application does not get flashed to the chip properly. You can check what is on the bard by using the programmer app and clicking the Read button. Then you can see if it is the same before and after you flash the board.

    Regards,
    Jonathan

Related