Wednesday, June 28, 2017

Using the Beaglebone Serial Ports

The Beaglebone Black has four (five if you count the incomplete port 3; six if you count the debug header) serial ports. It used to be possible to enable them by adding the line

cape_enable=bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4,BB-UART5

in /boot/uEnv.txt.

In the newer console images (> 2017-02) however this no longer works (echo to /dev/ttySX would proceed but nothing comes out of the actual pins). After some experiment, adding these lines instead of the line above solved the issue:

uboot_overlay_addr4=/lib/firmware/BB-UART1-00A0.dtbo
uboot_overlay_addr5=/lib/firmware/BB-UART2-00A0.dtbo
uboot_overlay_addr6=/lib/firmware/BB-UART4-00A0.dtbo
uboot_overlay_addr7=/lib/firmware/BB-UART5-00A0.dtbo

They are also renamed from /dev/ttyOX to /dev/ttySX, though there are symlinks in place for backward compatibility.


Relevant links:
http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_.2Fboot.2FuEnv.txt_configuration

https://github.com/beagleboard/bb.org-overlays