Can´t echo to slotsfile

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

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

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,

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!

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.

Regards,

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

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

Regards,

How would I write this in C Source code on the ARM, instead of writing it in a terminal command window through SSH?

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

Regards,