high speed problem using uarts
0

4 posts in this topic

Hi all..

 

I can't solve one issue with nanopiair h3. 

 

I was tried to set the speed of ttyS1 using

 

  stty -F /dev/ttyS1 230400 min 0 time 5 -isig -icanon -iexten -echo -echoe -echok -echoctl -echoke -opost -onlcr

 

that works no err messages..but my data at port is like garbage... 

 

I see this err under dmesg 

 

 21 03:10:02 2017] sw_uart_check_baudset()429 - uart1, select set 1, baud 230400, uartclk 24000000 beyond rance[30000000, 120000000]

 

on the other hand when I check the status of uart 

 

root@FriendlyARM:/boot# cat /sys/class/tty/ttyS1/device/status 
uartclk = 24000000 
The Uart controller register[base: 0xf1c28400]: 
[RTX] 0x00 = 0x00000000, [iER] 0x04 = 0x00000000, [FCR] 0x08 = 0x00000000 
[LCR] 0x0c = 0x00000000, [MCR] 0x10 = 0x00000000, [LSR] 0x14 = 0x00000000 
[MSR] 0x18 = 0x00000000, [sCH] 0x1c = 0x00000000, [uSR] 0x7c = 0x00000000 
[TFL] 0x80 = 0x00000000, [RFL] 0x84 = 0x00000000, [HALT] 0xa4 = 0x00000000 
root@FriendlyARM:/boot# 
 
So..there's any way to change uarclk from   24000000 to 30000000? 
 
How can we solve the sw_uart_check_baudset()429 - uart1, select set 1, baud 230400, uartclk 24000000 beyond rance[30000000, 120000000] message?
 
Thanks a lot for your help

Share this post


Link to post
Share on other sites

Thanks a lot for your help..

 

yes..it's a bummer I think it's not possible to change apb clock from 24Mhz to 48Mhz due to hardware limitations..or maybe I'm wrong.

 

In a common raspberry pi the uart clock is better I think..I was tried to change the speed and it works with no issues at 230400 baud rate. 

 

 

Thanks again

Share this post


Link to post
Share on other sites

It is possible, but for that you have to hack the kernel a bit... If you also use I2C and don't do this clock change right, you can disrupt communication on it.

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!


Register a new account

Sign in

Already have an account? Sign in here.


Sign In Now
0

  • Support the project

    We need your help to stay focused on the project.

    Choose the amount and currency you would like to donate in below.