Esp32-wroom, problem reading GPIO36 as analog input

Hello,

I have a project in which I use GPIO36 (ADC1_CHANNEL_0) as analog input and everything worked fine until I updated the esp32 core to latest version (4.4). I was previously running the one-year old V3.3.

With the new core, the value returned by 'analogRead(36)' is rather non linear (I can still read 0 or 4095 but, for example, with 1/2Vdd input I read 4095 instead of ~2047). I get ~3000 with a voltage near to zero on the pin.

I read in the esp32 documentation that this pin is shared with an internal hall sensor, but for some reason, this was not an issue with the older core.

I compared the adc-related source code and found that the hallRead function used to initialize and deinitialize some internal registers, I tried to do the same in the hope to get the hall sensor disabled but got no result.

Is there anybody that knows how to get back the analog GPIO36 capability as it was on the V3.3 core?

Thanks a lot and Best Regards
Alessandro, Italy

What does Espressif say about this issue? Espressif wrote the core. clicky, clicky for the Espressif site.