skip to Main Content

I’m trying to use UART5 with python, I’ve edited uEnv.txt to disable HDMI

I’ve upgraded BeagleBone Black to Debian 10 BeagleBoard.org Debian Buster IoT Image 2020-04-06

uname -a shows:

Linux beaglebone 4.19.94-ti-r45 #1buster SMP PREEMPT Thu Jun 18 19:18:41 UTC 2020 armv7l GNU/Linux

I’m trying to use UART5 with python, but it fails with every UART, python shows the message:

py_setup_uart(UART5): set_pin_mode() failed for pin=P8_38Traceback (most recent call last):

when I execute config-pin it shows:

/sys/devices/platform/ocp/ocp:P8_34_pinmux/state failed, No such device

also there is no slots:
/sys/devices/bone_capemgr.*/slots': No such file or directory

dmesg | grep serial shows:

[    1.667328] 44e09000.serial: ttyS0 at MMIO 0x44e09000 (irq = 21, base_baud = 3000000) is a 8250
[    1.699936] 48022000.serial: ttyS1 at MMIO 0x48022000 (irq = 28, base_baud = 3000000) is a 8250
[    1.700824] 48024000.serial: ttyS2 at MMIO 0x48024000 (irq = 29, base_baud = 3000000) is a 8250
[    1.701657] 481a6000.serial: ttyS3 at MMIO 0x481a6000 (irq = 42, base_baud = 3000000) is a 8250
[    1.702467] 481a8000.serial: ttyS4 at MMIO 0x481a8000 (irq = 43, base_baud = 3000000) is a 8250
[    1.703290] 481aa000.serial: ttyS5 at MMIO 0x481aa000 (irq = 44, base_baud = 3000000) is a 8250

here is my /boot/uEnv.txt

#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.19.94-ti-r45
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
enable_uboot_overlays=1
###
###Overide capes with eeprom
#uboot_overlay_addr0=/lib/firmware/<file0>.dtbo
#uboot_overlay_addr1=/lib/firmware/<file1>.dtbo
#uboot_overlay_addr2=/lib/firmware/<file2>.dtbo
#uboot_overlay_addr3=/lib/firmware/<file3>.dtbo
###

###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


###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/<file4>.dtbo
#uboot_overlay_addr5=/lib/firmware/<file5>.dtbo
#uboot_overlay_addr6=/lib/firmware/<file6>.dtbo
#uboot_overlay_addr7=/lib/firmware/<file7>.dtbo
###

###Custom Cape
#dtb_overlay=/lib/firmware/<file8>.dtbo
###
###Disable auto loading of virtual capes (emmc/video/wireless/adc)
#disable_uboot_overlay_emmc=1
disable_uboot_overlay_video=1
#disable_uboot_overlay_audio=1
#disable_uboot_overlay_wireless=1
#disable_uboot_overlay_adc=1
###
###PRUSS OPTIONS
###pru_rproc (4.14.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_rproc (4.19.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-19-TI-00A0.dtbo
###pru_uio (4.14.x-ti, 4.19.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
##Disable HDMI
cape_disable=bone_capemgr.disable_partno=BB-BONELT-HDMI,BB-BONELT-HDMIN
optargs=capemgr.enable_partno=BB-UART1,BB-UART2,BB-UART4,BB-UART5
###
###Debug: disable uboot autoload of Cape
#disable_uboot_overlay_addr0=1
#disable_uboot_overlay_addr1=1
#disable_uboot_overlay_addr2=1
#disable_uboot_overlay_addr3=1
###
###U-Boot fdt tweaks... (60000 = 384KB)
#uboot_fdt_buffer=0x60000
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet

#In the event of edid real failures, uncomment this next line:
#cmdline=coherent_pool=1M net.ifnames=0 lpj=1990656 rng_core.default_quality=100 quiet video=HDMI-A-1:1024x768@60e

##enable Generic eMMC Flasher:
#cmdline=init=/opt/scripts/tools/eMMC/init-eMMC-flasher-v3.sh

please help me

2

Answers


  1. in /boot/uEnv.txt, uncomment disable_uboot_overlay_video=1.

    Things can get complicated if the uncommenting of the _video=1 line does not work.

    I can help further but please reply if it works or not.

    Login or Signup to reply.
  2. The cryptic error "No such device" from config-pin means you tried to select a mode that doesn’t exist for that pin. P8_34 has no uart mode, uart 5 uses P8_37 for txd and either P8_38 or P8_31 for rxd. So for example:

    config-pin P8_37 uart
    config-pin P8_38 uart
    

    You can also use this tiny python module to perform the function of config-pin in your python code, e.g.:

    from bone_pinmux import set_pinmux_state  # https://pastebin.com/MKtWJ8G8
    set_pinmux_state( 'P8_37', 'uart' )
    set_pinmux_state( 'P8_38', 'uart' )
    

    bone_capemgr is obsolete, it no longer exists. I’m guessing the cape_disable=bone_capemgr.disable_partno= line in your /boot/uEnv.txt is some old info you found on the web you tried, but that’s equally obsolete. optargs=capemgr.enable_partno= looks even more ancient.

    Typically you’d just uncomment disable_uboot_overlay_video=1 (like you did) to free up the hdmi-related pins (P8.27-46, P9.25, P9.28-29, P9.31) and use config-pin to configure the pins at runtime.

    Alternatively you can still use overlays if you want to, though preferably you should use the variables uboot_overlay_addr4..7 and dtb_overlay for those. uboot_overlay_addr0..3 are primarily intended to override the auto-detected overlays for actual physical capes (with cape identification eeprom), though in the absence of capes you can use them for additional overlays.

    Keep in mind that if pins are configured by an overlay, they cannot be reconfigured at runtime using config-pin.

    Login or Signup to reply.
Please signup or login to give your own answer.
Back To Top
Search