Skip to content

Commit 6ad0cff

Browse files
author
Arto Kinnunen
committed
802.15.4 STM S2LP driver update
Update STM S2LP driver to version v1.0.8
1 parent 327ea8f commit 6ad0cff

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

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

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -848,7 +848,11 @@ static void rf_cca_timer_interrupt(void)
848848
rf_flush_tx_fifo();
849849
tx_finnish_time = rf_get_timestamp();
850850
if (device_driver.phy_tx_done_cb) {
851-
device_driver.phy_tx_done_cb(rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL, 0, 0);
851+
if (rf_state == RF_RX_STARTED) {
852+
device_driver.phy_tx_done_cb(rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL_RX, 0, 0);
853+
} else {
854+
device_driver.phy_tx_done_cb(rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL, 0, 0);
855+
}
852856
}
853857
} else {
854858
if (status == PHY_RESTART_CSMA) {
@@ -1143,7 +1147,7 @@ static void rf_irq_task_process_irq(void)
11431147
tx_finnish_time = rf_get_timestamp();
11441148
rf_update_tx_active_time();
11451149
TEST_TX_DONE
1146-
device_driver.phy_tx_done_cb(rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL, 1, 0);
1150+
device_driver.phy_tx_done_cb(rf_radio_driver_id, mac_tx_handle, PHY_LINK_CCA_FAIL_RX, 1, 0);
11471151
rf_send_command(S2LP_CMD_SABORT);
11481152
rf_poll_state_change(S2LP_STATE_READY);
11491153
rf_send_command(S2LP_CMD_FLUSHTXFIFO);

0 commit comments

Comments
 (0)