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

Changing on_ble_evt interrupt priority

Working with: examples/ble_peripheral/ble_app_uart . I would like to change on_ble_evt priority level so that UART IRQ handler has lower priority then softdevice event dispatching routine.

So far I checked that there are following IRQ priority levels:

  • UART = 6 (or APP_LOW)
  • on_ble_evt = 7 (or APP_LOWEST)

Context: I want to synchronise UART and BLE_NUS in a way that UART sends data to NUS and is stalled (in interruption handler) waiting for BLE_NUS to complete. I assume that the completion flag will be set in on_ble_evt, then when event handling returns execution context is passed to UART handler.

How can I achieve that?