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

running ble_app_hrs example on nrf51822

Hi,

I am trying to run the ble_app_hrs on my nrf51822 based board in combination with the nRF51822 Development Dongle. I am following the instructions from nRF51822 Development Kit User Guide v1.4 for the heart rate monitor demo. After I program the device with softdevice s110 v7.0.0 and with the example code for nrf6310 (SDK 6.0.0) I cannot see my board in the Discovered Devices of the Master Control Panel application.

The only modification I made to the example code are the numbers of GPIO LED pins and buttons so that thay match the connections on my board.I tried to run the code in debugger mode in Keil v5 and I can follow the code untill the following line:

return sd_nvic_EnableIRQ(SWI2_IRQn);

After this line the programm keeps running but I can't follow it in the debugger...Do you have any idea what might be wrong?

Thanks for your help..

Parents
  • Hi Goran,

    Have you included the 32Khz Osc on your board? The stock project / example uses that crystal.
    If you are not using the crystal then you must change the code in the project to use the internal 32Khz RC Osc..

    SOFTDEVICE_HANDLER_INIT NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION,false);

    You can also use the following which takes the die temp into consideration : SOFTDEVICE_HANDLER_INIT NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION.

    You can also use a 8000ms time period as well.

    Hope this helped.

    Jay

Reply
  • Hi Goran,

    Have you included the 32Khz Osc on your board? The stock project / example uses that crystal.
    If you are not using the crystal then you must change the code in the project to use the internal 32Khz RC Osc..

    SOFTDEVICE_HANDLER_INIT NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION,false);

    You can also use the following which takes the die temp into consideration : SOFTDEVICE_HANDLER_INIT NRF_CLOCK_LFCLKSRC_RC_250_PPM_TEMP_4000MS_CALIBRATION.

    You can also use a 8000ms time period as well.

    Hope this helped.

    Jay

Children
  • Thank's for your quick answer. I have a 32kHz oscillator connected to the XL1 and XL2 pins of the microcontroller... I tried turning the internal oscillator on as you suggested by adding the line

    SOFTDEVICE_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_XTAL_20_PPM, false); at the begining of ble_stack_init function but then the bugging session stops even earlier at line:

    err_code = sd_softdevice_enable(clock_source, softdevice_assertion_handler);

Related