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

Can I run ble_app_hrs sample using internal rc clock only?

Hi, I'm trying to run your ble_app_hrs on your nrf51822 chip using internal rc clock: NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION, so I pass this to the BLE_STACK_HANDLER_INIT instead of NRF_CLOCK_LFCLKSRC_XTAL_20_PPM (because I don't have an external crystal).

But this init call is never returning, it seems to be stuck in in an infinite loop in your SoftDevice at address 0x00002C7C waiting for an event that is never coming.

0x00002C7C F00CFC40 BL.W 0x0000F500 0x00002C80 2800 CMP r0,#0x00 0x00002C82 D0FB BEQ 0x00002C7C

any ideas? Did I do something else in wiring up your chip? There is a "note" in your nRF51822 PS v1.3.pdf saying "External Crystal must be used for Radio operation". Is this my problem?

PS: is there any easier way to debug into soft device to figure out what is going on in there?

Parents
  • Hi,

    Have you make sure you have the a 16 MHz external crystal ?

    The BLE stack requires both 16 MHz and 32 kHz oscillator. The 16 MHz clock source must be provided from external crystal because it's for radio operation as you already quoted. The 32 kHZ clock source can be from external crystal or internal RC with the only requirement of having tolerance lower than 250ppm.

    You should have no problem using NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION as LFCLK.

    Do you receive an ERR_CODE after the call to ble_stack_handler_init() ?

Reply
  • Hi,

    Have you make sure you have the a 16 MHz external crystal ?

    The BLE stack requires both 16 MHz and 32 kHz oscillator. The 16 MHz clock source must be provided from external crystal because it's for radio operation as you already quoted. The 32 kHZ clock source can be from external crystal or internal RC with the only requirement of having tolerance lower than 250ppm.

    You should have no problem using NRF_CLOCK_LFCLKSRC_RC_250_PPM_4000MS_CALIBRATION as LFCLK.

    Do you receive an ERR_CODE after the call to ble_stack_handler_init() ?

Children
Related