2017-11-27 5:20 AM
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
2017-11-30 5:59 AM
Hi
Cao.Diego_Andres
,To clear up the ambiguity, I confirm that the RM0367 is correct.
I raised internally the error you highlighted regarding the definition of both macros '__HAL_LPTIM_WAKEUPTIMER_EXTI_GET_FLAG' and '__HAL_LPTIM_WAKEUPTIMER_EXTI_CLEAR_FLAG' where EXTI_PR is wrongly used.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
2018-12-14 1:31 AM
Hello,
Please note that the raised error was fixed in STM32CubeL0 V1.11.0.
-Amel
To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.
We’re moving the ST Community to a new platform to give you a better and more reliable community experience.