Skip to content

Commit f42b3e4

Browse files
committed
STM32WL LORA radio: add a critical section in IRQ process
1 parent 4b956bb commit f42b3e4

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

connectivity/drivers/lora/TARGET_STM32WL/STM32WL_LoRaRadio.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -279,6 +279,7 @@ void HAL_SUBGHZ_MspInit(SUBGHZ_HandleTypeDef *subghzHandle)
279279
static void RadioIrqProcess()
280280
{
281281
radio_irq_masks_t irq_status;
282+
core_util_critical_section_enter();
282283

283284
irq_status = (radio_irq_masks_t)STM32WL_LoRaRadio::get_irq_status();
284285
/* clear IRQs lines after recovering their status */
@@ -300,6 +301,7 @@ static void RadioIrqProcess()
300301
if ((irq_status & IRQ_RX_TX_TIMEOUT) == IRQ_RX_TX_TIMEOUT) {
301302
STM32WL_LoRaRadio::HAL_SUBGHZ_RxTxTimeoutCallback();
302303
}
304+
core_util_critical_section_exit();
303305
}
304306

305307

0 commit comments

Comments
 (0)