ESP32 - Analog read GPIO 33 affects interrupt on pin GPIO 36?

YigalB
Posts: 11
Joined: Sun Mar 18, 2018 8:41 pm

ESP32 - Analog read GPIO 33 affects interrupt on pin GPIO 36?

Postby YigalB » Wed Jun 07, 2023 12:54 pm

In the ESP32 design, GPIO 36 is connected to a push button and configured as input (that's all it can be anyway). and used to trigger interrupts. This is working well.

I just started to use GPIO 33 as an analog input, to read from a potentiometer, using AnalogRead command. This is working well, tested standalone.

When tested with the main software, it seems that AnalogRead of GPIO 33 is triggering an interrupt on GPIO 36.
When the AnalogRead of GPIO
  1. [Codebox=cpp file=Untitled.cpp]
[/Codebox]33 is disabled, the problem stops. Is there a reason for that?

Another thing: I use PWM (channel 0) - I don't think that is relevant because the ADC is not related to the PWM, right?
Last edited by YigalB on Thu Jun 08, 2023 2:18 pm, edited 1 time in total.

YigalB
Posts: 11
Joined: Sun Mar 18, 2018 8:41 pm

Re: ESP32 - Analog read GPIO 33 affects interrupt on pin GPIO 36?

Postby YigalB » Thu Jun 08, 2023 9:34 am

[/Codebox]33 is disabled, the problem stops. Is there a reason for that?
I am not sure I understand the question - GPIO 33 is not disabled. It is used for analog read.
When analog read, the problem exists interrupts occur suddenly on GPIO 36.
When no analog read from GPIO 33 is done - no problem.

YigalB
Posts: 11
Joined: Sun Mar 18, 2018 8:41 pm

Re: ESP32 - Analog read GPIO 33 affects interrupt on pin GPIO 36?

Postby YigalB » Thu Jun 08, 2023 5:46 pm

I think I have the solution - can anyone confirm?
GPIO36 ,aka VP, is connected to the ADC's voltage.
So any AnalogRead() on another pin (GPIO33 in my case), caused interrupts to be triggered on GPIO36.
So GPIO can't be used as input when the ADC is used. At least not with interrupts.

When I stopped using GPIO36, moving the push button to another free GPIO, problem was solved.

boarchuz
Posts: 606
Joined: Tue Aug 21, 2018 5:28 am

Re: ESP32 - Analog read GPIO 33 affects interrupt on pin GPIO 36?

Postby boarchuz » Thu Jun 08, 2023 6:15 pm

See ESP32 errata, 3.11

YigalB
Posts: 11
Joined: Sun Mar 18, 2018 8:41 pm

Re: ESP32 - Analog read GPIO 33 affects interrupt on pin GPIO 36?

Postby YigalB » Fri Jun 09, 2023 6:30 am


Who is online

Users browsing this forum: No registered users and 120 guests