ISR on pin 39 is broken by ADC / Touch Screen inputs on pin 32,33

RacerX10
Posts: 4
Joined: Tue Jul 25, 2023 3:20 pm

ISR on pin 39 is broken by ADC / Touch Screen inputs on pin 32,33

Postby RacerX10 » Tue Jul 25, 2023 9:02 pm

I have an application where I have a LCD touch screen on pins 32/33/25/26 (analog read on 32/33) and separately an ISR that is triggered on pin 39.

For some reason, the ADC on pins 32/33 for the touch screen, when enabled, are keeping the ISR from running in a timely manner. The ISR (it's measuring period / frequency of a signal on 39) works perfectly when I don't do the ADC on 32/33, but as soon as I uncomment that line of code that does the ADC, the values coming from the ISR on pin 39 are all wrong / random-ish.

I've tried moving the ISR to Core0, leaving everything else on Core1 but that didn't seem to help.

Any ideas ? Thanks in advance !

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

Re: ISR on pin 39 is broken by ADC / Touch Screen inputs on pin 32,33

Postby boarchuz » Wed Jul 26, 2023 3:52 am

Possibly ESP32 errata 3.11:
When certain RTC peripherals are powered on, the inputs of GPIO36 and GPIO39 will be pulled down for approximately 80 ns.


"Certain RTC peripherals" includes ADC1.

RacerX10
Posts: 4
Joined: Tue Jul 25, 2023 3:20 pm

Re: ISR on pin 39 is broken by ADC / Touch Screen inputs on pin 32,33

Postby RacerX10 » Wed Jul 26, 2023 2:10 pm

I guess I assumed the way that was worded that the 80ns thing was a one-time deal at power up

I'm experiencing this issue repeatedly.

I did move my ISR to trigger on GPIO12 instead, and the problem went away. It'll mean a PCB change but that does mean it's definitely something up with GPIO39 and ADC.

Who is online

Users browsing this forum: No registered users and 23 guests