Jump to content

Setserial in orangepi lite reports incorrect base_baud possibly?


Starfishmod

Recommended Posts

So I'm pretty new at using serial ports in linux so not even sure if this is the right place.

 

I'm playing around with MIDI using the serial ports on the Orange PiLite - it uses the baud rate of 31250 to achieve this you use setserial to get the base_baud (which it reports as 1500000) and you divide by the speed you want to get the divisor

 

i.e. 1500000/31250 = 48 

this becomes 

>setserial /dev/ttyS1 divisor 48 speed_cust

 

So now when you use 38400 as your baud speed it actually becomes 31250....

 

...in theory

 

after some fiddling I found the divsor is actually 50 as 48 gives you weird results

 

which would suggest that the base_baud is actually 1562500 not 1500000

 

So where is this initial base_baud set?

I assuming in the kernel?

I see this:

sources/u-boot/v2016.11/include/configs/rk3399_common.h:16:#define CONFIG_BAUDRATE 1500000

 

But i really don't know if this is correct :)

 

Edit: oops I put spaces in setserial

Edited by Starfishmod
Link to comment
Share on other sites

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

Important Information

Terms of Use - Privacy Policy - Guidelines