I have observed that the Radio Notification from ble_radio_notification.c becomes inverted sometimes. I saw this post about the same problem:
In that post the inverted value was caused by a long-running high-prio interrupt, but I don't have that. I have a CRITICAL_REGION_ENTER / CRITICAL_REGION_EXIT region that takes about 4ms, but that shouldn't mask the radio notification interrupt?
This is my init code, which is called directly after Softdevice enable:
uint32_t err_code = ble_radio_notification_init(APP_IRQ_PRIORITY_HIGH,
NRF_RADIO_NOTIFICATION_DISTANCE_5500US,
radio_cb);
APP_ERROR_CHECK(err_code);
Right now we have a workaround where we busy-wait and check if the radio is marked as on for more than 10ms, and invert the value in that case, but it would be good to have a better solution.
I have read the Radio Notification tutorial at devzone.nordicsemi.com/.../ but didn't find any solutions there.