cancel
Showing results for 
Search instead for 
Did you mean: 

False EXTI12 Interrupt Falling Edge Triggering

danielbathtub
Associate III

Hi, 

I have an application that should trigger an interrupt on a falling level signal. 

For argument sake, let's say that I expect it to trigger about once a second. 

Now, when I run my code, it triggers(the EXTI12 ISR) more like 30 times per second. 

I have measured the level signal, and it is flat but the ISR for some reason still triggers. 

Attached is the scope plot of my level signal. I have a Debug IO PIN toggling plot as well. 

danielbathtub_0-1741178356835.png

you can see, I ran this over 3s and my scope had 3 captures, from my analogy this means the level signal cannot be the cause ?. 

This is my code in the ISR(I have a bunch of other ISR's in here)

danielbathtub_1-1741178534092.png

Continued: 

danielbathtub_2-1741178616389.png

then I exit: 

Detail: I do trigger another ISR using Software I don't know if this can have an effect .

The code for this is below: 

danielbathtub_3-1741179001235.pngdanielbathtub_4-1741179019380.png

 

My ISR subroutine consists of multiple IF statements for me to run specific code when other Level Signals go Low/High. 

Here is a debug IO Pin toggling, Which is how I know the ISR is triggering multiple times, beyond other issues. 

danielbathtub_5-1741179111067.png

@waclawek.jan  

@Tesla DeLorean 

 

 

5 REPLIES 5
TDK
Guru

Consider using a stronger pulldown on that line. Looks like it's getting a ton of crosstalk from something. Or ideally a low-pass filter like an RC filter.

There's 4 potential triggers in 400us of your scope capture.

If you feel a post has answered your question, please click "Accept as Solution".

I disable the EXTI12 ISR immediately upon entry.  (If you look at the code you'll see this)

I then set a Timer(Timer 14) to trigger an ISR 2 ms later, I then Enable the EXTI12 ISR. 

In the Timer 14 interrupt. So those level signals you see cannot be the cause of the problem. 

danielbathtub
Associate III

Also if you investigate the DEBUG LED toggling signal I sent, You'll see that this toggle occurs every 2mS or So. (After I enable the EXTI12 ISR again)

Isn't it possible there are edges 2ms after the event as well? Especially given the amount of noise that appears on those signals in the waveform period that you shared. It would be good to see a plot the EXTI pin and the debug pin on the same plot, over the same period.

The chances of there being false triggers on EXTI are nearly nil. It's a hardware Schmitt trigger directly feeding the hardware state machine. There could be "unwanted" triggers but they are certainly present at the signal level otherwise the triggers would not be happening (barring code bugs). Code doesn't appear to have bugs.

If you feel a post has answered your question, please click "Accept as Solution".
LCE
Principal

What's connected to that pin?

In case of a mechanical switch / push button, how is it debounced? There should be at least 10nF, or even an RC filter as TDK proposed.