Electrical – STM32 Logic level high and low thresholds

microcontrollerstm32timer

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.

Best Answer

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.