routing reference voltage to GPIO pin while WIFI is enabled

marclee
Posts: 51
Joined: Fri Apr 09, 2021 1:09 pm

routing reference voltage to GPIO pin while WIFI is enabled

Postby marclee » Wed Jul 07, 2021 9:55 pm

Device: ESP32-S2-WROOVER

As ADC1 of ESP32-S2-WROOVER does not support an external reference voltage, I need to route the internal reference voltage of ADC1 to one of the GPIO pins. Therefore I use the command adc_vref_to_gpio. Unfortunately that does not seem to work while WIFI is enabled.

Is there any other way to route the internal reference voltage to any of the GPIO pins, while WIFI ist enabled?

sraposo
Posts: 14
Joined: Mon Dec 14, 2020 4:42 pm

Re: routing reference voltage to GPIO pin while WIFI is enabled

Postby sraposo » Wed Aug 04, 2021 7:11 pm

Hi!

I also face a problem related to "adc_vref_to_gpio" function, since it results a error at compile time, although documentation at https://docs.espressif.com/projects/esp ... er_acquire#

"adc2_vref_to_gpio" cause no compile time error.

sraposo
Posts: 14
Joined: Mon Dec 14, 2020 4:42 pm

Re: routing reference voltage to GPIO pin while WIFI is enabled

Postby sraposo » Fri Aug 06, 2021 2:31 pm

To whom it may interest, a tip on ADC recalibration:

I could not find a way to make function "adc_vref_to_gpio" works but I've got other solution to deal with ADC calibration: to edit
"vref" field in "esp_adc_cal_characteristics_t" struct, that's the last parameter in function "esp_adc_cal_characterize".

After executing "esp_adc_cal_characterize", "vref" field is written with a value obtained from that ESP32 unit. So, you can modify such a content to trim the value ADC outputs, if you find factory-written value is not performing well.

Other fields in "esp_adc_cal_characteristics_t" struct may also useful to costumize ADC for some special need.

Who is online

Users browsing this forum: No registered users and 153 guests