Enabling UART on Beaglebone Black

China☆狼群 提交于 2019-12-04 17:38:31

Apparently the powers that be like to change files to keep us on our toes.

TamusJRoyce left a comment here: http://www.thing-printer.com/cape-manager-is-back-baby/ that helped me:

/media/BEAGLEBONE/env.txt and /boot/uBoot/uEnv.txt has moved to /etc/default/capemgr (file which may not exist). It also has a new syntax. Add "CAPE=BB-SPI-01,BB-UART1,BB-UART2,BB-UART4" to get main ports working. Then reboot.

To enable UART1 and UART2 on Beaglebone Black Running Debian 8

  • Step 1: sudo nano /etc/default/capemgr
  • Step 2: Change #CAPE= to: CAPE=BB-UART1,BB-UART2
  • Step 3: reboot
  • Step 4: ls /dev/ttyO*
  • result: /dev/ttyO0 /dev/ttyO1 /dev/ttyO2
Serg Stetsuk

You can change /boot/uEnv.txt First of all enable UARTS:

cape_disable=bone_capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
cape_enable=bone_capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4,BB-UART5

Then don't forget to configure pinmux with appropriate dtbo's:

###Overide capes with eeprom
uboot_overlay_addr0=/lib/firmware/BB-UART1-00A0.dtbo
uboot_overlay_addr1=/lib/firmware/BB-UART2-00A0.dtbo
uboot_overlay_addr2=/lib/firmware/BB-UART4-00A0.dtbo
uboot_overlay_addr3=/lib/firmware/BB-UART5-00A0.dtbo

You need to check if the UART pins you are using are being used for other purposes. For this you need to look at the pin diagram first. If there is a conflict, you have to give up things like EMMc or hdmi and you need to make these pins possible. First disable the conflicting configurations in uEnv.txt. Then you can activate the pins as follows.

    #! /bin/sh cd /sys/devices/platform/bone_capemgr File=slots if grep -q "Override Board Name,00A0,Override Manuf,univ-emmc" "$File";  then    
    cd
    echo "\n Pin configuration available"
    echo "\n UART 4 configuration p9.11 and p9.13"
    sudo config-pin P9.11 uart
    sudo config-pin -q P9.11
    sudo config-pin P9.13 uart
    sudo config-pin -q P9.13
    echo "\n UART 1 configuration p9.26 and p9.24"
    sudo config-pin P9.24 uart
    sudo config-pin -q P9.24
    sudo config-pin P9.26 uart
    sudo config-pin -q P9.26
    echo "\n UART 5 configuration p8.38 and p8.37"
    sudo config-pin P8.38 uart
    sudo config-pin -q P8.38
    sudo config-pin P8.37 uart
    sudo config-pin -q P8.37
    echo "\n UART configuration end"  else    
    echo "Oops!!configuration is not available"
    echo "Please check uEnv.txt file and only disable HDMI" fi
易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!