• Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors
HomepcDuinoQuick StartpcDuino3Enable UART5 and UART6 on pcDuino3
Previous Next

Enable UART5 and UART6 on pcDuino3

Posted by: cwilt , April 25, 2015

This was posted on the linksprite forums by Bharath Rao.

Original discussion can be found here.

I have enabled 2 serial ports, UART 5 and UART 6.

http://www.rs-online…b-host-pcduino3 This link has the steps to extract script.bin file and edit it and repack it.

http://jbvsblog.blog…to-4-uarts.html This has the procedure to enable UARTs in the script.fex file

After editing the script.bin and copying it to your /boot partition, reboot.

To check whether the UARTs are enabled run the command

$ dmesg | grep uart

[    2.359573] [uart]: used uart info.: 0x65

[    2.361581] [uart]: serial probe 0 irq 33 mapbase 0x01c28000
[    2.384244] sunxi-uart.0: ttyS0 at MMIO 0x1c28000 (irq = 33) is a U6_16550A
[    3.203940] [uart]: serial probe 2 irq 35 mapbase 0x01c28800
[    3.232197] sunxi-uart.2: ttyS1 at MMIO 0x1c28800 (irq = 35) is a U6_16550A
[    3.241474] [uart]: serial probe 5 irq 50 mapbase 0x01c29400
[    3.269817] sunxi-uart.5: ttyS2 at MMIO 0x1c29400 (irq = 50) is a U6_16550A
[    3.279181] [uart]: serial probe 6 irq 51 mapbase 0x01c29800
[    3.307665] sunxi-uart.6: ttyS3 at MMIO 0x1c29800 (irq = 51) is a U6_16550A
[    5.825632] USB Serial support registered for ch341-uart

 

To enable UART 5(ttyS2) we first need to set the pin mode.

GPIO10 – UART5_TX

GPIO13 – UART5_RX

 

$ echo “3” > /sys/device/virtual/misc/gpio/mode/gpio10

$ echo “3” > /sys/device/virtual/misc/gpio/mode/gpio13

 

Similarly for UART 6 (ttyS3)

GPIO11 – UART6_TX

GPIO12 – UART6_RX

 

$ echo “3” > /sys/device/virtual/misc/gpio/mode/gpio11

$ echo “3” > /sys/device/virtual/misc/gpio/mode/gpio12

 

I have attached the script.fex file I used to enable them. You could just rename it to script.fex and use it.

Attached Files

  • Attached File  script.txt   25.51KB   0 downloads

Share!
Tweet

cwilt

About the author

Leave a Reply Cancel reply

You must be logged in to post a comment.

Category

  • Home
  • pcDuino
  • WiKi
  • Store
  • Distributors