Can´t echo to slotsfile

185 views
Skip to first unread message

Beagle Boner

unread,
May 11, 2017, 3:50:05 AM5/11/17
to BeagleBoard
Hi there,

I´m using Debian Jessie 8.7 (Kernel 4.4.54) on my BBB. In the long-run I want to connect a LCD Display via the 16Bit Interface to the BBB. So I have to disabled the HDMI (Audio/Video) by uncommenting this in the uEnv.txt right?

##BeagleBone Black: HDMI (Audio/Video) disabled:
dtb=am335x-boneblack-emmc-overlay.dtb

I also commented this line.

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


But for now I try to load anything to my slotsfile, for example the PWM, but it seems like nothing happens:

debian@beaglebone:/lib/firmware$ export SLOTS=/sys/devices/platform/bone_capemgr/slots
debian@beaglebone:/lib/firmware$ sudo echo "BB-PWM1-00A0.dtbo > $SLOTS"
BB-PWM1-00A0.dtbo > /sys/devices/platform/bone_capemgr/slots

When I cat the slotsfile, nothing is loaded.

debian@beaglebone:/lib/firmware$ cat $SLOTS
 0: PF----  -1
 1: PF----  -1
 2: PF----  -1
 3: PF----  -1

What am I doing wrong?

To connect a 4.3" LCD (it´s not a cape) to my BBB I have to load a LCD overlay, for example the "
BB-BONE-LCD4-01-00A1.dtbo", which my 4D Systems LCD Cape uses, right? Can I adapt that dtbo to make it work with my non-cape display?


Cheers,

Max


Chad Baker

unread,
May 11, 2017, 7:49:09 AM5/11/17
to beagl...@googlegroups.com
Try
sudo echo BB-PWM1 > /sys/devices/platform/bone_capemgr/slots
You can decompile the dtb by
dtc -@ -I dtb -O dtc -o
BB-BONE-LCD4-01-00A1.dts BB-BONE-LCD4-01-00A1.dtbo
Chad

--
For more options, visit http://beagleboard.org/discuss
---
You received this message because you are subscribed to the Google Groups "BeagleBoard" group.
To unsubscribe from this group and stop receiving emails from it, send an email to beagleboard...@googlegroups.com.
To view this discussion on the web visit https://groups.google.com/d/msgid/beagleboard/dbc381d2-2bb5-4b70-a810-b0e271b08e49%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


--
Chad Baker Memphis, TN

Robert Nelson

unread,
May 11, 2017, 9:44:11 AM5/11/17
to Beagle Board, boner...@gmail.com
On Thu, May 11, 2017 at 2:50 AM, Beagle Boner <boner...@gmail.com> wrote:
> Hi there,
>
> I´m using Debian Jessie 8.7 (Kernel 4.4.54) on my BBB. In the long-run I
> want to connect a LCD Display via the 16Bit Interface to the BBB. So I have
> to disabled the HDMI (Audio/Video) by uncommenting this in the uEnv.txt
> right?
>
> ##BeagleBone Black: HDMI (Audio/Video) disabled:
> dtb=am335x-boneblack-emmc-overlay.dtb
>
> I also commented this line.
>
> #In the event of edid real failures, uncomment this next line:
> #cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable
> video=HDMI-A-1:1024x768@60e
>
>
> But for now I try to load anything to my slotsfile, for example the PWM, but
> it seems like nothing happens:
>
> debian@beaglebone:/lib/firmware$ export
> SLOTS=/sys/devices/platform/bone_capemgr/slots
> debian@beaglebone:/lib/firmware$ sudo echo "BB-PWM1-00A0.dtbo > $SLOTS"
> BB-PWM1-00A0.dtbo > /sys/devices/platform/bone_capemgr/slots

You can't "sudo echo >"

sudo sh -C "echo 'BB-PWM1-00A0.dtbo' > /sys/devices/platform/bone_capemgr/slots"

The source for all the overlays is available here:

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

Regards,

--
Robert Nelson
https://rcn-ee.com/

Beagle Boner

unread,
May 15, 2017, 9:19:19 AM5/15/17
to BeagleBoard
Thanks for your response guys,

