cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
meta1360
Explorer
Explorer
3,679 Views
Registered: ‎01-29-2014

UART 16550 baud rate problem

Jump to solution

Dear All,

 

I am using UART 16550; How is it possible to change its baud rate and set it? Moreover, according to its datasheet, its default is on 9600 but the question is if frequency of clock is important. freqyency of clock in my system is 200 MHZ and when I set the terminal with baud = 9600 just I can receive some strange characters. do you have any idea how to fix it.

 

 

thanks,

Meysam

0 Kudos
1 Solution

Accepted Solutions
imgignacio
Explorer
Explorer
4,789 Views
Registered: ‎11-24-2013

Hi, Meysam,

 

the baud rate that an UART generates depends of the reference clock it is using, and the baud rates showed on the datasheet are calculated for that reference clock. So, if you are using another frecuency and you want to calculate what baudrate you are generating, you will have to solve this easy equation:

 

current_baudrate =  indicated_baudrate * current_clk/reference_clk

 

For example: if the datasheet values are calculated for a 100 MHz clk and you use 200 MHz clk and the default value is 9600 bauds, you will be generating 19200, and this will be your actual default value.

 

So, if you are using a diferent frecuency, you will have to calculate de actual baudrate an set it in the terminal.

 

But maybe the component does not support the clock frecuency that you are using. In this case you will have to get to "feed" it with an adecuated clock frecuency, for example with a clock divider.

 

Regards,

Ignacio.

View solution in original post

Tags (2)
0 Kudos
1 Reply
imgignacio
Explorer
Explorer
4,790 Views
Registered: ‎11-24-2013

Hi, Meysam,

 

the baud rate that an UART generates depends of the reference clock it is using, and the baud rates showed on the datasheet are calculated for that reference clock. So, if you are using another frecuency and you want to calculate what baudrate you are generating, you will have to solve this easy equation:

 

current_baudrate =  indicated_baudrate * current_clk/reference_clk

 

For example: if the datasheet values are calculated for a 100 MHz clk and you use 200 MHz clk and the default value is 9600 bauds, you will be generating 19200, and this will be your actual default value.

 

So, if you are using a diferent frecuency, you will have to calculate de actual baudrate an set it in the terminal.

 

But maybe the component does not support the clock frecuency that you are using. In this case you will have to get to "feed" it with an adecuated clock frecuency, for example with a clock divider.

 

Regards,

Ignacio.

View solution in original post

Tags (2)
0 Kudos