Reply
Posts: 17
Registered: ‎05-15-2017
Accepted Solution

UART0 baud rate other than 115200

Good afternoon,

 

I'm trying to connect my "EFM8 Universal Bee Starter Kit" to my PC and transfer 4*8 bits at every rising edge of my HTR = 6400 Hz.

 

My understanding of the UART0's baud rate is that it transfers 6400 elements of my UART0_TX_buffer every second. Therefore, my first thought was that setting the UART0 baud rate at 6400*4 baud would be enough to transfer my data. However that didn't work.

 

I then tried to set my baud rate to 10*4*6400=256000baud and the signal looked fine on my oscilloscope! However, my pc didn't recognise the signal. (I send A, B, C, D and received )

My PC has only been able to recognize the signal for a baud rate of 115200 Baud... I've read on internet that 115200 Baud is the maximum speed for UART, is that true? If it is the maximum baud rate, how come my pc doesn't recognize data at lower baud rate? Is there any other way to connect the board to my pc that would allow other baud rates than 115200 baud?

 

Thanks in advance for your help!

 

Hugues

 

PS: I’m using the “UART0_writeBuffer" from the uart0 driver

 

 

Posts: 8,132
Registered: ‎08-13-2003

Re: UART0 baud rate other than 115200

some basic math

baudrate/10 = chars per second thus 115200 will transmit 11,520 chars/sec

 

I googled and found

https://social.msdn.microsoft.com/Forums/en-US/52f2d1e5-b9c3-4d5c-83ca-7c644b7f3a01/com-port-baud-ra...

which states that 115200 is the highest supported baud rate using the standard windows utilities

 

evidently tera term support

13       230400 

 

that should get you by 

erik
<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,173
Registered: ‎04-27-2004

Re: UART0 baud rate other than 115200

[ Edited ]

Therefore, my first thought was that setting the UART0 baud rate at 6400*4 baud would be enough to transfer my data. However that didn't work. 

No surprise, but you did learn from that.... Robot Happy


I then tried to set my baud rate to 10*4*6400=256000baud and the signal looked fine on my oscilloscope! However, my pc didn't recognise the signal. (I send A, B, C, D and received ) 


 

That's closer, but you have no margin here. If that 6400Hz varies, you can have issues.

 


My PC has only been able to recognize the signal for a baud rate of 115200 Baud... I've read on internet that 115200 Baud is the maximum speed for UART, is that true? If it is the maximum baud rate, how come my pc doesn't recognize data at lower baud rate? Is there any other way to connect the board to my pc that would allow other baud rates than 115200 baud? 


This depends on the PC, and port.

What exact serial port are you using ?

Most USB-UARTs are way better than 115200, and modern ones will deliver the closest baud to your request, within limits of their Virtual baud clock, which is usually 12Mhz or 24Mhz.

 

Using the example above, closest above is 12M/46  = 260869 baud

 

next step is to check your EFM8UB Baud - what is your Clock speed ?

 

One possible BAUD rate is  24.5M/2/47  = 260638.2979, very close to the PC side.

This baud can tolerate your 6400 rate to move to 6515.957447 (+1.81%)

Posts: 17
Registered: ‎05-15-2017

Re: UART0 baud rate other than 115200

Good morning,

@erikmI googled tera term and figured out it would allow me to emulate a "faster" port COM. However I might have issues installing it on my work PC (no administrator rights................).

 

 

@jmg

 


jmg wrote:


I then tried to set my baud rate to 10*4*6400=256000baud and the signal looked fine on my oscilloscope! However, my pc didn't recognise the signal. (I send A, B, C, D and received ) 


 

That's closer, but you have no margin here. If that 6400Hz varies, you can have issues.




 

Yes I figured that out as well. If the UART0 transfert isn't done at rising the rising edge of my HTR it skips a period. (see oscillogram attached) => everything will work fine if I take some margins Robot Happy

Howerver, I will have to increase my baud rate a lot more. In my final program I will also have a SPI transfert within every period of the HTR and I calculated my UART0 baud rate would have to be around 700 000 baud (if not more).

 

