View: 6062|Reply: 3

Trying to get second uart to work

[Copy link]

1

threads

2

posts

23

credits

Novice

Rank: 1

credits
23
Published in 2016-7-17 00:23:55 | Show all floors |Read mode
I'm trying to get ttyS2 to work.  I've changed script.fex to enable uart2 and commented out the pins
it uses (PA0..3) from gpio.  

[uart2]
uart_used = 1
uart_port = 2
uart_type = 2
uart_tx = portA00<2><1><default><default>
uart_rx = portA01<2><1><default><default>
;uart_rts = portA02<2><1><default><default>
;uart_cts = portA03<2><1><default><default>

The device /dev/ttyS2 is created and proper entries appear in dmesg.

[    0.402171] sw_uart_get_devinfo()1503 - uart0 has no uart_regulator.
[    0.402324] sw_uart_get_devinfo()1503 - uart2 has no uart_regulator.
[    0.402799] uart0: ttyS0 at MMIO 0x1c28000 (irq = 32) is a SUNXI
[    0.402943] sw_uart_pm()890 - uart0 clk is already enable
[    1.370666] uart2: ttyS2 at MMIO 0x1c28800 (irq = 34) is a SUNXI

Programs can attach to device but the problem is no data passes in or out.

Can somebody suggest something I have overlooked?

Thanks

Nottledim

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2016-7-17 00:55:21 | Show all floors
Search trough script.bin for other usages of same GPIO pins and remove them. Usually you will find it in GPIO section.

1

threads

2

posts

23

credits

Novice

Rank: 1

credits
23
 Author| Published in 2016-7-17 05:02:30 | Show all floors
Thanks.  I did that before I posted.  I checked again but no change.  
I forgot to mention this is an OP Plus.  I think data is on real pins 11 & 13.
13 seems to be input and 11 output as expected.

It all looks good except there's no data
stty shows correct baudrate.

I notice that the port's <mux feature> is set to 2.  I'm not to sure what that means.  Should it be something else?

4

threads

1118

posts

9497

credits

Moderator

Rank: 7Rank: 7Rank: 7

credits
9497
Published in 2016-7-17 05:20:11 | Show all floors
nottledim replied at 2016-7-16 22:02
Thanks.  I did that before I posted.  I checked again but no change.  
I forgot to mention this is a ...

Pin mux 2 is correct. If you are sure that you removed others occurences of PA00 and PA01, then I'm clueless.

You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list