Page 1 of 1

GPIO Low Level Voltage

Posted: Fri Aug 25, 2023 9:35 am
by Gabry0591
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.

Re: GPIO Low Level Voltage

Posted: Sat Aug 26, 2023 8:33 am
by MicroController
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.

Re: GPIO Low Level Voltage

Posted: Mon Aug 28, 2023 4:52 pm
by Gabry0591
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).

Re: GPIO Low Level Voltage

Posted: Tue Aug 29, 2023 12:44 am
by ESP_Sprite
That pin is connected to the CP2102s Tx pin, which supposedly is always driven to some logic level and never tristated.

Re: GPIO Low Level Voltage

Posted: Tue Aug 29, 2023 8:33 am
by MicroController
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.

Re: GPIO Low Level Voltage

Posted: Wed Aug 30, 2023 8:29 am
by Gabry0591
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.