ESP32 UART-USB Brige How to use

For general Flowcode discussion that does not belong in the other sections.
stefan.erni
Valued Contributor
Posts: 1077
http://meble-kuchenne.info.pl
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 228 times

ESP32 UART-USB Brige How to use

Post by stefan.erni »

Hi to All

I use a Atom S3 with a display. It's working nice with an extern AD converter and shows the values on display.
But I can not send the values to the App-developper
I found a help in the internet, there is an intern UART-USB Brige.
How can I use it?
Select UART0.
Enter the default pins of the ESP32-S3:
TX → GPIO43
RX → GPIO44
Even if you do not wire the pins, Flowcode will know which UART it refers to, and the output will be correctly transmitted to the PC via the USB-CDC port
Uart port:
2025-08-22_10-18-51.PNG
2025-08-22_10-18-51.PNG (53.85 KiB) Viewed 723 times
Testprogram:
Post-ESP32_S3_Display2_MCP.fcfx
(64.11 KiB) Downloaded 20 times

medelec35
Matrix Staff
Posts: 2101
Joined: Wed Dec 02, 2020 11:07 pm
Has thanked: 652 times
Been thanked: 705 times

Re: ESP32 UART-USB Brige How to use

Post by medelec35 »

Hi Stefan.
Have you looked at all the PC developer projects here.
There are projects that use USB for communicating between hardware and PC developer using USB
Martin

stefan.erni
Valued Contributor
Posts: 1077
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 228 times

Re: ESP32 UART-USB Brige How to use

Post by stefan.erni »

Hi Martin

Yes, right now again. If the board has a UART to USB bridge (for example, CH340C), it works very well.
I have already done many projects with it, and that work very well with the Appdevelopper.


Now the problem:
Many new supermini boards with ESP32-C3, ESP32-C6, ESP32-S3 no longer have an additional IC (UART-USB bridge) on the board.
However, Flowcode does not yet support a direct USB connection for the ESP32.

There is another option for the small ESP-S3 chip.
The ESP32 S3, which has a UART-USB bridge integrated into the chip, as I understand it.
It can be used with uart0 and set TX/RX on GPIO 43 and GPIO 44.

I just don't know exactly how that works with Flowcode.

stefan.erni
Valued Contributor
Posts: 1077
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 228 times

Re: ESP32 UART-USB Brige How to use

Post by stefan.erni »

Hi Martin

I am not yet able to establish a connection between the ESP32-S3 and the PC.
However, I have more information on this.

https://github.com/espressif/esp-usb-bridge

mnfisher
Valued Contributor
Posts: 1659
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 764 times

Re: ESP32 UART-USB Brige How to use

Post by mnfisher »

I'll have a look- it should be possible using the OTG USB interface...

Martin

mnfisher
Valued Contributor
Posts: 1659
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 764 times

Re: ESP32 UART-USB Brige How to use

Post by mnfisher »

Hi Stefan,

Can you try this - run idf.py menuconfig
component config - esp system settings - channel for console output -> Set this to USBSerial/JTAG Controller

NB - target must be set as an esp32s3 (idf.py set-target esp32s3)

Check if usual debug is then sent to USB (using PuTTY for exanple)

Then try using a UART on Pins 19 and 20

I don't have an s3 to test :-(

Martin

stefan.erni
Valued Contributor
Posts: 1077
Joined: Wed Dec 02, 2020 10:53 am
Has thanked: 201 times
Been thanked: 228 times

Re: ESP32 UART-USB Brige How to use

Post by stefan.erni »

Hi Martin

I understand there are two ways to use USB: as very fast USB OTG and with the built-in bridge.
I have tried both, but without success.

I'll take a closer look at it.
The ESP32 S3 can be easily programmed with Flowcode.
I will use the small, inexpensive Seed and the Atom S3 display.
I have made a list of various manufacturers if you want an S3.
There are many other ESP32 S3 modules that are very practical.

