If the same function is used on a physical serial port (of which there are a few on ESP32 iirc) the baudrate argument will be used to set the baudrate setting in the peripheral by the library.
Setting the baud rate does actually do something (just follow the baudRate parameter here: https://github.com/espressif/arduino-esp32/blob/master/cores...), it just doesn't affect the output speed of the USB serial output.
If you specify non-default pins for the serial output (i.e. you're opening a second serial connection to talk to another piece of hardware) the begin() method does influence the data rate.
Also, there are dev boards out there that do actually use a TTL converter and USB-to-serial converter to access the standard serial port, though they're not very common as far as I can tell, so I wouldn't just assume the baud rate setting does nothing on the standard pins either.
> What on earth is going on?
>
> Well, my board is based around an ESP32-S3. This has native USB support - and the serial connection is running over the USB connection.
>
> We don’t have a USB-to-serial converter on the board.
>
> There is no UART.
>
> Which means there’s no actual baud rate (this is not strictly true, it is possible to find out what the baud rate was set to - but that’s for another day).
whatever1•5mo ago
LiamPowell•5mo ago
blkhawk•5mo ago
f1shy•5mo ago
One thing is happening: as uC (and ASIcs) are getting more complex and complicated, more features are added and not fully (or at all) documented.
estimator7292•5mo ago
Love Atmel. They're not perfect, but they're very good and they try pretty hard.
TI deleted all the I2C register programming information (40 pages!) from the docs for a widget I was using and it took them months to put it back. The device was literally unusable in any form without that information. Insane.
ocdtrekkie•5mo ago
But I think this is a space where due to the relative ease and cheapness of putting out a product and often fixing it after the fact, there's less eyeballs on any given aspect of a board or the software loaded on it.
And a years younger me noticed the issue! But I worked around it instead of reporting it. This time I figured out the source of the problem... but the documentation has been wrong a long time in between. ;)
estimator7292•5mo ago
I found one just yesterday where the main entry point returns a byte value. It returns 'false' on error, and '0' on success. It may also sometimes return a non-zero error code. You can see why this design would be problematic.
elcritch•5mo ago
In my experience all of the low level code on uC’s is just short of horrible. That’s ST, NXP, etc, are just full of terrible kludges. Then again some of the Linux kernel drivers can be rough too.
The only vendor I’ve heard has good code and documentation is Raspberry Pi Foundation on their silicon.
riedel•5mo ago
Catbert59•5mo ago
They still are.
No vendor until now was able to push out microcontrollers with a solid Wifi integration. Sometimes you can find weird 2-chip-solutions.
I still wonder why ST doesn't bring one. That device would be a multi-billion-business.
05•5mo ago
Catbert59•5mo ago
Maybe some basic stuff like usart, i2c works fine. But the the deeper you dig into the specialties the more you will have problems.
And STM32s and expensive? Maybe if you buy them from Digikey or Mouser. With the right distributor they are dirt cheap.
05•5mo ago
Catbert59•5mo ago
Porting stuff to another microcontroller would be easy as we are not using too proprietary features... as long the uC has SPI/I2C and a bunch of timers the embedded developers will be happy. Thanks to Zephyr.
05•5mo ago
That only gets you proper support for a couple vendors (Nordic, ST), everything else is a nightmare. Even with better-supported vendors, there are whole swaths of things that aren't properly supported and you need to directly call code from underlying vendor SDK to make things work. That bodge makes the whole project non-portable. Even some simple things like ADC DMA on ST F1 series..
Catbert59•5mo ago
Sometimes stuff is missing. But that's implemented and upstreamed quickly.
estimator7292•5mo ago
Catbert59•5mo ago
For SWD you can one of the ST-Link clones or the free open implementations of it.
estimator7292•5mo ago
It didn't. Every piece of documentation I could find said that it did, but it would never respond. Forums were full of people complaining about this problem for years with no response from ST. No datasheet or marketing update, no errata. You just get a useless chip and it's your problem now. They also never responded to any of my direct emails or messages.
Every time I've tried an ST part, it's been hell and I eventually gave up and used an Atmel part instead. Every time.
Catbert59•5mo ago
MalbertKerman•5mo ago
Oh how the mighty have fallen. I've only worked on one major project with a Microchip MCU (PIC32MK), but their documentation and support were terrible. No detailed documentation, just a driver library with vague, sketchy API docs and disgustingly bug-ridden code. Deadlocking race conditions in the CAN driver, overflow-unsafe comparisons in timers, just intern-level dumbassery that you couldn't fix without reverse engineering the undocumented hardware. Oh, and of course what documentation did exist was split into dozens of separate PDFs, individually served, many of which were 404 unless you went hunting for older versions or other chips in the product line. It certainly cured me of any desire to touch another Microchip product.
Catbert59•5mo ago
This is more about the application running on that device.
ACCount37•5mo ago
publicmail•5mo ago
estimator7292•5mo ago
TI (a major American IC manufacturer) regularly shits out half baked datasheets missing important information or incomplete explanations of equations. All the American vendors have terrible documentation.
baby_souffle•5mo ago
And half the time you don’t even find out until you’ve created an account and signed an NDA!
Nordic and espressif are some of the good ones, they’re showing up on a lot of my designs for this reason…
estimator7292•5mo ago
elcritch•5mo ago