How to enable the GPIO 8, 10 as standard Serial port TXD and RXD in Ubu 14.04?

He ZhangHe Zhang Posts: 6New Member
Hi all:
Currently I have been stuck in sending data through the serial port /dev/ttyS0, that is the GPIO pin number 8, 10. I made a serial cable as shown in the figures, on one side an external hoarder connects to the GPIO 6, 8, 10, GPIO 6 connects to ground, and on the other side it connects to a standard serial interface. I wrote a simple serial communication program that send data from the up-board to the desktop.

The problem is, I can successfully send data through a USB-to-Serial cable but failed through this serial cable. I have checked that this serial cable has been made correctly, so I am doubting whether there are some configures that I do not make to enable the GPIO 8,10 functions as a Serial port. I have tried some suggestions posted on https://up-community.org/wiki/Serial_console, but still not solve my problem. I also check the configures in the BIOS, end enable all the serial ports, but still not working.

Any help will be greatly appreciated!

Thanks,

Comments

  • MarcelloMarcello Posts: 155New Member
    IMHO if i understand your schematic you are going to fry your board.
    PC DB9 serial connector uses RS232 levels while the GPIO is 3V TTL.
    You need a level shifter...
  • He ZhangHe Zhang Posts: 6New Member
    Hi Thanks for replying,
    Again I checked the upboard documentation, that the pin number 6 is ground, 8 is GPIO14-UART0_TXD , and 10 is GPIO15-UART0_RXD, that are connected to the pin number 5, 2 and 3 on the PC DB9 serial connector. There is no GPION that is used as output to the PC DB9 serial connector.
  • MarcelloMarcello Posts: 155New Member
    The docs mention to use an FTDI cable therefore the serial port is clearly TTL levels.
  • He ZhangHe Zhang Posts: 6New Member
    Thanks for your help, I made a mistake.
    Best,
Sign In or Register to comment.