0

I am developing a concurrent BLE and Shockburst application on the nRF51 DK. First I tried to run Shockbust alone. It compiled and it was no problam to load it on the board. But when I run it, it doesn't work. I think I found the mistake, but I don't know how to solve it:

The nrf_esb_init() function doesn't return. I surrounded the function with LEDs for testing. LED_1 lights on, so the function is called, but LED_2 never flash:

void esb_wake(void) {
  nrf_gpio_pin_toggle(LED_1); // flash
  nrf_esb_init(NRF_ESB_MODE_PTX);
  nrf_gpio_pin_toggle(LED_2); //does not flash

  nrf_esb_set_base_address_0(addr0);
  nrf_esb_set_base_address_1(addr1);
  nrf_esb_set_channel(rf_channel);

  uint32_t err_code = timeslot_sd_init();
  APP_ERROR_CHECK(err_code);
  nrf_esb_enable();
  nrf_esb_set_max_number_of_tx_attempts(1); 

}

I use the SDK 10.0 and Softdevice s310.

Anybody an idea how to solve my problem?

Robin
  • 21
  • 3

1 Answers1

2

I was able to solve the problem by my own:

As I said I use a softdevice and that is the evil. The softdevice is "the master of the board". ShockBurst is not part of the softdevice. So I had to tell the softdevice when I use some external code. The solution is to call nrf_esb_init() not before a timeslot starts. So I moved the function into my timeslot event handler in the NRF_RADIO_CALLBACK_SIGNAL_TYPE_START case.

Robin
  • 21
  • 3