i figgured out that you have to be root to echo into the slotsfile, sudo with debian user is not enough.
Just in case someone else has the same issue: When you write an overlay for your custom cape, you have to include it over /etc/defaut/capemgr, NOT via /boot/uEnv ! This is for Debian Jessie 8.7 (4.4.54). All the changes with different kernels are confusing me so much as a beginner.

Cheers!

Robert Nelson

unread,
May 15, 2017, 9:50:29 AM5/15/17
to Beagle Board, Beagle Boner
On Mon, May 15, 2017 at 8:19 AM, Beagle Boner <boner...@gmail.com> wrote:
> Thanks for your response guys,
>
> i figgured out that you have to be root to echo into the slotsfile, sudo
> with debian user is not enough.

That's incorrect, and stated in my previous email

sudo echo "something" > "somewhere"

doesn't work..

You need to:

sudo sh -C "echo 'BB-PWM1-00A0.dtbo' > /sys/devices/platform/bone_capemgr/slots"

Then it works..


> Just in case someone else has the same issue: When you write an overlay for
> your custom cape, you have to include it over /etc/defaut/capemgr, NOT via
> /boot/uEnv !

This just means the *.dtbo file isn't in the "initramfs"..

sudo update-initramfs -uk `uname -r`

and reboot..


>This is for Debian Jessie 8.7 (4.4.54). All the changes with
> different kernels are confusing me so much as a beginner.

manelo...@gmail.com

unread,
Jul 6, 2018, 5:42:12 PM7/6/18
to BeagleBoard
Hi Robert,

I've tried your solution by typing : sudo sh -C "echo 'bone_pwm_P9_14' > /sys/devices/platform/bone_capemgr/slots" 
But it didn't work. I have the following error : sh: 0: Can't open echo 'bone_pwm_P9_14' >/sys/devices/platform/bone_capemgr/slots 

I just want to control the PWM module from pin P9_14. How can I do that in the latest debian image ?

Thank you very much

Robert Nelson

unread,
Jul 6, 2018, 5:53:28 PM7/6/18
to Beagle Board, Manel O.
On Fri, Jul 6, 2018 at 2:42 PM, <manelo...@gmail.com> wrote:
> Hi Robert,
>
> I've tried your solution by typing : sudo sh -C "echo 'bone_pwm_P9_14' >
> /sys/devices/platform/bone_capemgr/slots"
> But it didn't work. I have the following error : sh: 0: Can't open echo
> 'bone_pwm_P9_14' >/sys/devices/platform/bone_capemgr/slots
>
> I just want to control the PWM module from pin P9_14. How can I do that in
> the latest debian image ?

The slots file is long gone..

You should be able to just do:

config-pin P9.14 pwm

Then

cd /sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip*/

echo 0 > export
echo 20000 > pwm*/period
echo 10000 > pwm*/duty_cycle
echo 1 > pwm*/enable

If that doesn't work, run:

sudo /opt/scripts/tools/version.sh

and we can see what's not fully configured..

Paul Steinke

unread,
Mar 28, 2019, 11:48:18 AM3/28/19
to BeagleBoard
How would I write this in C Source code on the ARM, instead of writing it in a terminal command window through SSH?

Paul Steinke

unread,
Mar 28, 2019, 11:49:49 AM3/28/19
to BeagleBoard
By 'this', I mean the following: 
    config-pin P9.14 pwm 

    cd /sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip*/ 
    echo 0 > export 
    echo 20000 > pwm*/period 
    echo 10000 > pwm*/duty_cycle 
    echo 1 > pwm*/enable 

Robert Nelson

unread,
Mar 28, 2019, 12:00:02 PM3/28/19
to Beagle Board, pstei...@gmail.com
On Thu, Mar 28, 2019 at 10:50 AM Paul Steinke <pstei...@gmail.com> wrote:
>
> By 'this', I mean the following:
> config-pin P9.14 pwm
> cd /sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip*/
> echo 0 > export
> echo 20000 > pwm*/period
> echo 10000 > pwm*/duty_cycle
> echo 1 > pwm*/enable

c has a system function.

https://www.tutorialspoint.com/c_standard_library/c_function_system.htm
Reply all
Reply to author
Forward
0 new messages