cancel
Showing results for 
Search instead for 
Did you mean: 

Pull-up and Pull-down resistors in STM32 microcontrollers

marcogrossi89
Associate II

Hello everyone,

I have carried out some experiments on five different STM32 microcontroller devices (STM32F103) measuring the values of the pull-up and pull-down resistances integrated in the GPIO. I have created a voltage divider between VDD and ground using the internal pull-up and pull-down resistors and an external reference resistor. I have found that the value of pull-down resistors are slightly lower in value than the pull-up resistors on all tested devices and their value is less stable than the pull-up resistances.

Anyone knows how the pull-up and pull-down resistors are effectively implemented in the GPIO microcontroller? Are these real resistors with a switch in series or something else? Are the pull-down resistances implemented in the same way as the pull-up resistances?

Thanks.

Marco

 

3 REPLIES 3
gbm
Lead III

There are no resistors, just transistors with high channel resistance. The are not supposed to be accurate or stable.

My STM32 stuff on github - compact USB device stack and more: https://github.com/gbm-ii/gbmUSBdevice

Thanks for the information.

Do you know if there are differences in the implementation of pull-up and pull-down resistors, that is, for example, pull-up are implemented using p-MOSFET and pull-down using nMOSFET?

Is the pull-up/pull-down implementation inside a microcontroller a standard? Or it can change for different microcontroller manufacturers?

Since pull-up/pull-down resistors are not real resistors, is it expected that the measured resistance change significantly with the voltage value on the pin (i.e. with the current drawn by the transistor or its drain-to-source voltage)?

Best regards.

Marco

 

As @gbm said, the internal pull ups/downs are not supposed to be accurate or stable - so if any of those things matters in your application, you should be using suitably-defined external pull ups/downs.