cancel
Showing results for 
Search instead for 
Did you mean: 

Exact meaning of VIL and VIH and the resulting switching point between HIGH and LOW

VolkerKugler
Associate II

We want to realise a cheap measurement of a external voltage over a voltage divider with a STM32F765ZI processor. We calculate VIL with the formula "0,35*VDD-0,04" which is guaranteed by design. On base of this calulated VIL we calculate our voltage divider, so that at 2,5V external voltage exactly the calculated VIL was at the pin of the µC. But, tested at two pins, the switching level differs from the calculation and also between the two pins:

Pin1:

Low  <=3,115V:

High>= 3,90V

Pin2:

Low<=3,37V

High>=3,59V

Is that a normal behaviour?

So it is not possible to use an input pin with internal Schmitt trigger for a halfway exact input threshold?

Best regards

Volker

6 REPLIES 6
VolkerKugler
Associate II

0693W000003Qcw7QAC.pngDoes this diagram mean, that the switching point between low and high can be somewhere in the "Area not determined" and differs between the GPIOs of the same µC?

LMI2
Lead

I don't think that voltages guaranteed by design are very accurate. Edit: accuracy is ofcourse relative. And Schmitt trigger input have hysteresis which complicates thinks.

Surely these are not voltages on CPU pins, are they? There is very little difference between high and low, and after your resistive divider, even less.

Pin1:

Low <=3,115V:

High>= 3,90V

Pin2:

Low<=3,37V

High>=3,59V

VolkerKugler
Associate II

No, that are voltages at a resistor voltage divider with the factor 0,4351.

That means 3,115V at the divider = 1,3553V at the pin of the controller.

TDK
Guru

> Does this diagram mean, that the switching point between low and high can be somewhere in the "Area not determined" and differs between the GPIOs of the same µC?

It means they make no guarantees on how it operates in that region. It could vary between pins, between different chips, on the current temperature. If you need a precise reading, use the ADC or (in some devices) the comparator.

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

I tried more measures directly at the CPU pins without a voltage divider and on more pins. What I can see is, that the hysteresis on most of the pins is only 30mV to 70mV and they toggle extremly. Less of the pins have a hysteresis of about 200 to 270mV and they don`t toggle.

The hysteresis was given as 10% VDD in the datasheet specification. My expectation is, that datasheet parameters will be parameters that the µC will realize. I understand the behaviour in the "Are not determined", but the hysteresis is given as a parameter without tolerance. With a real hysteresis between 30mV and 305mv (with only 20% of the tested pins near 300mV) the darasheet parameter is not fulfilled in my opinion.

Best regards

Volker

Depending on the exact ground and power tracks layout, the power supply, surrounding circuitry and their activity, and the internal and external activity of the mcu itself, there is noise on the power versus ground pins. This is usually dominated by switching noise from inside the mcu. 10s or even a few 100s of mV are no surprise. Also there are voltage differences - across the whole frequency spectrum including DC - between the individual ground pins.

Welcome to the world of digital electronics, where it meets analog and HF.

JW