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

SD BLE Event priority and task management

Currently I have a few characteristics which are Authorized Read and Writes. Upon detected of the Authorization from the Central I trigger a few events such as:

  1. Measure Temp
  2. Measure Battery
  3. Start/Stop app_timers
  4. Blink LED
  5. Start PWM
  6. Start Timer and GPIOTE sd_nvic_SetPriority(TIMER2_IRQn, NRF_APP_PRIORITY_LOW);
  7. sd_ble_gap_rssi_start()
  8. sd_ble_gatts_value_set()
  9. Save to Flash

...etc

In cases like reading Temp or Battery, these call sd_ functions. So my question is, does this violate the proper IRQ Priority sequencing? Since I initialize the SOFTDEVICE_HANDLER_INIT with scheduler param = true I always assumed this meant BLE events are now moved automatically to scheduler context and thus I didn't have an issue called any sd_ functions from these events. Could someone provide some clarity on this please? Thank you

I ask because in the field some testers have seen their device basically brick. Power Reset's do not bring it back to life. They have to physically trigger the Reset pin in order to get the Device working again.

-DC

Related