Seed:
2025-08-28_12-01-12.PNG
2025-08-28_12-01-12.PNG (453.67 KiB) Viewed 503 times
https://www.digikey.ch/de/products/deta ... 4/19285530

Adafruit small:
2025-08-28_12-10-25.PNG
2025-08-28_12-10-25.PNG (472.36 KiB) Viewed 503 times
https://www.digikey.ch/de/products/deta ... 6/21283802

Adafruit comfortable:
2025-08-28_12-12-44.PNG
2025-08-28_12-12-44.PNG (609.61 KiB) Viewed 503 times
https://www.digikey.ch/de/products/deta ... 7/16583982

Sparkfun comfortable:
2025-08-28_12-26-15.PNG
2025-08-28_12-26-15.PNG (650.65 KiB) Viewed 503 times
https://www.digikey.ch/de/products/deta ... 3JyAF0AvkA

From M5 Stack:
2025-08-28_12-07-21.PNG
2025-08-28_12-07-21.PNG (699.73 KiB) Viewed 503 times
https://shop.m5stack.com/

mnfisher
Valued Contributor
Posts: 1659
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 764 times

Re: ESP32 UART-USB Brige How to use

Post by mnfisher »

I tried the TinyUSB component too - but couldn't get it to compile :-( (5.5 or 5.4)

Seemed to be an issue with downloading it - will have a look at the examples too.

mnfisher
Valued Contributor
Posts: 1659
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 764 times

Re: ESP32 UART-USB Brige How to use

Post by mnfisher »

Hi Stefan,

I got a esp32-s3 board and tried this....

If I open a UART and try to write - I get
Leaving...
Hard resetting via RTS pin...
Executing action: monitor
Running idf_monitor in directory D:\Projects\Flowcode\Flowcode1
Executing "C:\Espressif\python_env\idf5.4_py3.12_env\Scripts\python.exe C:\Espressif\frameworks\esp-idf-v5.4.1\tools/idf_monitor.py -p COM5 -b 921600 --toolchain-prefix xtensa-esp32s3-elf- --target esp32s3 --revision 0 D:\Projects\Flowcode\Flowcode1\build\Flowcode1.elf --force-color -m 'C:\Espressif\python_env\idf5.4_py3.12_env\Scripts\python.exe' 'C:\Espressif\frameworks\esp-idf-v5.4.1\tools\idf.py' '-p' 'COM5' '-b' '921600'"...
--- Warning: GDB cannot open serial ports accessed as COMx
--- Using \\.\COM5 instead...
--- esp-idf-monitor 1.7.0 on \\.\COM5 921600
--- Quit: Ctrl+] | Menu: Ctrl+T | Help: Ctrl+T followed by Ctrl+H
ESP-ROM:esp32s3-20210327
Build:Mar 27 2021
rst:0x15 (USB_UART_CHIP_RESET),boot:0x23 (DOWNLOAD(USB/UART0))
Saved PC:0x40041a79
--- 0x40041a79: ets_delay_us in ROM
waiting for download
--- Error: ClearCommError failed (Permiss
However - if I use printf (so I used printf("Hello world\r\n"); in a code block) then I get output sent to the USB port..

On initial connection - I had to press and hold boot and press and release reset to get Windows to recognise the device.

On 'locking' the device - I find reset does the trick - although after attempting to open UART (channel 2) I need to 'boot + reset' again.

I'm using 'idf.py -p COMn -b 921600 flash monitor' to upload and 'run' my chart. (Where n = 5 for me)

Have you had any more success?

mnfisher
Valued Contributor
Posts: 1659
Joined: Wed Dec 09, 2020 9:37 pm
Has thanked: 142 times
Been thanked: 764 times

Re: ESP32 UART-USB Brige How to use

Post by mnfisher »

Testing again - using UART channel 1 (and default pins!) - I get Hello World output to USB - this still from printf(); - nothing from SendString() :-(

There are a couple of (extra) blank lines between them - but otherwise - running okay (rather than 'crashing' as before)

Martin

Post Reply