ADC1 attenuation: ADC_ATTEN_MAX

Posts: 4
Joined: Wed Feb 05, 2020 6:29 pm

ADC1 attenuation: ADC_ATTEN_MAX

Postby sergiomarina » Thu Jul 16, 2020 7:50 pm

I set atten to "ADC_ATTEN_MAX" since it was offered by VSC IntelliSense.
I got the following error:
E (318) RTC_MODULE: C:/esp/esp40branch/esp-idf/components/driver/rtc_module.c:1459 (adc1_config_channel_atten):ADC Atten Err
I'm using ESP-IDF branch 4.0. Menuconfig default except flash size (2MB -> 4MB) and the tick rate (100 -> 1000)

Am I doing a mistake? And I should keep "ADC_ATTEN_DB_11" instead?

other info:
eFuse Two Point: NOT supported
eFuse Vref: Supported
Characterized using eFuse Vref
due to error here above I had coeff_a = 0 , coeff_b = 57236, vref = 1065
which I forced to coeff_a = 4000 , b = 470, v = v00

Please, feel free to ask for more info.
Thank you and best regards, S

Posts: 4112
Joined: Thu Nov 26, 2015 4:08 am

Re: ADC1 attenuation: ADC_ATTEN_MAX

Postby ESP_Sprite » Fri Jul 17, 2020 11:48 am

ADC_ATTEN_MAX likely indicates the maximum numerical value in that enumeration; you should indeed not use it to set the attenuation.

Who is online

Users browsing this forum: Google [Bot] and 2 guests