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".

Parents
  • 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

  • No, only single device is connected.

    I tried "gpiote" example and it ran successfully even in debug mode but "ble_app_uart" and "ble_app_beacon" didn't work.

  • I have tested both "ble_app_uart" amd "ble_app_beacon" on the nrf52840dk v2.0.1 and both work for me. 

    So I will list the steps I do:

    Connect DK to pc with USB.

    Open SES (I am using SES Nordic edition V4.52)

    Click the Open Existing button on the dashboard.

    Select either ble_app_uart or ble_app_beacon emProject file. ( I tested SDK16 and SDK17, \examples\ble_peripheral\ble_app_uart\pca10056\s140\ses)

    Click on the Target and select Connect J-link.

    Click on Target once more and select Erase All.

    Click on Build and select Build(F7).

    Click on Target and select Download.

    Open a Serial terminal like Putty and connect to the port.
    Press the reset device to se if the correct output is printed in the terminal.

    For ble_app_beacon this is printed in the terminal:
    <info> app_timer: RTC: initialized.
    <info> app: Beacon example started.

    For ble_app_uart this is printet:
    UART started.

    Here is a link to the SDK XX:https://developer.nordicsemi.com/nRF5_SDK/

    If you still experience the same problem then maybe try SES Nordic Edition, but don't think that is the problem.

    Regards,
    Jonathan

Reply
  • I have tested both "ble_app_uart" amd "ble_app_beacon" on the nrf52840dk v2.0.1 and both work for me. 

    So I will list the steps I do:

    Connect DK to pc with USB.

    Open SES (I am using SES Nordic edition V4.52)

    Click the Open Existing button on the dashboard.

    Select either ble_app_uart or ble_app_beacon emProject file. ( I tested SDK16 and SDK17, \examples\ble_peripheral\ble_app_uart\pca10056\s140\ses)

    Click on the Target and select Connect J-link.

    Click on Target once more and select Erase All.

    Click on Build and select Build(F7).

    Click on Target and select Download.

    Open a Serial terminal like Putty and connect to the port.
    Press the reset device to se if the correct output is printed in the terminal.

    For ble_app_beacon this is printed in the terminal:
    <info> app_timer: RTC: initialized.
    <info> app: Beacon example started.

    For ble_app_uart this is printet:
    UART started.

    Here is a link to the SDK XX:https://developer.nordicsemi.com/nRF5_SDK/

    If you still experience the same problem then maybe try SES Nordic Edition, but don't think that is the problem.

    Regards,
    Jonathan

Children
No Data
Related