diff --git a/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h b/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h index 0f94b68bd6e..a7200c0d10e 100644 --- a/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h +++ b/components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h @@ -17,7 +17,7 @@ #ifndef NANOSTACK_PHY_MCR20A_H_ #define NANOSTACK_PHY_MCR20A_H_ -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT) +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT) #include "inttypes.h" #include "NanostackRfPhy.h" #include "DigitalIn.h" diff --git a/components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c b/components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c index f561c0d412a..dc99f2d1b3c 100644 --- a/components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c +++ b/components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c @@ -42,7 +42,7 @@ #include "MCR20Reg.h" #include "XcvrSpi.h" -#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI +#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT) #include "platform/mbed_critical.h" diff --git a/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp b/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp index 2179781c4a3..18801a8ba25 100644 --- a/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp +++ b/components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp @@ -13,10 +13,10 @@ * See the License for the specific language governing permissions and * limitations under the License. */ -#include "NanostackRfPhyMcr20a.h" #if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT) +#include "NanostackRfPhyMcr20a.h" #include "ns_types.h" #include "platform/arm_hal_interrupt.h" #include "nanostack/platform/arm_hal_phy.h" diff --git a/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp b/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp index a18a4f706ae..ff17c6b775c 100644 --- a/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp +++ b/components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp @@ -931,8 +931,6 @@ static void rf_sync_detected_handler(void) rf_state = RF_RX_STARTED; TEST_RX_STARTED rf_disable_interrupt(SYNC_WORD); - rf_enable_interrupt(RX_FIFO_ALMOST_FULL); - rf_enable_interrupt(RX_DATA_READY); rf_backup_timer_start(MAX_PACKET_SENDING_TIME); } @@ -955,13 +953,15 @@ static void rf_receive(uint8_t rx_channel) rf_rx_channel = rf_new_channel = rx_channel; } rf_send_command(S2LP_CMD_RX); + rf_poll_state_change(S2LP_STATE_RX); rf_enable_interrupt(SYNC_WORD); + rf_enable_interrupt(RX_FIFO_ALMOST_FULL); + rf_enable_interrupt(RX_DATA_READY); rf_enable_interrupt(RX_FIFO_UNF_OVF); rx_data_length = 0; if (rf_state != RF_CSMA_STARTED) { rf_state = RF_IDLE; } - rf_poll_state_change(S2LP_STATE_RX); rf_unlock(); }