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

How to run ble_app_hrs project?

Hello, I have major problem trying to debug/run ble_app_hrs example. The thing is that when I enter debug mode the code is stuck here:


0x000001B4 4908      LDR      r1,[pc,#32]  ; @0x000001D8
0x000001B6 68C9      LDR      r1,[r1,#0x0C]
0x000001B8 2900      CMP      r1,#0x00
0x000001BA D0FB      BEQ      0x000001B4

it doesn't even get to this timers_init();:


int main(void)
{
    uint32_t err_code;

    timers_init();

I really don't know what's the problem. I assume that it's hidden in startup or system files, but since I'm a beginner it's had to find solution. Could you help me, please?

I also tried to load built example from nRFgo Studio, but when I push "Button 0" LED0 doesn't start blinking, LED0 and LED1 are OFF.

P.S. I'm using Keil uVision 4

Parents
  • My best guess is that you haven't flashed the softdevice. This must be done with nRFgo Studio before trying to use any applications on top of it. The procedure is described in the user guide for your kit, for example in section 3.2 of the Evaluation Kit User Guide.

  • When I did as it is in manual then this window pops out:

    "Running application C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/nrf51Studio/nrfjprog.exe --snr 480203645 --programs C:/Keil/ARM/Device/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/arm/_build/ble_app_hrs.hex --clenr0 0x0 --reset Loaded JLinkARM.dll --clenr0 option should be used with --programs to protect softdevice (hex file did not have this info) ERROR: program file to flash failed!! "

    But when I switch tab "program softdevice" to "program application" then everything goes ok...

Reply
  • When I did as it is in manual then this window pops out:

    "Running application C:/DOCUME~1/ADMINI~1/LOCALS~1/Temp/nrf51Studio/nrfjprog.exe --snr 480203645 --programs C:/Keil/ARM/Device/Nordic/nrf51822/Board/pca10001/ble/ble_app_hrs/arm/_build/ble_app_hrs.hex --clenr0 0x0 --reset Loaded JLinkARM.dll --clenr0 option should be used with --programs to protect softdevice (hex file did not have this info) ERROR: program file to flash failed!! "

    But when I switch tab "program softdevice" to "program application" then everything goes ok...

Children
No Data