UART setup in script.bin - Debian

Started by mikenycz, April 22, 2014, 06:25:52 PM

Previous topic - Next topic

mikenycz

I am using the Debian image that was downloaded from the Olimex site. (Wheezy) To customize the script.bin file for my needs I used the fex tools to convert the script.bin that was included to text. One of the things that I need to do is set up the UARTs for my specific case. I found the following lines in the script.bin file...

[uart_para0]
uart_used = 0
uart_port = 0
uart_type = 2
uart_tx = port:PB19<2><1><default><default>
uart_rx = port:PB20<2><1><default><default>

[uart_para1]
uart_used = 1
uart_port = 1
uart_type = 2
uart_tx = port:PG03<4><1><default><default>
uart_rx = port:PG04<4><1><default><default>

[uart_para3]
uart_used = 1
uart_port = 1
uart_type = 2
uart_tx = port:PG09<3><1><default><default>
uart_rx = port:PG10<3><1><default><default>

uart_para0 is not used (uart_used=0) so the fact that the pins it is assigned to are unused does not seem to matter.

uart_para1 looks like I would expect. The pin assignments make sense and it is turned on.

uart_para3 is a puzzle. I thought there were only 2 uarts on this board? The other puzzle is that uart_para3 seems to be turned on (uart_used=1) and the port is the same as for uart_para0 (uart_port=1). In addition the pin assignments are different than for uart_para1.

Does anyone know what this would be configured this way? Is this just an error that needs to be corrected? Or is there some purpose to it?

Also, it appears that there is a debug uart port that is defined. According to the Fex guide this is the...
"Serial port to be enabled during/for boot."

How does this make the port chosen different from other uarts that are defined in the uart_para"n" definitions?

If someone can clarify these things it would be greatly appreciated.

Thank you,
Mike Nycz

vik

See the topic "How to access ttyS0 and ttyS1 from Debian" - your question has been answered there!

vinifr

In Allwinner A13 there is UART0, UART1 and UART3. I do not know what they did with the UART2. :o

You cannot use UART0 and uSD card at same time, at least by ordinary means. So just remains UART1 and UART3. Stay tuned to conflict of pins and their functions. ;)

The field uart_used means 1(enable) and 0(disable).