Console baudrate
Moderators: adafruit_support_bill, adafruit
Please be positive and constructive with your questions and comments.
- nelfata
- Posts: 31
- Joined: Wed May 07, 2014 9:44 am
Console baudrate
How to change the console baud rate?
- westfw
- Posts: 2006
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Console baudrate
On which platform? Most of the circuitPython-capable boards use a direct USB connection for the "console", and baudrate there is irrelevant.
- nelfata
- Posts: 31
- Joined: Wed May 07, 2014 9:44 am
Re: Console baudrate
Thanks for your reply.
I am using the nRF52840 DK, the USB shows up on my PC as a COMPORT and I would like to change the baudrate from 115200 to a higher rate.
I am using the nRF52840 DK, the USB shows up on my PC as a COMPORT and I would like to change the baudrate from 115200 to a higher rate.
- Franklin97355
- Posts: 23903
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Console baudrate
OK, what programming language are you using and what are you using to communicate? Do you want to increase the speed of the board or the speed of the computer that connects to the board?
- nelfata
- Posts: 31
- Joined: Wed May 07, 2014 9:44 am
Re: Console baudrate
I can either build Circuitpython from source code, or use some boot.py setting to change the console baud rate (communication between a Circuitpython board and the PC, as I mentioned the COM port).
- Franklin97355
- Posts: 23903
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Console baudrate
Great, glad you figured it out.nelfata wrote:I can either build Circuitpython from source code, or use some boot.py setting to change the console baud rate
- nelfata
- Posts: 31
- Joined: Wed May 07, 2014 9:44 am
Re: Console baudrate
I was only saying that I can build the code if need be, but searching through the code I could not find a place where the baudrate is set to change the console speed.
In other words, I saw the setting of 115200 but changing it did not make a difference. So no luck yet.
In other words, I saw the setting of 115200 but changing it did not make a difference. So no luck yet.
- Franklin97355
- Posts: 23903
- Joined: Mon Apr 21, 2008 2:33 pm
Re: Console baudrate
What program are you trying to chane the baudrate with?
- nelfata
- Posts: 31
- Joined: Wed May 07, 2014 9:44 am
Re: Console baudrate
No worries, I will figure it out. Thank you for your response.
- westfw
- Posts: 2006
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Console baudrate
I am pretty sure that the nRF52 chips are among those "direct USB" chips where the baud rate setting is irrelevant.I am using the nRF52840 DK, the USB shows up on my PC as a COMPORT and I would like to change the baudrate from 115200 to a higher rate.
You can check by changing the speed of your terminal emulator (say, to 9600) - if there's an actual serial port, it will stop communicating. If it's got HW USB, it will proceed at the same rate it's always used.
That doesn't mean that it's as fast as you'd want it to be. All sorts of things can slow down the end-to-end data rate, and I think I've seen some "pretty poor" benchmarks for USB data speed (but on a different CPU.) Also, I've looked at some of the USB code and been pretty shocked by how many times the data was copied :-( And the radio-equipped chips usually run some sort of OS, which can introduce additional inefficiencies.
- nelfata
- Posts: 31
- Joined: Wed May 07, 2014 9:44 am
Re: Console baudrate
Yes it seems that the baud rate is irrelevant. But I was not expecting this behavior, I used Putty and set the baud rate to 9600 and it still worked at whatever speed, it seems that the driver is ignoring the baud rate settings.
Thank for the reply.
Thank for the reply.
- westfw
- Posts: 2006
- Joined: Fri Apr 27, 2007 1:01 pm
Re: Console baudrate
It's a bit surprising, but it makes sense. USB is going to operate at a (fundamental) data rate of 12Mbps, but that's packetized and shared amongst all the devices connected to a hub port (although some of them will be low-speed 1.5Mbps and some High-Speed 480Mbps, and maybe even some "Super-Speed"...)
Although the software and firmware makes the connection LOOK like a COM port, there is no actual hardware any where in the path that limits the "baud rate" (such as an actual UART.) Artificially limiting the data transfer rate would be significantly more complex to implement than just operating at however fast the USB subsystems push the data...
Although the software and firmware makes the connection LOOK like a COM port, there is no actual hardware any where in the path that limits the "baud rate" (such as an actual UART.) Artificially limiting the data transfer rate would be significantly more complex to implement than just operating at however fast the USB subsystems push the data...
- tannewt
- Posts: 3298
- Joined: Thu Oct 06, 2016 8:48 pm
Re: Console baudrate
The baudrate is communicated over USB in case the connected device is actually transmitting over UART (which it isn't usually in CircuitPython.)
Please be positive and constructive with your questions and comments.