From d3b26a0558804c6873ac0ba4a9bec7108c3fd048 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hubert=20Mi=C5=9B?= Date: Fri, 6 Apr 2018 23:53:25 +0200 Subject: [PATCH] [nrf52840] fix radio deinitialization (#2648) --- .../NordicSemiconductor/drivers/radio/nrf_802154_core.c | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/third_party/NordicSemiconductor/drivers/radio/nrf_802154_core.c b/third_party/NordicSemiconductor/drivers/radio/nrf_802154_core.c index d81eff006..1ac3bb2e6 100644 --- a/third_party/NordicSemiconductor/drivers/radio/nrf_802154_core.c +++ b/third_party/NordicSemiconductor/drivers/radio/nrf_802154_core.c @@ -179,8 +179,8 @@ static const uint8_t * mp_tx_data; ///< Pointer to data to trans static uint32_t m_ed_time_left; ///< Remaining time of current energy detection procedure [us]. static uint8_t m_ed_result; ///< Result of current energy detection procedure. -static volatile radio_state_t m_state = RADIO_STATE_SLEEP; ///< State of the radio driver -static volatile bool m_timeslot_is_granted; ///< Indicates if RAAL reported that timeslot is granted. +static volatile radio_state_t m_state; ///< State of the radio driver +static volatile bool m_timeslot_is_granted; ///< Indicates if RAAL reported that timeslot is granted. typedef struct { @@ -2579,13 +2579,13 @@ void nrf_802154_core_init(void) const uint8_t ack_psdu[] = {0x05, ACK_HEADER_WITH_PENDING, 0x00, 0x00, 0x00, 0x00}; memcpy(m_ack_psdu, ack_psdu, sizeof(ack_psdu)); + m_state = RADIO_STATE_SLEEP; + nrf_timer_init(); } void nrf_802154_core_deinit(void) { - current_operation_terminate(NRF_802154_TERM_802154, REQ_ORIG_HIGHER_LAYER, true); - if (timeslot_is_granted()) { nrf_radio_reset();