2024-11-24 01:10 PM - last edited on 2024-11-25 05:50 AM by SofLit
So I have three switches (nothing special just momentary push button) wired into the board PC2, PC3 and PA4. All are using internal pullups. PC2 and PC3 are set for rising / falling trigger IRQs and PA4 is set for falling IRQ. They all have their own ISR function and use a single callback. I am monitoring EXT -> PR register (interrupt flag) and I notice that when I push one of the buttons it will sometimes set 1, 2 or even all 3 of the flags and I never touch the other buttons. Here is an example of me pushing PC2 and 2,3,4 all went off. Sometimes only the one I want goes off as I would expect but many times multiple flags get set. There is nothing else on top of the board. It is a Nucleo-F401RE. Any ideas as to what could be going on here as I am totally confused?
Solved! Go to Solution.
2024-11-25 12:54 PM
So, with two discrete components per button, EXTI interrupt, over 40 lines of code and hardware timer you've managed to achieve what's easily possible without discrete components nor EXTI, using just 5 lines of code per button in SysTick ISR. ;)