Jump to content

Recommended Posts

Posted (edited)

Hi all,

 

Firstly, I want to say that I'm new to Armbian and embedded Linux. I have tried searching the solution for my problem on various sites but I haven't had any luck. 

 

I am using a Nano Pi Duo 2 (H3) board with Armbian Buster to communicate with another device through UART1 (TX1, RX1). I am able to communicate at 115200 bps with no problem.  However, I need the baud rate to be at least 230400 bps (ideally 921600) for my application. I'm using WiringNP library. When I changed to those baud rates and performed a simple feedback test (shorting TX/RX), I can receive the data. But when I connect it to another device, the communication does not function correctly. I read from this thread that the UART baud depends on the UART clock frequency because of <2.5% error.  I believe that the current UART clock is 24 MHz. After checking this table out, I think I need my UART clock to be at least 30 MHz to get the baud rates above.  I successfully change the I2C clock from 100 kHz to 400 kHz by following this thread. Can I do the same thing for my UART clock? Could anyone please help me with this problem?

 

Thank you so much in advance. I've been struggling with this problem.

Edited by td1191
Posted

Could anyone please point me to a thread either in this forum or other resource that dealt with APB2 and PLL_PERIPHER0 clock for UART speed in the past? I have tried finding many sites since I posted this thread but couldn't find a right way to make it to work. I'm very new to this and I really appreciate your help.  Thank you!

Posted

Do you need those exact baudrates? I don't remember where I saw it, but somewhere I read that the UART speed should be close to an even divisor of 1.5MHz. At least that's what I remember, and it seems to work for e.g. 115200.

 

In any case, I'm currently running the UART on a Duo 2 at 500kbps with no problems. If you have control of the other end of the link you might try that.

 

That said, I would also be interested in tweaking the clocks a bit because I would really like to be able to run at 400kbps and 420kbps if possible.

 

Guest
This topic is now closed to further replies.
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines