Posts: 18
Registered: ‎12-05-2016
Accepted Solution

EFR32 analog inputs setting


I want to measure voltage level on PC6. Do I have to do special programming of GPIO for PC6 or shall I simply program it for input using:

GPIO_PinModeSet(gpioPortC, 6, gpioModeInput)?

I looked through examples but did not find special GPIO programming there.



Posts: 563
Registered: ‎09-18-2015

Re: EFR32 analog inputs setting

Hi @abara,


For the most part, no GPIO programming is needed for a pin to be used as an analog input because that is the pin's default function when the GPIO mode is disabled. This is why you don't see any GPIO programming in any of the ADC examples.


The one thing you may want to do that is GPIO-related is disable 5V tolerance if your input is within the range of 0 to AVDD. This is generally a good idea because the 5V tolerant input buffer circuitry reduces ADC accuracy relative to the 3V only configuration. To disable a pin's 5V input tolerance, set the corresponding bit in the GPIO_Px_OVTDIS register.