YMMV

* your mileage may vary

Tuesday, 29 December 2015

Beaglebone Black (BBB) UART2 loopback test

Check UART port on BBB using loop-back test.  Normally UART2 is used by HDMI so it is necessary to disable the HDMI on boot.
BBB Environment
root@beaglebone:~# uname -r && cat /etc/dogtag
4.1.13-ti-r33BeagleBoard.org Debian Image 2015-11-12 

changed /boot/uEnv.txt to disable HDMI:
##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb

Reboot

Setup the UART2
export SLOTS=/sys/devices/platform/bone_capemgr/slots
echo 'BB-UART2' > $SLOTS

Check the setup
cat $SLOTS 
0: PF----  -1
1: PF----  -1
2: PF----  -1
3: PF----  -1
4: P-O-L-   0 Override Board Name,00A0,Override Manuf,BB-UART2

root@beaglebone:~# ls /dev/ttyO*
/dev/ttyO0  /dev/ttyO2


Setup the serial port
root@beaglebone:~# stty -F /dev/ttyO2 115200 raw -echo

Wire the BBB
Jumper pins P9.21<=>P9.22

Run the loop-back test

Putty Session 1
cat /dev/ttyO2

Putty Session 2
echo "hello world" >/dev/ttyO2

No comments:

Post a Comment