BPI M1+ UART3 (TTYS2) not Working

In case you haven’t already had an eye on the ODROID C1+ it’s worth a look.

@tkaiser,

Many thanks for the heads up on ODROID C1+ , very interesting … no sata port for SSD but e.MMC option should offer similar performance which also has the option to boot from it :yum: and is a neater solution not requiring external sata and power cables, smaller form factor … etc

I’m guessing performance would be up a bit on M1+ A20 dual core SOC ?

My only real concern is lack of built in wifi … M1+ has built in AP6010 wifi chipset which works very well in AP mode, of course we could add wifi via USB but have had so many issues with external usb wifi dongles (in Ap Mode) with Rasp Pi we would need to investigate what works well … it was this issue that led us to BPI M1+ …

Will definitely keep an eye on it … would like to see some comparison benchmarks …

Cheers Jay

The S805 is over twice as fast as the A20 on the M1+. I did some tests (also with thermal measurements) when I reviewed another SoC a few weeks ago: http://forum.armbian.com/index.php/topic/311-quick-review-of-lemakers-guitar/

And you will find also results to compare with at mikronauts.com (use the results of Banana Pi or Pro since all A20 based devices perform identical). Regarding an AP capable USB stick we had discussions at armbian.com recently if I remember correctly (but I might be wrong since Wi-Fi available on SBCs is of no interest for our use cases)

I have exactly the same problem jaymonkey reported.

I changed the fex file to use uart on PH0 and PH1 which are correct according to the provided schematic. I’m using Multi4 function as per A20 user manual. Changed script.bin and after rebooting I have uart3 on ttyS2. Testing with screen /dev/ttyS2 19200 and a scope on pin 8 of CON3 (UART3.TX according to the schematic) but nothing is coming out.

Any update on this?

Did justine from sinovoip answered the question?

Regards Snafutzz

Just to add some more info to the problem.

I’ve reconfigured succesfully UART5 and UART6 on CON3 instead of SPI0

UART5 TX -> PI10 Multi3 -> CON3 24 RX -> PI11 Multi3 -> CON3 23

UART6 TX -> PI12 Multi3 -> CON3 19 RX -> PI13 Multi3 -> CON3 21

But still no success with UART3

Regards Snafutzz

you can reference this document:

https://bananapi.gitbooks.io/bpi-m1/content/bpi-m1uartinterface.html

Thank for your reply,

I’m using BPI-M1+ with linux 3.4.108-bananian (the link provied in your reply refers to BPI-M1 instead)

Apart from this I’ve succesfully used UART0/UART2/UART5/UART6/UART7 accessing their pins from 40Pins header or 3Pins debug uart header respectively.

But UART3 doesen’t work.

With dmesg | grep ttyS I get [ 0.661743] sunxi-uart.0: ttyS0 at MMIO 0x1c28000 (irq = 33) is a U6_16550A [ 1.307066] sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 35) is a U6_16550A [ 1.350781] sunxi-uart.3: ttyS2 at MMIO 0x1c28c00 (irq = 36) is a U6_16550A [ 1.394495] sunxi-uart.5: ttyS3 at MMIO 0x1c29400 (irq = 50) is a U6_16550A [ 1.438175] sunxi-uart.6: ttyS4 at MMIO 0x1c29800 (irq = 51) is a U6_16550A [ 1.481843] sunxi-uart.7: ttyS5 at MMIO 0x1c29c00 (irq = 52) is a U6_16550A

So all the uart configured in the script.bin file are correclty started UARTs configuration is correct for both MemoryMappedIO and IRQ according to A20 user manual.

The script.fux/script.bin file uart sections have the following entries:

[uart_para0] uart_used = 1 uart_port = 0 uart_type = 2 uart_tx = port:PB22<2><1> uart_rx = port:PB23<2><1>

[uart_para2] uart_used = 1 uart_port = 2 uart_type = 4 uart_tx = port:PI18<3><1> uart_rx = port:PI19<3><1> uart_rts = port:PI16<3><1> uart_cts = port:PI17<3><1>

[uart_para3] uart_used = 1 uart_port = 3 uart_type = 2 uart_tx = port:PH00<4><1> uart_rx = port:PH01<4><1>

