HAL bug in LPTIM interrupt.
Hi everyone,
I'm trying to clear my head around interrupts with an STM32l0x3. I'm not using HAL functions, rather I'm trying to understand the logic behind all this.
This becomes a little bit messier since the NVIC registers are not described in the Reference Manual, but in the Programming Manual.
Anyway, working on this I found that for the EXTI the reference manual says:
For the direct interrupt lines: the interrupt is enabled by default in the interrupt mask register and there is no corresponding pending bit in the pending register.
The LPTIM interrupt is a direct line, hence this text applies. LPTIM is interrupt number 29.

PIF29 doesn't exist, and bit 23:31 should be kept at reset value as stated.
However, at the end of ''HAL_LPTIM_IRQHandler(&hlptim1);'' we can find ''__HAL_LPTIM_WAKEUPTIMER_EXTI_CLEAR_FLAG();''
This macro translates to ''EXTI->PR = LPTIM_EXTI_LINE_WAKEUPTIMER_EVENT''
and #define LPTIM_EXTI_LINE_WAKEUPTIMER_EVENT ((uint32_t)EXTI_IMR_IM29)
So, this means that EXTI_PR 29th bit is being set to 1. First of all, as I understand, this has no effect at all. Second, it goes against the reference manual.
Is my understanding correct?
Cheers,Andrés
