[RESOLVED] UART on UEXT1 and UEXT2 ?

Started by Mouchon, August 31, 2013, 07:00:30 PM

Previous topic - Next topic

Mouchon

Hi i try to use one of UART wired on UEXT1 or UEXT2
wiht stage/sunxi-3.4 kernel.

uart.6 is mapped to UEXT1 and to linux ttyS1
uart.7 is mapped to UEXT2 and to linux ttyS2

But when i loop RX/TX and use minicom nothing is working

Looking into

script_a20_linux_LCD_800x480_sd.fex

[uart_para6]
uart_used = 1
uart_port = 6
uart_type = 2
uart_tx = port:PI12<4><1><default><default>
uart_rx = port:PI13<4><1><default><default>

[uart_para7]
uart_used = 1
uart_port = 7
uart_type = 2
uart_tx = port:PI20<4><1><default><default>
uart_rx = port:PI21<4><1><default><default>


but looking on http://linux-sunxi.org/A10/PIO

these two uart seem on mux 3 not 4

So does the fex is correct and does my interpretation of UART->UEXT is correct ?

Regards

Philippe.

isidoro

#1
Looks plausibile.
The right  table  for a20 is :
http://linux-sunxi.org/A20/PIO
And, yes while Uart0  is on mux 2; uart 6 and 7 is on mux 3, according to a20 pio table.
So, this https://github.com/linux-sunxi/sunxi-boards/blob/master/sys_config/a20/a20-olinuxino_micro.fex
shoul be reviewed.

Mouchon

Seem that changing mux and disabling hardware flow controll on minicom resolve de problem.

isidoro

Great,
I think you are using a 3.4 kernel, isn't it?
Because in debian r2 only console uart0 was enables.

Mouchon


oliver

Quote from: Mouchon on September 01, 2013, 07:50:56 PM
Seem that changing mux and disabling hardware flow controll on minicom resolve de problem.
That's because, if i remember correctly, hardware flow control requires dts and dtr? well 2 extra pins anyway, and uart6/7 are RX/TX only uarts I belive.

Mouchon

Oliver,
Make sens, but i ignored that minicom enable hardware flow controll by default on debian :-)

isidoro

Hi,
I've tested fex workaround on both my boards (one with flash NAND and one without) with strange results.

Before changing mux address ther was no activity capturing signals on uart and uart7, while after fex change some activity has come out.
But, assigning console device to ttyS1 at 115200 baud I was able to se dirty characters not clean one as they come from ttyS0, which remain the one usable uart port.

I'm using latest sunxi 3.4 from https://github.com/jwrdegoede/linux-sunxi/tree/sunxi-3.4.
Any suggestions?
@Mouchon can you please post your own config (zcat proc/config.gz)?
Thanks in advance,
Gianni.


isidoro

Quote from: Mouchon on September 06, 2013, 02:07:54 PM
isidoro
here you can find my config

regards

Thanks,
I've tried rebuiling with your config,
but still scrambled characters coming out of uart6.
Moreover, I tried a trick, bridging TX and RX signal and opening minicom while expecting echoes .
Still errors.
I think it's a hardware stuff.

isidoro

finally with debian r4 all 3 uarts works.
But testing both ports , I found that machine is behaving strangely:
every time it boots up it 'forgets' that ttyS0 (or ttyS1 or ttyS2) is a 16550A UART, and it's set to "unknown", the port does not work well , it lost packects randomly.
Used setserial /dev/ttyS0 uart 16550A to fix it.