STM32 GPIO LLD register naming issue Topic is solved
Posted: Mon Oct 14, 2019 11:46 am
Hi,
I just encountered a compilation error when calling palIsLineEventEnabledX() using an STM32L476.
The function is defined identically in all three GPIO LLD versions:
Now the issue is, that IMR is not defined for this microcontroller.
Looking up the EXTI_TypeDef struct in the stm32l476xx.h file reveals that there are in fact two register sets, which include IMR1 and IMR2.
A brief search indicates, that there are probably several microcontrollers affected by this:
Thomas
I just encountered a compilation error when calling palIsLineEventEnabledX() using an STM32L476.
The function is defined identically in all three GPIO LLD versions:
Code: Select all
#define pal_lld_ispadeventenabled(port, pad) \
(bool)((EXTI->IMR & (1U << (uint32_t)pad)) != 0U)
Now the issue is, that IMR is not defined for this microcontroller.
Looking up the EXTI_TypeDef struct in the stm32l476xx.h file reveals that there are in fact two register sets, which include IMR1 and IMR2.
A brief search indicates, that there are probably several microcontrollers affected by this:
- STM32F3
- STM32H7
- STM32L4
Thomas