# How stable is Pull-up / Pull-down resistance in newer microcontrollers like SAM D21?

I'm working on a low power design using SAM D21 microcontroller (Adafruit Feather M0). I would like to take advantage of configurable I/O and have it normally in high impedance state, but reconfigure it temporarily to an input with built-in pull-down resistance in order to take a measurement once in a while, when the microcontroller is awakened from sleep state. Looking at the data sheet Pull-up - Pull-down resistance  is listed as 20kΩ to 60kΩ. I don't mind the wide range, I can calibrate, but is the value as stable as a typical external resistor would be? BTW, I don't need very high accuracy.

EDIT

By stability, I mean low drift. For this project, change of 5% per year due to aging is acceptable. Thermal change of 5% in consumer electronic temperature range is acceptable too.

EDIT'

SAM D21 data sheet indicates that the pull-up and pull-down are disabled in analog mode. Thanks to @BruceAbbott for pointing it out.

• but is the value as stable as a typical external resistor would be? Explain what you mean by "stable". Do you mean low drift as in that you measure it today and it measures 30.3 komh and you use the chip one year and measure again, now it's 30.4 kohm (low drift) or it is 36.3 k ohm (higher drift)? On-chip resistors are generally less stable than an external resistor, it depends on what accuracy you need if that is OK. If the drift is 1% per year but you need 0.1% drift then you have an issue. If you just re-calibrate then it might be no issue. Jun 5 at 20:15
• No, it is not stable. It varies with temperature and voltage and probably with time, also. Normally, you would disable all pullups and pulldowns if you are reading an ADC input. So I am not sure what measurement you would be taking. Jun 5 at 21:13
• I agree that for measuring purposes, if you want a decent level of accuracy (better than 10%, which is quite poor) then you would not want to use the internal pull up resistor. They're not designed to be accurate. Jun 5 at 21:25
• Have you verified that the pull up/down resistor can be enabled in analog mode? Jun 5 at 22:16
• @BruceAbbott Excellent point. I checked the data sheet and indeed the pull-up or pull-down is disabled in analog mode. Thank you. Jun 6 at 4:34

• The effective resistance is likely to vary with applied voltage - you mean voltage applied to the I/O pin, right? Is there a way to find out how it is actually implemented in SAM D21? Jun 5 at 21:19