Skip to content

Commit d81f365

Browse files
author
Cruz Monrreal
authored
Merge pull request #10185 from artokin/mcr20a_interruptin_flag_fix
Nanostack 802.15.4 RF drivers update
2 parents cfdb72b + 0710298 commit d81f365

File tree

4 files changed

+6
-6
lines changed

4 files changed

+6
-6
lines changed

components/802.15.4_RF/mcr20a-rf-driver/mcr20a-rf-driver/NanostackRfPhyMcr20a.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@
1717
#ifndef NANOSTACK_PHY_MCR20A_H_
1818
#define NANOSTACK_PHY_MCR20A_H_
1919

20-
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && defined(MBED_CONF_RTOS_PRESENT)
20+
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT)
2121
#include "inttypes.h"
2222
#include "NanostackRfPhy.h"
2323
#include "DigitalIn.h"

components/802.15.4_RF/mcr20a-rf-driver/source/MCR20Drv.c

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@
4242
#include "MCR20Reg.h"
4343
#include "XcvrSpi.h"
4444

45-
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI
45+
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT)
4646

4747
#include "platform/mbed_critical.h"
4848

components/802.15.4_RF/mcr20a-rf-driver/source/NanostackRfPhyMcr20a.cpp

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,10 +13,10 @@
1313
* See the License for the specific language governing permissions and
1414
* limitations under the License.
1515
*/
16-
#include "NanostackRfPhyMcr20a.h"
1716

1817
#if defined(MBED_CONF_NANOSTACK_CONFIGURATION) && DEVICE_SPI && DEVICE_INTERRUPTIN && defined(MBED_CONF_RTOS_PRESENT)
1918

19+
#include "NanostackRfPhyMcr20a.h"
2020
#include "ns_types.h"
2121
#include "platform/arm_hal_interrupt.h"
2222
#include "nanostack/platform/arm_hal_phy.h"

components/802.15.4_RF/stm-s2lp-rf-driver/source/NanostackRfPhys2lp.cpp

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -931,8 +931,6 @@ static void rf_sync_detected_handler(void)
931931
rf_state = RF_RX_STARTED;
932932
TEST_RX_STARTED
933933
rf_disable_interrupt(SYNC_WORD);
934-
rf_enable_interrupt(RX_FIFO_ALMOST_FULL);
935-
rf_enable_interrupt(RX_DATA_READY);
936934
rf_backup_timer_start(MAX_PACKET_SENDING_TIME);
937935
}
938936

@@ -955,13 +953,15 @@ static void rf_receive(uint8_t rx_channel)
955953
rf_rx_channel = rf_new_channel = rx_channel;
956954
}
957955
rf_send_command(S2LP_CMD_RX);
956+
rf_poll_state_change(S2LP_STATE_RX);
958957
rf_enable_interrupt(SYNC_WORD);
958+
rf_enable_interrupt(RX_FIFO_ALMOST_FULL);
959+
rf_enable_interrupt(RX_DATA_READY);
959960
rf_enable_interrupt(RX_FIFO_UNF_OVF);
960961
rx_data_length = 0;
961962
if (rf_state != RF_CSMA_STARTED) {
962963
rf_state = RF_IDLE;
963964
}
964-
rf_poll_state_change(S2LP_STATE_RX);
965965
rf_unlock();
966966
}
967967

0 commit comments

Comments
 (0)