AnsweredAssumed Answered

STM32F411RE EXTI Interrupts without something attached

Question asked by The Bug on Sep 13, 2015
Latest reply on Sep 13, 2015 by The Bug
I encountered a strange behaviour on several STM32F411 nucleos: When configuring an EXTI for an input GPIO Pin the pending bit gets set, even though nothing is connected to the Pin.
Code is attached.
These two files are included into an example project of STM and no other files were changed.
I was trying to write a code that could detect which PS2-keyboard line is the clock-line and later on read in characters. Therefore I counted interrupts and after 33 occured the LED will be turned on. But the LED went on even before I pressed a key on the keyboard. After trying a lot of things I detached the keyboard, so the only cable to the board was the ST-Link-USB-cable, but still the LED did go on. I tried several different Pins, A0, A12 and C12 come to my mind now, but there also where some others including some from Port B, and every time the same thing happened. Debugging then showed that the Pending Bit gets set all the time, leading to a consistently run ISR. The time between the runs varies, when having a Break-Point at the beginning of the ISR and clicking Run immediatly after reaching it, it took between none to about 15 seconds until it stopped again. Therefore the time it took the LED varied too, but was never greater than one and a half minutes.
The only thing left I can think of is damaged hardware, but all programms not using EXTIs, as well as all programms using the USR-Button as EXTI (maybe due to the condenser connected) worked perfectly fine, and with some Pins only one interrupt occured, solving the problem by adding a EXTI_ClearITPendingBit directly after the EXTI-configuration.

Any ideas?
Thank

Attachments

Outcomes