please choosego to mobile | Continue to access the PC version
View: 13855|Reply: 2

[SOLVED] UART

[Copy link]

1

threads

2

posts

19

credits

Novice

Rank: 1

credits
19
Published in 2016-2-12 14:06:48 | Show all floors |Read mode
Edited by kordian at 2016-2-13 07:28

Hi!
I'm trying to communicate OPI Plus2 with Arduino, so I need working UART. I'm using Jacer's Debian Jessie ( LINK ).
I've converted good-working script.bin (Plus 1080p60 HDMI) to fex file, and enabled serial ports (for all ports I've changed to uart_used = 1 and uart_type = 2, without touching anything else).
Before this, I had three available serial ports:
  1. /dev/ttyS0
  2. /dev/ttyS2
  3. /dev/ttyS3
Copy code
Now, I have one additional port (/dev/ttyS1), what allows me to suppose that everything went okay (because in previous FEX version UART2 was disabled).
Although I can open these ports in minicom or python program, only /dev/ttyS0 is working (three-pin debug connector).
I've tried CON3 pins (8, 10) for /dev/ttyS2 and (11, 13) for /dev/ttyS1, but I'm not able to send nor receive anything. Additionally, the board is very unstable, when something is connected to pins 11 and 13 (especially when booting).

What can I do to make UART3 working?

Thank you!

0

threads

7

posts

70

credits

Registered member

Rank: 2

credits
70
Published in 2016-2-13 06:02:50 | Show all floors
If you're using 5V Arduino, then you might need to buy logic level converter (or make a resistor divider for RX pin), because H3 UART (UART RX in your case) isn't 5V tolerant. This can burn your board or make it unstable.

1

threads

2

posts

19

credits

Novice

Rank: 1

credits
19
 Author| Published in 2016-2-13 06:44:19 | Show all floors
Edited by kordian at 2016-2-13 06:46

Thank you for your reply! I'm using 3.3V one, but it is really important to remember about voltage levels.

After checking everything once again, I found my mistake. Pins 8 and 10 are assigned to /dev/ttyS3, not /dev/ttyS2. So, right now I've got one working serial port and one serial console (on three-pin header), so I can use it in my project.

Although I've resolved my problem, I'm really curious if is it possible to make UART2 /dev/ttyS2 (pins 11 and 13) or UART1 /dev/ttyS1 (pins 38 and 40) working, or is it impossible?
These ports are not working, even if shorted RxD with TxD (simple loopback).

Kindest regards,
K.
You need to log in before you can reply login | Register

Points Rule

Quick reply Top Return list