23fbb19ed5
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> |
||
---|---|---|
.. | ||
CMakeLists.txt | ||
hal_common.c | ||
Kconfig | ||
Kconfig.sx12xx | ||
shell.c | ||
sx12xx_common.c | ||
sx12xx_common.h | ||
sx126x.c | ||
sx126x_common.h | ||
sx126x_standalone.c | ||
sx126x_stm32wl.c | ||
sx127x.c |