2021-11-05 08:55 AM
I have a GPIO callback (using HAL) and would like to identify which GPIO brought me into the callback and then clear that interrupt flag (the appropriate bit in the PR register), however after looking at the UG in EXTI PR1 I see no definitions of the bits?? Can someone tell me where to look to find what each bit represents? (STM32WB55)....
Thanks
2021-11-05 09:08 AM
> I have a GPIO callback
Are you talking about EXTI interrupt?
There is one interrupt per "number" of pin, i.e. EXTI0 is triggered by selected edge(s) on PA0 or PB0 or PC0 (as selected by SYCFG_EXTICRx), EXTI1 comes from PA1 or PB1 or PC1, etc.
Isn't there an example for EXTI interrupts in Cube, which would show how to use it?
JW
2021-11-05 09:29 AM
Thank you JW.....
IDK about Cube example....I am new to the STM dev environment.....I will have to look..... The only thing I can seem to find is within the NVIC CPU1 table it seems to suggest for instance is PVD happens thru EXTI[16].....nowhere does it seem to suggest that GPIO PIN 1 causes EXTI[0]....
Is it safe to assume EXTI[0 - 15] correspond to pins 0 - 15 ?? and if so where do I find the meaning of the other external interrupt bits 16 - 21 and bit 31?
2021-11-05 09:39 AM
I believe I figured it out....quite complicated.....
Seems as if you use the EXTI within the NVIC table which then points you to the SYSCFG section to see which ISR has been unmasked for interrupting....
Thanks