zephyr/drivers/lora
Fabio Baltieri 23fbb19ed5 drivers: sx126x_stm32wl: clear the radio IRQ before reenabling it
The stm32wl version of the sx126x driver disables the NVIC interrupt in
the radio isr to prevent retriggering while the event gets handled in
the workqueue. Since the interrupt condition is still present while the
line is disabled, the interrupt pending bit remains set in the NVIC, so
after the handler finished, when irq_enable() gets called, the interrupt
fires immediately again with no status bit set in the radio registers.

Apart from the no-op interrupt, this has the side effect of bringing
the radio out of sleep as soon as the interrupt bit are read and
cleared, which increases the idle state power consumption.

Adding a NVIC_ClearPendingIRQ() before irq_enable() seems to fix the
problem. It should not cause any issue with missing interrupt events, as
if there are pending bit on the Radio, the NVIC pending bit would be
re-set immediately.

Signed-off-by: Fabio Baltieri <fabio.baltieri@gmail.com>
2021-09-22 21:10:05 -05:00
..
CMakeLists.txt drivers: sx126x: add support for the stm32wl chip 2021-07-15 21:30:28 -04:00
hal_common.c drivers: lora: Add missing function definitions & callbacks for LoRaWAN 2020-10-08 12:15:38 +02:00
Kconfig lora: sx12xx_common: transition to k_poll_signal 2021-08-08 04:19:27 -04:00
Kconfig.sx12xx drivers: sx126x: add support for the stm32wl chip 2021-07-15 21:30:28 -04:00
shell.c device: Const-ify all device driver instance pointers 2020-09-02 13:48:13 +02:00
sx12xx_common.c drivers: lora: sx12xx: fix atomic include 2021-08-20 11:32:45 -04:00
sx12xx_common.h lora: lora_send blocks until completion 2021-08-18 05:16:46 -04:00
sx126x.c lora: lora_send blocks until completion 2021-08-18 05:16:46 -04:00
sx126x_common.h drivers: sx126x: add support for the stm32wl chip 2021-07-15 21:30:28 -04:00
sx126x_standalone.c drivers: sx126x_standalone: use the correct dev_data for dio1 callback 2021-08-16 04:57:41 -04:00
sx126x_stm32wl.c drivers: sx126x_stm32wl: clear the radio IRQ before reenabling it 2021-09-22 21:10:05 -05:00
sx127x.c lora: lora_send blocks until completion 2021-08-18 05:16:46 -04:00