Jump to content


Photo

high speed problem using uarts


  • Please log in to reply
3 replies to this topic

#1 aguilerasmiguel

aguilerasmiguel

    Newbie

  • Senior Members
  • Pip
  • 2 posts

Posted 15 February 2017 - 04:36 PM

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


#2 jernej

jernej

    Advanced Member

  • Senior Members
  • PipPipPip
  • 446 posts

Posted 16 February 2017 - 09:32 AM

Read this for basic understandment of the problem: https://forum.armbia...nanopi-neo-air/



#3 aguilerasmiguel

aguilerasmiguel

    Newbie

  • Senior Members
  • Pip
  • 2 posts

Posted 17 February 2017 - 04:59 PM

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



#4 jernej

jernej

    Advanced Member

  • Senior Members
  • PipPipPip
  • 446 posts

Posted 17 February 2017 - 09:19 PM

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.