I have a bananaPi M3, running a Rasbian, I need to transmit data on a bananaPi with 4MB/sec. The setup I found to do this on the Raspbian is:
Create a config.txt file in the /boot/ folder in which write:
init_uart_baud 4000000
init_uart_clock 64000000
From info I found the clock devider is 16, so to get 4MB I just need to set the clock to 64000000 which gives me 4000000(4Mb).
To send data and check if it's transmited with 4Mb/sec I use an oscilloscope connected to TX pin of the bananaPi and in a terminal write:
echo -ne '\xA' > /dev/ttyS2
I can see the data on the oscilloscope but it's transmited with no more than 1.5 Mb(which is the default max value of the UART settings)
I alos tried a Python script:
import serial
if __name__ == '__main__':
connection = serial.Serial()
connection.port = "/dev/ttyS2"
connection.baudrate = 4000000
connection.timeout = 1
connection.write('\xAA')
............
It is still transmitted with 1.5 Mb
Do anybody have an idea on how to setup the bananaPi to work with this higher frequency?
Thanks