0

There are some references to the existence of Schmitt trigger inputs on the Raspberry Pi. There seems to poor and conflicting information on this point. There is https://www.scribd.com/doc/101830961/GPIO-Pads-Control2 but nothing in https://www.raspberrypi.org/app/uploads/2012/02/BCM2835-ARM-Peripherals.pdf. I saw another reference that seemed to use different addresses. Even the scribd article is short on specifics. It makes reference to a document "BCM2835 full data sheet" however the information listed does not appear in my copy of the data sheet. Perhaps there is another version somewhere that I can access? I not that there are not enough bits in the address range given to set power level and hysteresis for all pins. Am I missing something? This leaves a number of questions:

Is hysteresis available on all input pins?
Is it defaulted?
How do I set hysteresis on or off for a particular pin?
Is hysteresis and power level set individually on each pin or by banks of pins?
Should I rely on the Schmitt trigger behaviour in my board design, or is it likely to change in future without notice?

3
  • Which of those questions are not answered by the scribd article? – joan May 25 '20 at 8:10
  • I now understand that the the GPIO pins are organised in banks. These values are not set on a pin by pin basis. Any driver thus sets the entire block of pins in a single instruction (along with the required "password"). – tony wallace May 25 '20 at 10:39
  • Here is some code which sets the pad drive strength. github.com/joan2937/pigpio/blob/master/pigpio.c#L13139 – joan May 25 '20 at 12:06
1

The default safe configuration for unconnected digital pins is "Input with Schmitt trigger enabled". Any other configuration is potentially dangerous:

  • Configuring the pin as output makes it vulnerable if shorted to VCC/GND.

  • Configuring the pin as input without the trigger can result in metastability if connected to a voltage level between 0 and 1 (typically near VCC/2). This can create low-resistance paths from VCC to GND inside the chip, resulting in malfunction or even damage.

Schmitt trigger behavior is part of the device specification, so you can rely on it in the same way you rely on any other parameter. It is only recommended to disable hysteresis on digital pins which are driven with correct signal at all times, e.g. pins which are connected to external RAM chips.

0

From my reading of https://www.scribd.com/doc/101830961/GPIO-Pads-Control2, schmitt triggers are enabled by default. They are set on a bank basis with one bit controlling the triggers for all pins in that bank. Thus it is not possible to set the drive level or hysteresis value for a single pin.

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.