Using UART on up board

Chris Polanco
Chris Polanco New Member Posts: 7
hello,

I'm having issues with the UART as well I am using Ubuntu with the upboard kernel and i can't get mraa to work. everytime i run my program it gives me the following error:

File "motorController.py", line 8, in <module>
transmitter = mraa.Uart(1)
File "/usr/local/lib/python2.7/dist-packages/mraa.py", line 1181, in __init__
this = _mraa.new_Uart(*args)
ValueError: Error initialising UART

i've tried multiple numbers in mraa.Uart and none work. The Up-board wiki says to use ttyS1 for UART but when i run
dmesg | grep tty i get the following:

[ 0.000000] console [tty0] enabled
[ 1.123350] 00:01: ttyS0 at I/O 0x3f8 (irq = 4, base_baud = 115200) is a 16550A
[ 3.555733] 8086228A:00: ttyS4 at MMIO 0xa171b000 (irq = 39, base_baud = 2764800) is a 16550A

ttyS1 isn't showing on here and I don't know if that's the issue or not. and if it is i'm not sure how to enable the port.

also, not sure if this is any help but when i run sudo cat /proc/tty/driver/serial i get the following.

serinfo:1.0 driver revision:
0: uart:16550A port:000003F8 irq:4 tx:0 rx:0
1: uart:unknown port:000002F8 irq:3
2: uart:unknown port:000003E8 irq:4
3: uart:unknown port:000002E8 irq:3
4: uart:16550A mmio:0xA171B000 irq:39 tx:0 rx:0
5: uart:unknown port:00000000 irq:0
6: uart:unknown port:00000000 irq:0
7: uart:unknown port:00000000 irq:0
8: uart:unknown port:00000000 irq:0
9: uart:unknown port:00000000 irq:0
10: uart:unknown port:00000000 irq:0
11: uart:unknown port:00000000 irq:0
12: uart:unknown port:00000000 irq:0
13: uart:unknown port:00000000 irq:0
14: uart:unknown port:00000000 irq:0
15: uart:unknown port:00000000 irq:0
16: uart:unknown port:00000000 irq:0
17: uart:unknown port:00000000 irq:0
18: uart:unknown port:00000000 irq:0
19: uart:unknown port:00000000 irq:0
20: uart:unknown port:00000000 irq:0
21: uart:unknown port:00000000 irq:0
22: uart:unknown port:00000000 irq:0
23: uart:unknown port:00000000 irq:0
24: uart:unknown port:00000000 irq:0
25: uart:unknown port:00000000 irq:0
26: uart:unknown port:00000000 irq:0
27: uart:unknown port:00000000 irq:0
28: uart:unknown port:00000000 irq:0
29: uart:unknown port:00000000 irq:0
30: uart:unknown port:00000000 irq:0
31: uart:unknown port:00000000 irq:0

I want to be able to communicate to my motor controller through serial but can't find out how it works. Any help will do. Thanks in advance.

Comments

Privacy Policy