Skip to main content

Timeline for Use GPIO to disable voltage divider

Current License: CC BY-SA 3.0

8 events
when toggle format what by license comment
Nov 11, 2019 at 17:06 comment added GB - AE7OO Always verify the 5V tolerance of STM32 ADC input pins, it changes based on both port and family. Some families have NO 5V tolerant ADC inputs(e.g. STM32F303) and even the STM32L15x used by the OP has some ADC inputs that are not 5V tolerant(e.g. ADC13_IN). BTW, wither a GPIO pin is 5V tolerant or not is based on the pin inputs(i.e. it uses VDD_FT for it's input diodes and not VDD) and not wither it is configured for digital or analog (Or at least this was true of the 5 ref manuals I consulted(L1xx, F3xx, F1xx, F4xx, L4xx).
Apr 22, 2015 at 11:46 vote accept Matt Williamson
Apr 21, 2015 at 4:37 comment added Matt Williamson I see. That sounds like a great option.
Apr 21, 2015 at 3:26 comment added Spehro 'speff' Pefhany 5V-tolerant means that when it's configured as a digital input it can go up to 5V without drawing hardly any current. So in measure mode, the pin connected to the 75K (bottom of the divider) is configured as a digital output and set to '0', so it's close to ground. The divider junction is connected to another pin, configured as an analog input to the ADC- it sits at 1/3 of the battery voltage. In non-measure mode, both pins are configured as digital inputs (with no pullups or pulldowns enabled if those are options on this MCU). Both 'input' pins float up to 4.2V-4.3V.
Apr 21, 2015 at 2:57 comment added Matt Williamson Can you elaborate a little more on the 5v tolerance? You're saying I can use a bigger ratio? But at 12bits it will read as 4095 until the voltage falls below 1.8v, the VREF, no?
Apr 21, 2015 at 2:45 history edited Spehro 'speff' Pefhany CC BY-SA 3.0
deleted 1 character in body
Apr 21, 2015 at 2:11 history edited Spehro 'speff' Pefhany CC BY-SA 3.0
added 211 characters in body
Apr 21, 2015 at 2:01 history answered Spehro 'speff' Pefhany CC BY-SA 3.0