I should be able to figure this out once I manage to set baud rates other than 115200!

 

 

 


jmg wrote:


My PC has only been able to recognize the signal for a baud rate of 115200 Baud... I've read on internet that 115200 Baud is the maximum speed for UART, is that true? If it is the maximum baud rate, how come my pc doesn't recognize data at lower baud rate? Is there any other way to connect the board to my pc that would allow other baud rates than 115200 baud? 


This depends on the PC, and port.

What exact serial port are you using ?

Most USB-UARTs are way better than 115200, and modern ones will deliver the closest baud to your request, within limits of their Virtual baud clock, which is usually 12Mhz or 24Mhz.

 

Using the example above, closest above is 12M/46  = 260869 baud

 

next step is to check your EFM8UB Baud - what is your Clock speed ?

 

One possible BAUD rate is  24.5M/2/47  = 260638.2979, very close to the PC side.

This baud can tolerate your 6400 rate to move to 6515.957447 (+1.81%)


You can find attached some details on my COM port. I simply plugged the board to my pc using the mini-usb cable.

My CLK speed is 24,5 MHz (PRESCALE = 1).

I tried a baud rate of 260638 baud but again my pc didn't seem to "understand" the data => it displays: ...@ë@ë@ë@ë@ë@ë@ë...

I'm gonna try to run my program on a PC that has administrator rights. If that doesn't work I really don't know what to do....


Thanks @jmg and @erikm for your time,

Hugues
<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,173
Registered: ‎04-27-2004

Re: UART0 baud rate other than 115200


I'm trying to connect my "EFM8 Universal Bee Starter Kit" to my PC ....
My PC has only been able to recognize the signal for a baud rate of 115200 Baud...  

.....

Port COM.PNG ‏80 KB

 

Ahh... oops, I missed that you may be using the EFM8UBx VCOM port.

Yes, that has an issue that it can only do 115200 right now, I understand there is a firmware fix coming, somewhere in the depths of SiLabs..

 

If you want other than 115200, for now, you need to use an external USB-UART

Something like CP2102N-MINIEK

 

 

 

 

Posts: 17
Registered: ‎05-15-2017

Re: UART0 baud rate other than 115200

@jmgthanks for your fast answer.

 

Is there really nothing I can do with this board for now? Isn't there another way than UART to connect the board to the PC?

 

Hugues

<a href="http://community.silabs.com/t5/Welcome-and-Announcements/Community-Ranking-System-and-Recognition-Program/m-p/140490#U140490"><font color="#000000"><font size="2">Hero</font></font> </a> jmg
Posts: 1,173
Registered: ‎04-27-2004

Re: UART0 baud rate other than 115200


 Is there really nothing I can do with this board for now? Isn't there another way than UART to connect the board to the PC? 


Because the firmware is fixed at 115200, sure you can do anything you like with that board, but it must be at 115200 Robot Happy  (eg you could temp debug by sending only one char, not 4 )

If you want to use a different baud speed, you have to add some external additional UART and connect that to the TXD.RXD pins, with suitable contention checks.

Posts: 3,092
Registered: ‎02-07-2002

Re: UART0 baud rate other than 115200

The Segger JLink is like the old T-Ford which came in every color as long as it's black. The VCOM on the JLink can do any baudrate as long as it's 115200.

Posts: 17
Registered: ‎05-15-2017

Re: UART0 baud rate other than 115200

I see, if the problem comes from J-link it should work if I directly connect the TX-RX pins to my PC. I will try something and will keep you informed if it works out!

Thanks a lot for yout help @vanmierlo@jmg and @erikm! I keep being surprised by how poorly documented simplicity studio is, despite all my good efforts it seems impossible to make the board work without the forum's help.

Highlighted
Posts: 2,308
Registered: ‎10-14-2014

Re: UART0 baud rate other than 115200

Posts: 17
Registered: ‎05-15-2017

Re: UART0 baud rate other than 115200

I solved the problem by connecting the microcontroller to the PC through a MAX3227E. For those who might not have understood yet, the issue is the J-link driver (on the pc).