diff --git a/examples/platforms/nrf52840/platform-nrf5.h b/examples/platforms/nrf52840/platform-nrf5.h index 024eb7677..2820fe272 100644 --- a/examples/platforms/nrf52840/platform-nrf5.h +++ b/examples/platforms/nrf52840/platform-nrf5.h @@ -148,6 +148,12 @@ void nrf5RadioInit(void); */ void nrf5RadioDeinit(void); +/** + * Pseudo reset Radio driver. + * + */ +void nrf5RadioPseudoReset(void); + /** * Function for processing Radio. * diff --git a/examples/platforms/nrf52840/platform.c b/examples/platforms/nrf52840/platform.c index 9bbc38513..e1d5ec9da 100644 --- a/examples/platforms/nrf52840/platform.c +++ b/examples/platforms/nrf52840/platform.c @@ -55,6 +55,7 @@ void PlatformInit(int argc, char *argv[]) if (gPlatformPseudoResetWasRequested) { + nrf5RadioPseudoReset(); nrf5AlarmDeinit(); nrf5AlarmInit(); diff --git a/examples/platforms/nrf52840/radio.c b/examples/platforms/nrf52840/radio.c index 4e38eaaf9..f1c6f4410 100644 --- a/examples/platforms/nrf52840/radio.c +++ b/examples/platforms/nrf52840/radio.c @@ -227,6 +227,12 @@ void nrf5RadioDeinit(void) nrf_802154_deinit(); } +void nrf5RadioPseudoReset(void) +{ + nrf_802154_sleep(); + sPendingEvents = 0; +} + otRadioState otPlatRadioGetState(otInstance *aInstance) { (void)aInstance;