7 years, 8 months ago.

UART Buad Rate: Nonstandard rates are possible? Ex: 10400?

Is it possible in mbed in general?

thanks

A standard PC UART will not be able to frame @ 10400 without a few tweaks (ie. alter the UART clock source). Found an article on how to support the FTDI USB UART for 10400 bps here: http://www.stryder-it.de/vagcom.php?lang=en To accurately frame @ 10400 bps with your LPC1549 (assuming this is your board from other mbed posts), then change crystal Y3 to be 13 Mhz fundamental (replace the factory default of 12 Mhz). Now, when you select 9600 bps in your mbed s/w, the target UART baud rate will be 9600*(13/12) = 10400 bps. Believe you are also working with CAN @ 500k? So if you make this crystal swap to be 13 Mhz then you will need to select 460800 in your mbed code so the target baud rate will be 460800*(13/12) = 499200 bps (close enough for your 500k requirement). PS: If you are interested in a PCI or PCIe adapter to support 10400 bps, send us a private email, we are the manufacturer of such adapters.

Reference (LPC1549 schematic - check your version of the PCB for the proper schematic):

https://www.lpcware.com/content/nxpfile/lpc1549-lpcxpresso-board-schematic

posted by Sanjiv Bhatia 05 Mar 2017

Sanjiv Sorry about the delay. We go the 10.4k working well without much trouble.

appreciate your help

posted by Surendar S 20 Mar 2017

1 Answer

7 years, 8 months ago.

Yes, you can fill in any number. It then depends on the target if it can generate that value, but most just set a divider to the closest value it can reach.

Erik

Thanks for your response. Because I wasnt sure if it would work, I had written a simple "Hello world" program to write at 10400 baud into

<<Code>>
Serial pc(USBTX, USBRX)
<</Code>>

However when I connected to a Unix it didnt recognize it. It worked when Baud was 9600. I wasnt sure if the chip wasnt working or the computer program wasnt working (using minicom and gtkterm). Made sure the settings were 10400 8N1

To test further I connected two mbed boards and made one board "feed" the other using uart at 10400 and the second board taking that data and writing into pc at standard baud rate. That worked.

As much as i hate to say it, my conclusion was that the computer doesn't do n non-standard. I could be wrong.

posted by Surendar S 05 Mar 2017

Well that is another question: The mbed hardware targets do non-standard baudrates. But does the interface chip to the PC support it? Or more specifically, does its software support it? My terminal program on my PC cannot set non-standard baudrates. But I don't know if a terminal program can request a non-standard baudrate, and how the interface chip would handle it.

posted by Erik - 05 Mar 2017