This Number Does Nothing… when you have native USB
read
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi
This video's all about how the baud rate setting on an ESP32S3 with native USB does absolutely nothing. Testing with different baud rates showed no effect on performance; every rate worked flawlessly. With USB full speed, you can expect data transfers of up to 7 megabits per second. So, baud rate? Totally irrelevant with native USB—it's full steam ahead, folks! Grab my test code from GitHub, give it a go, and share your results in the comments. If that blew your mind, don't forget to like and subscribe for more ESP32 insights!
Related Content
Transcript
Related Videos
ESP32 SD Card Speedup With a Couple of Lines of Code - In this video, we explore the disappointingly slow data writing speed of the ESP32 when reading and writing to an SD card in our TinyTV project. With 500 kilobytes/sec reading and a dismal 270 kilobytes/sec writing, we embark on an adventure to find a solution. After ditching the Arduino code in favor of IDF functions, we discover incredible improvements. Seeing potential risks, I propose a truly bonkers plan: using a IC to interface SD cards with USB with a USB multiplexer switch and another switch to alternate between ESP32 and the GL823. This could be a total disaster, but I'm game for the challenge. Stay tuned to see if it works out!
How to make your ESP32-S3 code faster. - I put my ESP32-S3 dev board from PCBWay through a quick performance workout by decoding a baked-in animated GIF with Larry Bank’s decoder and tweaking ESP-IDF settings. Cranking the CPU to 240MHz gave the expected ~1.5× bump, -Os beat -O2, switching flash from DIO to QIO shaved a bit more, and turning the caches up to 11 pushed it further. Best combo: 240MHz, -Os, QIO, max caches (with a larger partition and watchdog off). Nice little speed win.
My ESP32S3 Thinks It's a WebCam! - I turned a vanilla ESP32-S3 dev board into a USB UVC webcam that doesn’t use a camera at all—first streaming a static test card, then an animated GIF, and finally a real-time Pong game. The ESP32 pre-decodes GIF frames to RGB, JPEG-encodes them, and streams MJPEG, and for the live game it renders to a framebuffer, JPEG-encodes in ~23 ms, and just about hits 30 fps. There’s room to optimize (dual-core draw/encode), and this approach is great for dashboards, sensor visualizations, or testing video pipelines. Shout out to PCBWay for the boards—they turned out great.
Super Easy ESP32-S3 Dev Board - Making an ESP32-S3 dev board is way easier than it looks. I simplify the datasheet reference: skip the external crystal, wire native USB D+/D− (pins 19/20) straight to a USB-C with 5.1k CC pulldowns, add a BOOT switch and an EN RC reset, and power it with an LD117 LDO that’s happy with ceramic caps. In KiCad I build the schematic with Espressif libraries, add LEDs for 5V, 3V3, and a blink GPIO, set up net classes, route a clean USB differential pair, stitch a solid ground plane, and label everything. It’s a bit wide—just gang breadboards together—and you end up with a neat, professional S3 dev board you can flash and debug over USB.
ESP32 Super Fast JPEG Decoder - 20ms! - In my exploration for the fastest JPEG decoder for the ESP32, I trod a path from the original JPEG decoder library at 109 milliseconds, to the accelerated TJPEG decoder at 55 milliseconds, and finally the impressive JPEG dec library at 32 milliseconds. But wait, there's more. Along came a GitHub issue suggesting decoding JPEG with SIMD, efficiently working wonders at a decoding speed of just 20 milliseconds. However, it threw a curveball when it came to drawing. The decoding process doesn't overlap with the pixel transfer making it slower than expected. It does bring great benefits for streaming JPEGs though, as the decoding of the next frame can start while the current one is loading. But the space this library would expropriate, around 130 kilobytes, from the memory of an ESP32 module can be an issue. Yet, there are promising improvements marching on the horizon, so stay tuned for the upcoming enhancements!
Related Posts
This number does nothing - Ever wondered about the ubiquitous 'Serial.begin(115200);' in your Arduino projects? It turns out, with boards like the ESP32-S3 offering native USB support, this baud rate doesn't really matter when streaming data. My tests even showed surprising results with different speeds using Arduino and ESP-IDF, highlighting potential in USB full-speed capabilities. I dove into raw performance testing, and saw deviations from expected UART limits. Check out the full video and explore the results if you're curious about maximizing your data transfer speeds!
ESP32-S3 USBMSC - Can we make it faster? - After lots of tinkering, I've managed to improve the speed of writing to the SD Card of my ESP32-TV considerably, but it's still not as fast as I'd like. The Arduino 'readRaw' and 'writeRaw' functions were the culprits, they can only write one sector at a time! After bypassing this and using IDF functions, writing speed improved by 70%. I also experimented with writing to the SD Card in the background, which ironically yielded even better results. However, it's still slower than I'd like, so I've got a crazy new plan: using a cheap IC (GL823) for SD card interfacing and a USB multiplexer switch to swap connections between ESP32 and GL823. It's a wild ride, but that's how we make progress!
ESP32-S3 USB UAC - I turned my new ESP32‑S3 board into a USB Audio device. After a ninja LED fix and confirming the IMU and charging, I streamed mic audio over Web Serial (with a slick AI-made ‘Audio Studio’) and then via USB UAC. The mic sounds great, but the speaker is crackly over UAC—even though I2S WAV playback is perfectly clean. ESP-IDF worked; Arduino didn’t. Bonus annoyance: macOS vs Windows is a toggle, not a combo. Still, this board passes QA.
ESP-IDF v6 in VS Code: Blink (and debug) on the ESP32-S3 - I finally crawled out of the v5.x cave, installed ESP-IDF v6.0.1 with the VS Code extension, spun up the Blink example on an ESP32-S3, fixed a finicky flash by switching to UART, then used menuconfig to set the LED pin, bump the CPU to 240 MHz, use the full 16 MB flash, and enable 8 MB PSRAM. Wrapped it up with proper USB JTAG debugging in VS Code. If you’ve been putting off the IDF, v6 in VS Code is a super-smooth on-ramp.
I Made My ESP32-S3 Faster by Optimizing for SIZE — Not Speed - I tuned a hot path on an ESP32-S3 and found the counter-intuitive winner: optimizing for size (-Os) beat optimizing for speed (-O2). On this chip, flash latency and instruction cache behavior dominate—tighter code stays in cache, misses less, and runs faster. Bumping the CPU to 240 MHz, switching flash to QIO, and maxing caches helped too, but -Os still edged out -O2. As always, benchmark your own workload—yours might differ.
This number does absolutely nothing.
Nothing.
Nothing. Nothing. What does that mean?
You will find this line of code
everywhere. A quick search of GitHub
finds over 450,000 examples. I
discovered this while testing my new
boards from PCB way. And despite a small
mistake on my part, they nailed the
build completely. Everything works
beautifully. But I needed to transfer a
lot of data over serial. And I thought
maybe I should bump up the board rate.
We can go from a very snails pace 9,600
bits pers through the classic 56k that
I’m sure a lot of you remember
all the way up to number 11 with 921600
which gives you a smashing 115 kilob per
second. The numbers all go to 11.
But here’s the catch. The ESP32S3
doesn’t have a USB to UART chip. It has
native USB. So if there’s no UART clock,
what does this board rate actually do?
So I tested it different board rates and
every single one worked flawlessly. I
first tried it out using the serial
monitor. The firmware is set to 115200,
the classic setting, and the monitor is
set to the same rate. And as you’d
expect, it works without any issues. The
firmware just echoes a capitalized
version of what it receives. Then I
tried changing the monitor speed to
9,600 and it still works perfectly.
What’s going on? To really test it, I
wrote a script. It enumerates a whole
bunch of board rates and as you can see,
they all work perfectly. The board rate
number does nothing. So if board rate
doesn’t matter, how fast can we actually
go? Well, USB full speed runs at 12
megabits pers with overhead. The maximum
we should be able to get should be
around 9.6 megabits pers. So, I wrote
some new firmware that just blasts out a
4 megabyte packet. And I wrote a simple
script on my computer that receives the
data and tests the speed. Just to make
sure that no one’s cheating, I included
a CRC check. The result for my Arduino
version of the code, we get over 7
megabits per second. That’s nearly 1
megabyte a second. For you IDF fans, I
tried the same with tiny USB and I got 5
megabits pers. Surprisingly, not as
fast, but there is a hope for you IDF
fanboys. It is being worked on. There
are some issues on the tiny USB
implementation. Now, of course, this is
just test code. Real applications may be
slower. But here’s the takeaway. With
versions of the ESP32 with native USB,
board rate doesn’t matter. With older
chips that do use USB to UART bridges,
you’re stuck with the UART limits. I put
all my test code on GitHub. There’s a
link below. Try it out yourselves and
let me know what speeds you get in the
comments. And if this surprised you, hit
the like and subscribe. I’ve got more
ESP32 deep dives coming soon.
HELP SUPPORT MY WORK: If you're feeling flush then please stop by Patreon Or you can make a one off donation via ko-fi