diff --git a/nrf_802154/driver/src/nrf_802154_request_swi.c b/nrf_802154/driver/src/nrf_802154_request_swi.c index 1e884e85f..156bc5b77 100644 --- a/nrf_802154/driver/src/nrf_802154_request_swi.c +++ b/nrf_802154/driver/src/nrf_802154_request_swi.c @@ -101,6 +101,7 @@ typedef enum typedef struct { nrf_802154_req_type_t type; ///< Type of the request. + bool touched; union { @@ -333,6 +334,7 @@ static bool active_vector_priority_is_high(void) * @param[in] term_lvl Termination level of this request. Selects procedures to abort. * @param[out] p_result Result of entering the sleep state. */ +void printk(const char* fmt, ...); static void swi_sleep(nrf_802154_term_t term_lvl, bool * p_result) { nrf_802154_req_data_t * p_slot = req_enter(); @@ -340,8 +342,16 @@ static void swi_sleep(nrf_802154_term_t term_lvl, bool * p_result) p_slot->type = REQ_TYPE_SLEEP; p_slot->data.sleep.term_lvl = term_lvl; p_slot->data.sleep.p_result = p_result; + p_slot->touched = false; req_exit(); + if (!p_slot->touched) + { + while(true) + { + printk("This should never happen!\n"); + } + } } /** @@ -856,6 +866,7 @@ static void irq_handler_req_event(void) case REQ_TYPE_SLEEP: *(p_slot->data.sleep.p_result) = nrf_802154_core_sleep(p_slot->data.sleep.term_lvl); + p_slot->touched = true; break; case REQ_TYPE_RECEIVE: