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

Flashing nRF52DK pass but not running , J-Link and segger embedded studio

Hi,

I am using nRF52Dk dev kit with nRF_SDK_15. I did some using segger embedded studio with J-Link for debugging. I am way past the blinky stuff. I am able to flash and run on the PCA_10040 kit. I belive all my flashing and compiling environment are set. 

I was trying to use inbuilt ble_uart_app example. I am able to compile it, when I try to flash it, I could see the J-Link pop up erasing and flashing, but my example wouldnot run. I tried erasing the and re-flashing, it still would not run. I also checked whether I am flashing the soft_devices.hex its getting flashed. I tried with nfjprog, still the same. But my blinky runs anyway, if i flash it. So I went to debugging mode and clicked the play button,now my example runs. But its not running when I just flash it in donwload. The example is not occupyng too much program memory, roughly 40% of it. checked the address spaces, all seems fine. 

Thanks

  • Hi!

    There seems to be more changes to the project than only the broadcasting name.

    There is also files included in the project that isn't included in your folder (lamp.c, lamp.h, rdm.c).

    Once I removed all the files that was not included in your folder etc. The example runs just fine. I can flash the example and it runs just as expected, no need to start the debug session.

    Maybe you could try to copy the main.c file of your modified example to the stock ble_app_uart example, and then build and flash it?

    Also, I would not recommend using the nrfx_coredep_delay_us() as you do in your project. This will halt the MCU and delay execution.
    This means that you will not be able to connect, advertise etc. as long as the delay-function is active. I would suggest using a timer instead.

    Regards.

  • Hi,

    Those are my project files. I need them to be included for my device. It builds clean. So the flashing should be fine. How would I be able to flash with my own modifications.

  • I understand.
    But it is hard for me to be able to test your project, when all the .c and .h files aren't included in the example folder i downloaded from the dropbox-link.

    However, when I removed the filesnot included in the dropbox folder from the project, compiled and flashed it, it worked just as expected. I flashed the program to my DK and it started advertising.

  • Afer sometime i had to downgrade my OS to WIN7, reinstall the segger and got the activation licence , build and flashed in release mode. i donnot know what went right this time and didnot make changes to code or build configs other than the paths. It got fixed

Related