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

Not get advertisemnet for our nordic custom board.

Hi ,

We are using nordic nrf51822 custom board.

In our we are not using any external oscillator.

so here is my configuration for advertisement in ble_proximity

1>system_nrf51.c if (*(uint32_t *)0x10001008 == 0xFFFFFFFF) { NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Wen << NVMC_CONFIG_WEN_Pos; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} *(uint32_t *)0x10001008 = 0xFFFFFF00; NRF_NVMC->CONFIG = NVMC_CONFIG_WEN_Ren << NVMC_CONFIG_WEN_Pos; while (NRF_NVMC->READY == NVMC_READY_READY_Busy){} NVIC_SystemReset(); while (true){} } 2>main.c int main(void) { // Initialize leds_init(); timers_init(); gpiote_init(); buttons_init();

  • NRF_CLOCK->TASKS_HFCLKSTOP = 1; // Start RC oscillator
  • while (NRF_CLOCK->EVENTS_HFCLKSTARTED == 1){ // Wait for oscillator to start
  • }
  • NRF_CLOCK->EVENTS_LFCLKSTARTED = 0; // Clean up

static void ble_stack_init(void) {

  • BLE_STACK_HANDLER_INIT(NRF_CLOCK_LFCLKSRC_RC_250_PPM_500MS_CALIBRATION, BLE_L2CAP_MTU_DEF, ble_evt_dispatch, false); }

But i am not getting advertisement.

it gets hanged at ble_stack_handler_init()

Kindly tell me. what should i change to get advertisement.

i check my toggling some gpio pin,which is working fine.

Regards Balaji

  • You write that you don't have any external oscillator, but according to the code snippet, you set the device up for using an external 32 MHz crystal. If you don't have any external crystal at all (neither 16 MHz nor 32 MHz), it will not be possible to use the radio. Also, if you have an external 16 MHz crystal, and configure the chip for 32 MHz, things will definitely not work and you'll end up sending on a wrong frequency.

    Also, when you just add the code in your reply, instead of wrapping it in [ code ] tags, it gets very hard to read. If you could just attach the complete main file, that would make it a lot easier to understand. Note that it is not needed to manipulate the CLOCK peripheral in any way when using the softdevice, since all of this is taken care of internally.

    Finally. which SDK, S110 and chip revision are you working with? Based on the code, it seems that you're using SDK 4.4.2. If you then try to flash this program to a board with S110 version 6.0.0, things will not work. I'd also strongly recommend you to use second revision chips for development, with SDK 5.1.0 and S110 version 6.0.0.

Related