[uart_para5] uart_used = 1 uart_port = 5 uart_type = 2 uart_tx = port:PI10<3><1> uart_rx = port:PI11<3><1>

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

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

Which seem correct looking at BPI-M1+V1_0 20150202.pdf schematic and A20 SoC manual for pin MultiFuncion configuration.

I’m using screen /dev/ttySx 19200 for opening a terminal connected to UARTx. To test the uart I connect Rx and Tx pins of the same UART port (loopback) and also look at Tx pin with an oscilloscope.

Nothing comes out from UART3 Tx (ttyS2) pin, all other UARTs work fine.

What can possibly go wrong? Did you ever tested UART3 with bananian? Which fux configuration are you using to test it?

Looking at the schematics I’ve noticed that BananaPi-M1+ is different in UART assignement BananaPro from Lemaker. BananaPro uses UART4 on PH4 and PH5 pins of A20 SoC to connect 40Pin gpio header on pins 8 and 10. BananaPi-M1+ uses UART3 on PH0 and PH1 pins of A20 SoC to connect 40Pin gpio header on pins 8 and 10.

Regards Snafutzz

At the end I solved the problem.

In script.fux file in usbc configuration the same SoC pins PH00 and PH01 were reconfigured to drive USB_VBUS which is not necessary in BPI-M1+ cause VBUS is directly tied to 5V.

Regards Snafutzz

Hi snafutzz,

Sorry i missed you earlier posts … i was never able to solve the issue and i never received any amore help from BPI or Justine from sinovoip … but it sounds like you where able to fix it :+1: , do you mind posting the code changes to your fex and script files … ?

Hope fully BPI can incorporate these fixes in a future build …

Cheers Jay

Can you please help me with the procedure to test the UART2,4, 5,6,7 based on your post? Thanks, Rohit

Hi Jay I need your help in getting UART7 working. For me none of the uarts work on the header; leave apart the uart3 which seems most of us are struggling. Yep, got it working… I don’t know something it takes two consecutive restarts - and it worked… :slight_smile:

Rohit,

UART4 is not accessible from pin header in BPI-M1+, I think it is on BananaPro. BPI-M1+ has the following UARTs reported on GPIO connector UART 2/3/5/6/7.

The procedure I’ve tested worked for me on bananian 15.08.

You have to modify script.bin file in the boot partition, so

  • mount boot partition
  • backup script.bin (in case the board doesn’t reboot after editing use this backup to recover)
  • convert script.bin in script.fex with bin2fex
  • edit script.fex look at http://linux-sunxi.org/Fex_Guide for info
  • convert back script.fex to script.bin with fex2bin
  • reboot

Changes:

  • use uart3 instead of uart4 (BPI-M1+)
  • change usbc section for avoiding the usage of PH00 and PH01 pins assiged to uart3

Regards Snafutzz

Thanks for sharing the details. On the M1+ CON-3, there are three uarts exposed - Uart7, Uart3, Uart2. I was able to get uart7 (ttyS3), uart2 (ttyS1) working. I suppose ttyS2 (Uart-3) is the issue. In the fex file, it was disabled which I have enabled and created the script.bin and rebooted the system. Uart 2 (ttyS2) wasn’t working and found a couple of posts stating to disable the usb_drv_vbus_gpio PH00 and PH01 gpios as these are used by ttyS2.

With what GPIOs have you replaced for the usbc section? Do I leave it blank for the usr_gpio_drive for the usbc section?

By the way, I did not get your point about “use uart-3 instead of uart4 on BPI-M1+” as uart4 is not used as per the BPI-M1+ schematics nor is it exposed on the CON-3 header. Can you clarify this point as well?

Regards, Rohit

Rohit,

blank pins on usb pins as replacements for PH00 and PH01 do not work, select, from schematic, pins that are N.C.

bananian 15.08 with BPi-M1+ hardware configuration uses UART4 instead of UART3. I think this configuration is a copy-and-paste from BananaPRO which instead uses UART4.

To get a clear idea get the schematics of both and check differences on how A20 pins are used.

Regards Snafutzz