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.

  • \$\begingroup\$ What is your supply voltage? The logic levels depend on it. \$\endgroup\$ – filo Sep 7 '18 at 17:00
  • \$\begingroup\$ @filo I power the chip with 3.3V \$\endgroup\$ – DEKKER Sep 7 '18 at 17:04
  • 1
    \$\begingroup\$ "6.3.14 I/O port characteristics" in the datasheet. \$\endgroup\$ – Eugene Sh. Sep 7 '18 at 17:05
  • \$\begingroup\$ @EugeneSh. Yep...I was searching for "threshold" apparently that was not the right keyword \$\endgroup\$ – DEKKER Sep 7 '18 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.

| improve this answer | |
  • \$\begingroup\$ wow nice catch....did you use any specific keyword to find that section? \$\endgroup\$ – DEKKER Sep 7 '18 at 18:04
  • 1
    \$\begingroup\$ I used "Vih"... \$\endgroup\$ – Eugene Sh. Sep 7 '18 at 18:52
  • 1
    \$\begingroup\$ Practice, practice, practice :) Every single digital IC datasheet provides those parameters :) \$\endgroup\$ – filo Sep 7 '18 at 20:14

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.