Cape Universal not enabled

Hi all,

I was using the image bone-debian-8.7-lxqt-4gb-armhf-2017-03-19-4gb.img for a GUI application and pins and pwms were configured with config-pin command. This could be done with Cape Universal enabled.

But now when I am using the latest images, the /boot/uEnv.txt is changed as per the https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays.

And with this image, when I try to run the application it is showing the following error messages:

Pin has no cape: P9_13
P9_24 pinmux file not found!
Pin has no cape: P9_24
P9_26 pinmux file not found!
Pin has no cape: P9_26
P9_17 pinmux file not found!
Pin has no cape: P9_17

Also in my code, I was accessing files from folders like /sys/class/pwm/pwmchip2. But these folders are not there now.

I think, if we are changing to u-boot overlays, then we have to change our source code. So it is better to stick to the old kernel overlays.

As per the web page https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays, I tried to enable Cape Universal by disabling “enable_uboot_overlays=1” in /boot/uEnv.txt. But still it is not working*.*

Now I used the the image bone-debian-9.1-lxqt-armhf-2017-08-31-4gb.img and the uEnv.txt is as shown below.

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

uname_r=4.9.45-ti-r57
#uuid=
#dtb=

###U-Boot Overlays###
###Documentation: http://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays
###Master Enable
#enable_uboot_overlays=1

Hello,

Did you try to user this command for config-pin related modes: sudo config-pin P9.14 pwm and etc?

If so, you may need to update your bootloader by flashing the eMMC and then adding your new image and kernel to an SD Card (if you want to use an SD Card).

Seth

P.S. https://elinux.org/Beagleboard:BeagleBoneBlack_Debian#U-Boot_Overlays.

Hello,

I say update to a newer image. bbb.io/latest-images has a new image w/out GUI. You can use config-pin w/ that newer image/kernel.

Seth

P.S. Then what I typed out before is then relevant.

Hi Mala Dies,

Sorry. I have been busy with scheduled tasks. So I couldn’t spare time for testing your suggestions and giving a feedback.

As You suggested, I took the latest image and immediately tried sudo config-pin P9.14 pwm command. It is working!!

debian@beaglebone:~$ sudo config-pin P9.14 pwm
debian@beaglebone:~$ cd /sys/class/pwm
debian@beaglebone:/sys/class/pwm$ ls
pwmchip0 pwmchip1 pwmchip3 pwmchip5 pwmchip6
debian@beaglebone:/sys/class/pwm$

But when I check /sys/class/pwm folder pwmchip2 folder is seen. In my previous software, I have used this folder.

At present this is my feedback. It is in the late evening now. I will do more test tomorrow and give further feedback.

Would You please tell me why pwmchip2 folder is not there now?

Thanks in advance for the help.

Thanks & Regards,
Sajeevan.K

Hello Sajeevan,

Seth here. Um, I will boot my board and check the status of the pwmchip2 on the PATH /sys/class/pwm/.

Seth

P.S. I will return service later. Oh and no rush. Do not feel like you need to reply or else or something. When you have time, just try to reply and I will return service.

Hello,

savBBB.JPG

Okay…

That photo describes the eight PWM chips, right? Well, as far as I can figure out, there are really only seven chips. Now, if the i2c chip for Cape management is being referenced as one, then so be it. The two/four timers are available. I am not sure if those can be adjusted w/ the config-pin utility or not. I did go to /sys/class/pwm/ and found that there are no single or mutliple chips listed for 2, e.g. pwmchip2 and etc…

So, maybe you can adjust something or tell me what you are trying to accomplish. For instance, if you want to use some of the other pwmchip(s), you can and should.

Seth

P.S. If you can find time, please let me know if you find out any info. on this subject. You could try to set each of the pwm pins up for use w/ the config-pin utility. If not, reply and I will check it out again.

Okay…

This is what I currently understand about this whole idea involving the pwmchip2 and /sys/class/pwm/…

I think where we both should have been looking is in /dev/pwm/. There is where the pwm peripherals are found w/ two pins for each one.

Also…ecap2 in /dev/pwm/, which can be configured as a pwm output, conflicts w/ HDMI audio on the boards. You may need to adjust your /uEnv.txt file to suit the needs of this action.

That file can found in the /boot directory.

Seth

P.S. Those symlinks in /dev/pwm/ should make it easy to understand which pwm peripheral you are using and have configured.

So…ls -l /dev/pwm should give you the correct printout of peripherals available.

Hi Mala Dies,

I have got the solution for the problem I faced. But for this solution, I need to have some changes in my old software.
In /sys/class/pwm folder there are folders like pwmchip0, pwmchip1 etc. The names of these folders are much important. Just use the command ls -al

root@beaglebone:/sys/class/pwm# ls -al
total 0
drwxrwxr-x 2 root pwm 0 Jan 1 2000 .
drwxr-xr-x 61 root root 0 Jan 1 2000 …
lrwxrwxrwx 1 root pwm 0 Oct 7 17:37 pwmchip0 → …/…/devices/platform/ocp/48300000.epwmss/48300100.ecap/pwm/pwmchip0
lrwxrwxrwx 1 root pwm 0 Oct 7 17:37 pwmchip1 → …/…/devices/platform/ocp/48300000.epwmss/48300200.pwm/pwm/pwmchip1
lrwxrwxrwx 1 root pwm 0 Oct 7 17:37 pwmchip3 → …/…/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3
lrwxrwxrwx 1 root pwm 0 Oct 7 17:37 pwmchip5 → …/…/devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip5
lrwxrwxrwx 1 root pwm 0 Oct 7 17:37 pwmchip6 → …/…/devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6

Here we need to find the addresses like 0x4830_0100 corresponds to which pwm, by looking into the following documents

  1. AM335x ARM Cortex A8 MicroProcessors Technical Reference Manual(Table 2-3)

  2. http://beagleboard.org/support/bone101

And we should enable PWMs which is really available; pins alloted for other functions should not be configured as pwm (See the web page : http://beagleboard.org/support/bone101; Only 5 are there).

Thank You very much for the support.

Thanks & Regards,
Sajeevan.K

Thanks & Regards,
Sajeevan.K

Hello Saj,

Seth here. I am glad you figured out what you were trying to accomplish.

Seth

P.S. If something comes up and you need additional support, I guess just post as usual. You also can use those eCap peripherals as pwm pins w/ config-pin xx.xx pwm and etc…