Jump to content

Recommended Posts

Posted (edited)

Hello all,

I'm working on a project where I need at least 460800 baud on a UART on the NanoPi Neo Air. Works great at lower baud rates but can't seem to get it much faster than 115200. Any thoughts on clock adjustment or CPU speed?

 

I'm using Armbian 5.24 with the 3.X kernel

Edited by zador.blood.stained
Renamed the thread - question is SoC specific (H3), not board specific (Neo Air)
Posted

Well, you can get higher baudrate with default settings, just not 460800. Default peripheral clock for uart is running at 24 MHz, which is predivided by UART by 16. So your base clock is 1.5 MHz, which translates to highest rate of 1.5 Mbaud per second. I can confirm that this setting works (used for streaming audio through bluetooth on BPi M2+). You can get only baud rates which have integer divider or close to it. 115200 works (divider 13, ~0.2% error), while 460800 doesn't (divider 3, ~8.5% error). I read somewhere that serial communication works if error is <2%. So if you looking for similar baudrate then 375000 or something around it should work.

 

Here you can check table of minimum input clock requirements for some standard baudrates. Unfortunately, I don't know what is the best way to change APB2 clock, which should be >= 30 MHz for 460800 baud. What is even more worrying is that Allwinner programmers rather lowered rate from standard 3 Mbaud/s to 1.5 Mbaud/s for bluetooth than find a proper way to use higher baudrates (changing input clock).

Posted

Thanks for the insight! Now I need to see if anyone understands where I can change the APB2 clock registers... Something in uboot? or is it going to require a new kernel?

Posted (edited)

I want to use 460800 baud rate on OrangePi Zero.

It works 115200 baud rate.

 

Following this, I need to change the uart clock from 24MHz to higher.

https://forum.armbian.com/index.php/topic/3508-higher-uart-baud-rates-h3-nanopi-neo-air/

 

Is there anyone can solve this problem? I have willing to pay a fee to this. Please send me messages on facebook (ID : techcap@live.com).

 

If I get the solution, I'll share it in this forum.

 

Thank you very much.

 

 

Edited by zador.blood.stained
Duplicate/separate thread for already existing question - merged here
Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines