Power & Source of Big Ideas

Problem using UART2 (/dev/tty2)

Moderators: chensy, FATechsupport

Hello,

I am using a NanoPi NEO with the image file "nanopi-neo-core-qte-sd4g.img.zip". I want to use both UART :
* UART1: TX (Pin 8) and RX (Pin 10)
* UART2: TX (Pin 11) and RX (Pin 22)

First of all i enabled all the serial ports using "sudo npi-config". I chose "Advanced Options" then "Serial" and i enable all the serial ports.
To test the serial communication, i used minicom. UART1(/dev/ttyS1) worked properly but UART2(/dev/ttyS2) is not working.
What could be the cause of the problem?

Thanks in advance for four answers.
Hi,
Have any success with the UART2? For me same not working the /dev/ttyS2 RX pin, the TX is working normaly.
Robi
Problem is still unsolved.
After enabling ttyS2 via npi-config we can see ttyS2 all reasonable configuration is /proc and /sys - perfect, but still not working :)

P.S. It's 100% software problem. ttyS2 is woking with kernel 3.4 and not with kernel 4.11.2 on the same hardware.
I'm having the same problem here. UART2 works fine with 3.x kernel, but with 4.11.12 the GPIO pins seem to be misconfigured.
This is what they look like:
root@NanoPi-NEO2:~# gpio readall
+-----+-----+----------+------+---+-NanoPi-NEO2--+------+----------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
| | | 3.3V | | | 1 || 2 | | | 5V | | |
| 12 | 8 | GPIOA12 | ALT5 | 0 | 3 || 4 | | | 5V | | |
| 11 | 9 | GPIOA11 | ALT5 | 0 | 5 || 6 | | | 0v | | |
| 203 | 7 | GPIOG11 | OUT | 1 | 7 || 8 | 0 | ALT5 | GPIOG6 | 15 | 198 |
| | | 0v | | | 9 || 10 | 0 | ALT5 | GPIOG7 | 16 | 199 |
| 0 | 0 | GPIOA0 | ALT5 | 0 | 11 || 12 | 1 | OUT | GPIOA6 | 1 | 6 |
| 2 | 2 | GPIOA2 | OFF | 0 | 13 || 14 | | | 0v | | |
| 3 | 3 | GPIOA3 | OFF | 0 | 15 || 16 | 0 | OFF | GPIOG8 | 4 | 200 |
| | | 3.3v | | | 17 || 18 | 0 | ALT2 | GPIOG9 | 5 | 201 |
| 64 | 12 | GPIOC0 | ALT4 | 0 | 19 || 20 | | | 0v | | |
| 65 | 13 | GPIOC1 | ALT4 | 0 | 21 || 22 | 1 | OUT | GPIOA1 | 6 | 1 |
| 66 | 14 | GPIOC2 | ALT4 | 0 | 23 || 24 | 1 | OUT | GPIOC3 | 10 | 67 |
+-----+-----+----------+------+---+----++----+---+------+----------+-----+-----+
| BCM | wPi | Name | Mode | V | Physical | V | Mode | Name | wPi | BCM |
+-----+-----+----------+------+---+-NanoPi-NEO2--+------+----------+-----+-----+


You can clearly see that GPIOA1 is configured as OUT when it should be ALT5.
What's interesting is that the TX pin for UART2 (GPIOA0) is configured properly as ALT5.
Unfortunately, in my case the 3.x kernel is not a valid workaround as it doesn't contain the rtc-ds1307 module and I need that too.
If I understand correctly, I need to re-compile my dtb file in order to change the pin configurations. Is this correct or is there an easier option that I'm missing?
I recently purchased several npi2 boards with the hope of migrating a project to using npi2, but for that to work I need 2 UARTs and a working rtc. I would really hate to have to migrate it to yet another board for such a small issue.

Thanks in advance for any ideas on how to fix this!

Who is online

In total there are 3 users online :: 0 registered, 0 hidden and 3 guests (based on users active over the past 5 minutes)
Most users ever online was 42 on 15 Jul 2016, 01:04

Users browsing this forum: No registered users and 3 guests