@@ -562,10 +562,8 @@ static void radio_robust_disable(void)
562562 }
563563 else
564564 {
565- #if !defined(RADIO_POWER_POWER_Msk )
566565 /* Disable shorts to ensure no event will be triggered after disabling. */
567566 nrf_radio_shorts_set (NRF_RADIO , SHORTS_IDLE );
568- #endif
569567 /* RADIO is in a stable state and needs to be transitioned to DISABLED manually.
570568 * It cannot be disabled if EVENT_DISABLED is set. Clear it first. */
571569 nrf_radio_event_clear (NRF_RADIO , NRF_RADIO_EVENT_DISABLED );
@@ -1046,7 +1044,6 @@ static void ppi_all_clear(void)
10461044 default :
10471045 NRF_802154_ASSERT (false);
10481046 }
1049- nrf_802154_trx_ppi_for_disable ();
10501047}
10511048
10521049static void fem_power_down_now (void )
@@ -1061,22 +1058,15 @@ void nrf_802154_trx_disable(void)
10611058
10621059 if (m_trx_state != TRX_STATE_DISABLED )
10631060 {
1064- pa_modulation_fix_apply (false);
1065-
1066- #if defined(RADIO_POWER_POWER_Msk )
1067- nrf_radio_power_set (NRF_RADIO , false);
1068- #endif
1069-
10701061 /* While the RADIO is powered off deconfigure any PPIs used directly by trx module */
10711062 ppi_all_clear ();
10721063
1073- #if !defined(RADIO_POWER_POWER_Msk )
10741064 radio_robust_disable ();
1075- wait_until_radio_is_disabled ();
1076- nrf_radio_reset ();
1077- #endif
10781065
1079- nrf_802154_irq_clear_pending (nrfx_get_irq_number (NRF_RADIO ));
1066+ /*
1067+ * Disabling the radio may take some time.
1068+ * In the meantime perform other clean-up actions.
1069+ */
10801070
10811071#if defined(RADIO_INTENSET_SYNC_Msk )
10821072 nrf_egu_int_disable (NRF_802154_EGU_INSTANCE , EGU_SYNC_INTMASK );
@@ -1089,9 +1079,14 @@ void nrf_802154_trx_disable(void)
10891079 NRF_TIMER_SHORT_COMPARE1_STOP_MASK );
10901080 timer_stop_and_clear ();
10911081
1092- #if defined(RADIO_POWER_POWER_Msk )
1093- nrf_radio_power_set (NRF_RADIO , true);
1094- #endif
1082+ /* Resume clean-up of the radio path. */
1083+ wait_until_radio_is_disabled ();
1084+ pa_modulation_fix_apply (false);
1085+ nrf_radio_reset ();
1086+
1087+ nrf_802154_trx_ppi_for_disable ();
1088+
1089+ nrf_802154_irq_clear_pending (nrfx_get_irq_number (NRF_RADIO ));
10951090
10961091 mpsl_fem_lna_configuration_clear ();
10971092 mpsl_fem_pa_configuration_clear ();
0 commit comments