BeagleBone/Serial Port

From eLinux.org
< BeagleBone
Revision as of 07:13, 26 July 2013 by Fcorthay (talk | contribs) (Created page with "Serial ports 1, 2, 4 and 5 are present on the BeagleBone expansion connectors. The corresponding pins are multiplexed with other functions and the processor has to be conf...")
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to: navigation, search

Serial ports 1, 2, 4 and 5 are present on the BeagleBone expansion connectors. The corresponding pins are multiplexed with other functions and the processor has to be configured in order to use them.

Ubuntu

The following configuration commands work on ARMhf Ubuntu. They have been entered by the root user. Other users would have to sudo these commands.

The CircuitCo BeagleBone RS232 cape has an EEPROM which automatically enables ttyO2. The other ports have to be enabled separately. Using a breadboard (i.e. having no EEPROM) requires to also enable ttyO2.

Install minicom:

apt-get install minicom

Activate serial port ttyO1:

echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd
echo 0 > /sys/kernel/debug/omap_mux/uart1_txd
cat /sys/kernel/debug/omap_mux/uart1_rxd
cat /sys/kernel/debug/omap_mux/uart1_txd
minicom -o -b9600 -D/dev/ttyO1

Activate serial port ttyO2:

echo 21 > /sys/kernel/debug/omap_mux/spi0_sclk
echo 1 > /sys/kernel/debug/omap_mux/spi0_d0
cat /sys/kernel/debug/omap_mux/spi0_sclk
cat /sys/kernel/debug/omap_mux/spi0_d0
minicom -o -b9600 -D/dev/ttyO2


Activate serial port ttyO4:

echo 26 > /sys/kernel/debug/omap_mux/gpmc_wait0
echo 6 > /sys/kernel/debug/omap_mux/gpmc_wpn
cat /sys/kernel/debug/omap_mux/gpmc_wait0
cat /sys/kernel/debug/omap_mux/gpmc_wpn
minicom -o -b9600 -D/dev/ttyO4

Activate serial port ttyO5:

echo 24 > /sys/kernel/debug/omap_mux/lcd_data9
echo 4 > /sys/kernel/debug/omap_mux/lcd_data8
cat /sys/kernel/debug/omap_mux/lcd_data9
cat /sys/kernel/debug/omap_mux/lcd_data8
minicom -o -b9600 -D/dev/ttyO5