Beaglebone
Contents
Accessing console
From [1]
Windows
Install drivers 32bit or 64bit
Linux
Quick start
sudo modprobe ftdi_sio vendor=0x0403 product=0xa6d0
Proper Fix
Add the following to "/etc/udev/rules.d/73-beaglebone.rules"
ACTION=="add", SUBSYSTEM=="usb", ENV{DEVTYPE}=="usb_interface", \ ATTRS{idVendor}=="0403", ATTRS{idProduct}=="a6d0", \ DRIVER=="", RUN+="/sbin/modprobe -b ftdi_sio" ACTION=="add", SUBSYSTEM=="drivers", \ ENV{DEVPATH}=="/bus/usb-serial/drivers/ftdi_sio", \ ATTR{new_id}="0403 a6d0" ACTION=="add", KERNEL=="ttyUSB*", ATTRS{interface}=="BeagleBone", \ ATTRS{bInterfaceNumber}=="00", SYMLINK+="beaglebone-jtag" ACTION=="add", KERNEL=="ttyUSB*", ATTRS{interface}=="BeagleBone", \ ATTRS{bInterfaceNumber}=="01", SYMLINK+="beaglebone-serial"
Then run
sudo udevadm control --reload-rules
Serial Ports
These are not available in the default mux settings.
Mux settings can be changed by writing to
/sys/kernel/debug/omap_mux/
Then the file name is the MODE0 usage of the pin - see the SRM for details.
ttyO0
USB Console
ttyO1
echo 0 > /sys/kernel/debug/omap_mux/uart1_txd echo 20 > /sys/kernel/debug/omap_mux/uart1_rxd
ttyO2
echo 1 > /sys/kernel/debug/omap_mux/spi0_d0 echo 21 > /sys/kernel/debug/omap_mux/spi0_sclk
ttyO3
echo 1 > /sys/kernel/debug/omap_mux/ecap0_in_pwm0_out
Not available for expansion boards.
ttyO4
echo 06 > /sys/kernel/debug/omap_mux/gpmc_wpn echo 26 > /sys/kernel/debug/omap_mux/gpmc_wait0
ttyO5
echo 4 > /sys/kernel/debug/omap_mux/lcd_data8 echo 24 > /sys/kernel/debug/omap_mux/lcd_data9
I2C
echo "2" > /sys/kernel/debug/omap_mux/i2c0_scl echo "2" > /sys/kernel/debug/omap_mux/i2c0_sda
Makes the i2c bus appear on P9-19 and P9-20. It automatically does this in the latest kernel version.
This is i2c-3 in software
i2cdetect -r -y 3
Lists devices on the i2c bus.
UU means in use -- Nothing detected xx Address of device
RTC
echo ds3232 0x68 >/sys/bus/i2c/devices/i2c-3/new_device
Tells the kernel about the RTC it can then be configured using hwclock
hwclock -f /dev/rtc1 --set --date="9/22/96 16:45:05"
Needs to be used for the initial setting - after that the following commands can be used
hwclock -f /dev/rtc1 -r
Reads the current time from the hwclock
hwclock -f /dev/rtc1 -s
Sets the current system time from the hwclock
hwclock -f /dev/rtc1 -w
writes the system time to the hwclock.
GPIO
GPIO number = 32*First # + Second #
http://akademii.blogspot.co.uk/2012/02/beaglebone-gpio-testing.html
Have to change mux settings so gpio is output
Export the GPIO e.g.
echo "34" > /sys/class/gpio/export
Turn on/off
echo "high" > /sys/class/gpio/gpio34/direction echo "low" > /sys/class/gpio/gpio34/direction
GPIO 1_0
echo "7" > /sys/kernel/debug/omap_mux/gpmc_ad0
GPIO 1_1
echo "7" > /sys/kernel/debug/omap_mux/gpmc_ad1
GPIO 1_2
echo "7" > /sys/kernel/debug/omap_mux/gpmc_ad2
GPIO 1_3
echo "7" > /sys/kernel/debug/omap_mux/gpmc_ad3
THIS ONE APPEARS TO BE BROKEN AT THE MOMENT
required software install
sudo apt-get install vim ctags subversion ppp build-essential wget python ipython pylint pep8 pychecker python-serial automake