cancel
Showing results for 
Search instead for 
Did you mean: 

What's threshold voltage for external interrupt?

William Huang
Associate II
Posted on February 07, 2018 at 21:12

Hello, 

I'm just wondering what is the threshold voltage used to determine if an external interrupt due to falling or rising edge should occur. I'm attempting to find it in the datasheet, but unsure at which value to look at. 

For reference, I am using the stm32l476ve.

Many thanks!

1 ACCEPTED SOLUTION

Accepted Solutions
Posted on February 07, 2018 at 22:54

Below V_IL max you are sure that it will be seen as a 0, above V_IH min it is a 1. Between these two values it is grey area.

View solution in original post

8 REPLIES 8
henry.dick
Senior II
Posted on February 07, 2018 at 21:30

Check the datasheet for logic high and logic low levels.

Posted on February 07, 2018 at 21:57

Thank you, I'm assuming I should look at the voltage input low (V_IL) and voltage input high (V_IH), correct?

If that's the case, then let's say the V_IL = ~0.9V and ~V_IH = 2.3V. Is a falling edge determined as crossing the low input voltage line from a higher voltage? Likewise, rising edge is crossing the high input voltage line from a lower voltage?

Also what should happen if we are in the area in between V_IL and V_IH? 

T J
Lead
Posted on February 07, 2018 at 23:37

With digital circuits we like Hi or Low not inbetween.

Old cmos circuits with dangling pins would oscillate at high frequencies and draw current

So, we have the Schmitt function on these 'Analog' type pins,

the voltage must GO below Vil to become a 0 and GO above to ViH become a 1.

Now, in between VilL and ViH, the signal is still stable.

henry.dick
Senior II
Posted on February 07, 2018 at 23:41

Yes, you are right. Those pins are logic 1 if the input is greater than vih on the rising edge, and logic 0 if input is below vil on the falling edge. For anything in-between, it retains it's prior state.

Posted on February 07, 2018 at 22:54

Below V_IL max you are sure that it will be seen as a 0, above V_IH min it is a 1. Between these two values it is grey area.

Posted on February 07, 2018 at 23:54

Think the hysteresis is quoted, last time I looked something like 200mV. See V_HYS in datasheet for the specific pins being used.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Posted on February 08, 2018 at 00:01

The pin has a schmitt trigger with about 200mV of hysteresis, so the transition point is different going up vs going down.

I would imagine the pin state is latched in a flop-flop periodically, and the transition is probably detected by looking at the difference between two flip-flops holding the two most recent states. 

If you need some more definitive, or different, behaviour suggest you condition the signal before passing it to an STM32 pin.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
William Huang
Associate II
Posted on February 08, 2018 at 01:19

Thanks for the information everyone, I have a better understanding now!