# STM32 Logic level high and low thresholds

I am scratching my head to find what are the minimum voltage for registering a low digital signal and maximum voltage for registering a high digital signal when I configure GPIO pins of STM32 (I am using STM32L476) as Input Capture mode (I want to measure some frequencies).

No where in the datasheet and the Reference Manual I can see this details.

I have a signal that suppose to be around 0.3V when low and 1.8V when high...So I want to know these thresholds to either use a schmitt trigger in my circuit or use some divider resitors to up or down convert the levels to match inputs of STM32.

• What is your supply voltage? The logic levels depend on it.
– filo
Commented Sep 7, 2018 at 17:00
• @filo I power the chip with 3.3V Commented Sep 7, 2018 at 17:04
• "6.3.14 I/O port characteristics" in the datasheet. Commented Sep 7, 2018 at 17:05
• @EugeneSh. Yep...I was searching for "threshold" apparently that was not the right keyword Commented Sep 7, 2018 at 18:04

The logic levels are described in section 6.3.14. When your supply voltage is 3.3V then:

V_IL = 0.39 * Vcc - 0.06 = 1.23 V (table row "I/O input low level voltage except BOOT0". The maximum voltage that will be read as logical zero is 1.23V (+ read all footnotes).

V_IH = 0.49 * Vcc + 0.26 = 1.88 V (table row "I/O input high level voltage except BOOT0"). You need to supply at lest 1.88 V to make the pin read as logical one.

Your 1.8 V signal is below V_IH and above V_IL, which means that the result is unpredictable.

You have to be concerned with the maximum voltage read as zero (ie. not exceed it) and the minimum voltage read as one, not the other way around.

• wow nice catch....did you use any specific keyword to find that section? Commented Sep 7, 2018 at 18:04
• I used "Vih"... Commented Sep 7, 2018 at 18:52
• Practice, practice, practice :) Every single digital IC datasheet provides those parameters :)
– filo
Commented Sep 7, 2018 at 20:14
• The information actually seems to be missing in the STM32F40xxx datasheet… There is a V_IH and V_IL but for specific IOs only. st.com/resource/en/datasheet/DM00037051.pdf Commented Jul 26, 2022 at 8:19