Difference between revisions of "BeagleBone/Serial Port"

From eLinux.org
Jump to: navigation, search
(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...")
 
(Ubuntu)
Line 4: Line 4:
 
== Ubuntu ==
 
== Ubuntu ==
  
The following configuration commands work on [http://www.armhf.com/index.php/boards/beaglebone-black ARMhf] Ubuntu.
+
The following configuration commands work on [[BeagleBoardUbuntu|rcn-ee]] Ubuntu.
 
They have been entered by the <code>root</code> user.
 
They have been entered by the <code>root</code> user.
 
Other users would have to <code>sudo</code> these commands.
 
Other users would have to <code>sudo</code> these commands.
 +
 +
It doesn't work on [http://www.armhf.com/index.php/boards/beaglebone-black ARMhf] Ubuntu.
 +
This version of Linux doesn't have the <code>/sys/kernel/debug/omap_mux</code> path built-in.
  
 
The [http://beagleboardtoys.info/index.php?title=BeagleBone_RS232 CircuitCo BeagleBone RS232 cape] has an EEPROM which automatically enables <code>ttyO2</code>.
 
The [http://beagleboardtoys.info/index.php?title=BeagleBone_RS232 CircuitCo BeagleBone RS232 cape] has an EEPROM which automatically enables <code>ttyO2</code>.

Revision as of 08:45, 28 July 2013

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 rcn-ee Ubuntu. They have been entered by the root user. Other users would have to sudo these commands.

It doesn't work on ARMhf Ubuntu. This version of Linux doesn't have the /sys/kernel/debug/omap_mux path built-in.

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