Jump to content

Banana PI M2 Zero - UART3 921600 speed config


Recommended Posts

Hello,

Is it possible to set the speed of the UART3 to 921600 baud instead of 115000? How to do it?

I need to connect to an arduino at that speed. I have tried with minicom but I can't get it.

I have also tried to put the following command

dtoverlay=miniuart-bt

in /boot/armbianEnv.tx but it doesn't work either.

to 115000 if I can connect well, therefore the port works correctly

Is there any way?

Link to comment
Share on other sites

Hi Josep,

sorry for the late reply, I just seen your questeion.
The hardware chip for UART3  (/dev/ttyS3) is a 16550A and supports a Base-baud of 150000. 
So the highest possible baud rate you can get out of this chip is 150 000.

To set it to 150000 Baud you have to:

1) enable the UART3 via armbian.config,
2) install the tool setserial
3) enable for customer speed by:
setserial -a /dev/ttyS3 spd_cust

4) set the divisor to 1 by:

setserial -a /dev/ttyS3 divisor 1

5) activate the UART by:

stty -F /dev/ttyS3 38400  <-- will get an error, but this is o.k.

 

Here is my output:

pi@bananapim2zero:~$ setserial -a /dev/ttyS3
/dev/ttyS3, Line 3, UART: 16550A, Port: 0x0000, IRQ: 46
        Baud_base: 1500000, close_delay: 50, divisor: 0
        closing_wait: 3000
        Flags: spd_normal

pi@bananapim2zero:~$ setserial -a /dev/ttyS3 spd_cust
pi@bananapim2zero:~$ setserial -a /dev/ttyS3 divisor 1
pi@bananapim2zero:~$ setserial -a /dev/ttyS3
/dev/ttyS3, Line 3, UART: 16550A, Port: 0x0000, IRQ: 46
        Baud_base: 1500000, close_delay: 50, divisor: 1
        closing_wait: 3000
        Flags: spd_cust

pi@bananapim2zero:~$ stty -F /dev/ttyS3 38400
pi@bananapim2zero:~$

Regards
wollik

 

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.
Note: Your post will require moderator approval before it will be visible.

Guest
Reply to this topic...

×   Pasted as rich text.   Restore formatting

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...

Important Information

Terms of Use - Privacy Policy - Guidelines