GPIO Low Level Voltage

Gabry0591
Posts: 3
Joined: Fri Aug 25, 2023 8:50 am

GPIO Low Level Voltage

Postby Gabry0591 » Fri Aug 25, 2023 9:35 am

Hello Community,

I experienced a strange behavior on the ESP32-C3-DevKitC-02v1.1 module.
I configured GPIO10 and GPIO20 to generate two identical PWM output signals. I measured both output signals with an oscilloscope and found that the low level of GPIO20 was not as low as expected. It is close to 700 mV. In contrast, the output level of GPIO10 is correctly close to 0 V.
The reference manual states that GPIO20 can have a special function (UART-RX) but it can also be configured as a generic GPIO.
Has anyone experienced the same problem? I also tried with another board but got the same result.
I have attached oscilloscope pictures of the output signals measured directly on GPIO10 and GPIO20 (reference ground is taken from the pin between GPIO10 and GPIO20).
This problem is causing another board controlled by GPIO20 to malfunction.

Thanks to anyone who replies.
Attachments
GPIO20.png
GPIO20.png (24.72 KiB) Viewed 3258 times
GPIO10.png
GPIO10.png (23.87 KiB) Viewed 3258 times
Last edited by Gabry0591 on Mon Aug 28, 2023 7:00 am, edited 1 time in total.

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: GPIO Low Level Voltage

Postby MicroController » Sat Aug 26, 2023 8:33 am

The devkit has an on-board CP2102 USB<->serial converter which is connected to U0RXD (GPIO20) and U0TXD (GPIO21), so the CP2102 is effectively driving GPIO20.

Gabry0591
Posts: 3
Joined: Fri Aug 25, 2023 8:50 am

Re: GPIO Low Level Voltage

Postby Gabry0591 » Mon Aug 28, 2023 4:52 pm

Thank MicroController for your reply.
The U0RXD (GPIO20) is driven by the CP2102 during the ESP32 programming, however after this phase, in the manual, it is reported that GPIO20 can be used as a generic GPIO thanks to proper GPIO matrix configuration. Indeed, I'm able to generate an output PWM signal from that pin. However, I found that the low level of that signal is not so low (near 700 mV) and I do not understand why.
(Reading the CP2102 datasheet it seems that there are not pull-ups on the U0RXD pin).

ESP_Sprite
Posts: 9730
Joined: Thu Nov 26, 2015 4:08 am

Re: GPIO Low Level Voltage

Postby ESP_Sprite » Tue Aug 29, 2023 12:44 am

That pin is connected to the CP2102s Tx pin, which supposedly is always driven to some logic level and never tristated.

MicroController
Posts: 1708
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: GPIO Low Level Voltage

Postby MicroController » Tue Aug 29, 2023 8:33 am

Gabry0591 wrote:
Mon Aug 28, 2023 4:52 pm
However, I found that the low level of that signal is not so low (near 700 mV) and I do not understand why.
(Reading the CP2102 datasheet it seems that there are not pull-ups on the U0RXD pin).
Note that in (UART) serial communication the signal is high when idle. So while not sending any data, the CP2102 actively outputs a high level to U0RXD, while your code/ESP tries to output a low level on the same pin at the same time.

Gabry0591
Posts: 3
Joined: Fri Aug 25, 2023 8:50 am

Re: GPIO Low Level Voltage

Postby Gabry0591 » Wed Aug 30, 2023 8:29 am

Now, it is clear to me. I was neglecting the high level of the idle state of the UART. Thanks to MicroController and ESP_Sprite.

Who is online

Users browsing this forum: Bing [Bot] and 112 guests