[beagleboard] Re: Cape Universal not enabled

2018-12-20 Thread Mala Dies
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...

On Thursday, December 20, 2018 at 6:24:26 AM UTC-6, sajeevan k wrote:
>
> 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/4830.epwmss/48300100.ecap/pwm/pwmchip0
> lrwxrwxrwx  1 root pwm  0 Oct  7 17:37 pwmchip1 -> 
> ../../devices/platform/ocp/4830.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
>
> On Thursday, December 20, 2018 at 3:19:29 AM UTC+5:30, Mala Dies wrote:
>>
>> 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. 
>>
>> On Wednesday, December 19, 2018 at 7:40:27 AM UTC-6, sajeevan k wrote:
>>>
>>> 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
>>>
>>> On Wednesday, December 19, 2018 at 8:53:59 AM UTC+5:30, Mala Dies wrote:

 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. 

 On Saturday, December 15, 2018 at 7:26:18 AM UTC-6, sajeevan k wrote:
>
> 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_2

Re: [beagleboard] /sys/class/gpio/export not idempotent, unexports gpios

2018-12-20 Thread Tarmo Kuuse


On Thursday, 20 December 2018 20:04:17 UTC+2, Tarmo Kuuse wrote:
>
> On Monday, 3 December 2018 08:35:22 UTC+2, Ken Shirriff wrote:
>>
>> libgpiod looks like a nice API. I tried it out, but I'm rather baffled by 
>> the behavior. If I try to set a pin with gpioset, it turns the pin off and 
>> unexports it.
>>
>> $ config-pin P8_44 1 # This turns P8_44 on as expected
>> $ gpioset gpiochip2 9=1 # Should turn on gpio2[9], i.e. P8_44, but turns 
>> it off.
>> $ config-pin P8_44 1# Now config-pin can't access the pin???
>> WARNING: GPIO pin not exported, cannot set direction or value!
>>
>> So why does gpioset turn the pin off instead of on? This isn't specific 
>> to P8_44; for instance "gpioset gpiochip2 7=1" will mess up P8_46 
>> (gpio2[7]). This also happens even if I don't use config-pin, so it's not 
>> config-pin messing things up.
>>
>
> I'm also having problems with libgpiod - it simply does not work on a BBB 
> with kernel 4.14.71-ti-r80. Cape universal is disabled, relevant pins are 
> not exported via sysfs gpio interface.
>
> Example: I'm trying to set P9.23 a.k.a. gpio number 49 (gpiochip 1, pin 
> 17) and absolutely nothing happens. The pin stays in some high-z state, 
> measuring 0.6 volts:
> $ sudo gpioset gpiochip1 17=0
> $ sudo gpioset gpiochip1 17=1
>
> Running "gpioinfo gpiochip1" shows my pin as output, while it's definitely 
> not that:
> ...
> line  17:"GPMC_A1"   unused  output  active-high
> ...
>
> Also tried to control each of the user LEDs on pins 21-24 on the same port 
> with very strange results. I managed to switch on usr1 or usr2 and no 
> further changes are possible - the one LED won't turn off and the others 
> won't turn on. Also wrote a small C program which uses the "linux/gpio.h" 
> API - doesn't do anything useful to any of the pins.
>
> Am I missing something here?
>

And the usual sysfs interface on the same works just fine. Verified with a 
multimeter.
# echo 49 > /sys/class/gpio/export
# echo low > /sys/class/gpio/gpio49/direction
# echo high > /sys/class/gpio/gpio49/direction

--
Kind regards,
Tarmo Kuuse

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/81ef87e8-ea04-4d4c-87be-bdbefc2a273e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] /sys/class/gpio/export not idempotent, unexports gpios

2018-12-20 Thread Tarmo Kuuse
On Monday, 3 December 2018 08:35:22 UTC+2, Ken Shirriff wrote:
>
> libgpiod looks like a nice API. I tried it out, but I'm rather baffled by 
> the behavior. If I try to set a pin with gpioset, it turns the pin off and 
> unexports it.
>
> $ config-pin P8_44 1 # This turns P8_44 on as expected
> $ gpioset gpiochip2 9=1 # Should turn on gpio2[9], i.e. P8_44, but turns 
> it off.
> $ config-pin P8_44 1# Now config-pin can't access the pin???
> WARNING: GPIO pin not exported, cannot set direction or value!
>
> So why does gpioset turn the pin off instead of on? This isn't specific to 
> P8_44; for instance "gpioset gpiochip2 7=1" will mess up P8_46 (gpio2[7]). 
> This also happens even if I don't use config-pin, so it's not config-pin 
> messing things up.
>

I'm also having problems with libgpiod - it simply does not work on a BBB 
with kernel 4.14.71-ti-r80. Cape universal is disabled, relevant pins are 
not exported via sysfs gpio interface.

Example: I'm trying to set P9.23 a.k.a. gpio number 49 (gpiochip 1, pin 17) 
and absolutely nothing happens. The pin stays in some high-z state, 
measuring 0.6 volts:
$ sudo gpioset gpiochip1 17=0
$ sudo gpioset gpiochip1 17=1

Running "gpioinfo gpiochip1" shows my pin as output, while it's definitely 
not that:
...
line  17:"GPMC_A1"   unused  output  active-high
...

Also tried to control each of the user LEDs on pins 21-24 on the same port 
with very strange results. I managed to switch on usr1 or usr2 and no 
further changes are possible - the one LED won't turn off and the others 
won't turn on. Also wrote a small C program which uses the "linux/gpio.h" 
API - doesn't do anything useful to any of the pins.

Am I missing something here?

--
Kind regars,
Tarmo 

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7baee28e-eb9b-4282-ba23-fc98bdf2f8c3%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Unable to locate package in beaglebone black Rev C with Debian 8

2018-12-20 Thread Tarmo Kuuse
On Thursday, 20 December 2018 06:08:03 UTC+2, aleka...@gmail.com wrote:
>
> I am a newbie for beaglebone black. I got my beaglebone black few days 
> before and trying to install matplotlib. I am getting E:Unable to locate 
> package python-matplotlib.  
>
> I got my beaglebone black Rev C with debian 8 jessie and python 2.7  
> installed
>
> I tried following commands to install matplotlib:
>
> sudo apt-get install python-matplotlib
> pip install python-matplotlib
>
> then I tried update and upgrade and again tried above commands but no 
> success.
>
> Any help would be very useful. As I am stuck.
>

According to the Debian package documentation jessie should contain 
"python-matplotlib" with version 1.4.2:
https://packages.debian.org/search?suite=default§ion=all&arch=any&searchon=names&keywords=python-matplotlib

The commands to install the Debian package (omit the dollar sign):
$ sudo apt-get update
$ sudo apt-get install python-matplotlib

You may also look for a matching package in the repository:
$ apt-cache search matplotlib

--
Kind regards,
Tarmo

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/eeaeb6ff-9938-4cf3-b50f-8708001e75f0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Parallel NOR via GPMC

2018-12-20 Thread Lior Y. Benjamin
Sorry for multiple posts, I guess I posted it in the wrong forum, so I am 
posting here again:

I  am trying to connect a parallel NOR over beaglebone black. I used the 
online TI PINMUX TOOL for that, and connected the NOR correspondingly.

Yet, although I see that the kernel code tries to identify any connected 
NOR device (I see the code reaching to the send-command functions), it ends 
up with:
of-flash 800.nor: do_map_probe() failed for type cfi_probe

What I observed using logic analyzer, is that the control lines, during CFI 
(WE, CS) are not toggled correctly, or at all.
Does any one have an idea?

my device tree is as follows

&am33xx_pinmux {

bbcape_nor_flash_pins: bbcape_nor_flash_pins {

pinctrl-single,pins = <

0x6c (PIN_OUTPUT | 
MUX_MODE4) /* (V17) gpmc_a11.gpmc_a27 */

0x68 (PIN_OUTPUT | 
MUX_MODE4) /* (T16) gpmc_a10.gpmc_a26 */

0x104 (PIN_OUTPUT | 
MUX_MODE1) /* (G18) mmc0_cmd.gpmc_a25 */

0x100 (PIN_OUTPUT | 
MUX_MODE1) /* (G17) mmc0_clk.gpmc_a24 */

0xfc (PIN_OUTPUT | 
MUX_MODE1) /* (G16) mmc0_dat0.gpmc_a23 */

0xf8 (PIN_OUTPUT | 
MUX_MODE1) /* (G15) mmc0_dat1.gpmc_a22 */

0xf4 (PIN_OUTPUT | 
MUX_MODE1) /* (F18) mmc0_dat2.gpmc_a21 */

0xf0 (PIN_OUTPUT | 
MUX_MODE1) /* (F17) mmc0_dat3.gpmc_a20 */

0xdc (PIN_OUTPUT | 
MUX_MODE1) /* (T5) lcd_data15.gpmc_a19 */

0xd8 (PIN_OUTPUT | 
MUX_MODE1) /* (V4) lcd_data14.gpmc_a18 */

0xd4 (PIN_OUTPUT | 
MUX_MODE1) /* (V3) lcd_data13.gpmc_a17 */

0xd0 (PIN_OUTPUT | 
MUX_MODE1) /* (V2) lcd_data12.gpmc_a16 */

0xcc (PIN_OUTPUT | 
MUX_MODE1) /* (U4) lcd_data11.gpmc_a15 */

0xc8 (PIN_OUTPUT | 
MUX_MODE1) /* (U3) lcd_data10.gpmc_a14 */

0xc4 (PIN_OUTPUT | 
MUX_MODE1) /* (U2) lcd_data9.gpmc_a13 */

0xc0 (PIN_OUTPUT | 
MUX_MODE1) /* (U1) lcd_data8.gpmc_a12 */

0xec (PIN_OUTPUT | 
MUX_MODE1) /* (R6) lcd_ac_bias_en.gpmc_a11 */

0xe8 (PIN_OUTPUT | 
MUX_MODE1) /* (V5) lcd_pclk.gpmc_a10 */

0xe4 (PIN_OUTPUT | 
MUX_MODE1) /* (R5) lcd_hsync.gpmc_a9 */

0xe0 (PIN_OUTPUT | 
MUX_MODE1) /* (U5) lcd_vsync.gpmc_a8 */

0xbc (PIN_OUTPUT | 
MUX_MODE1) /* (T4) lcd_data7.gpmc_a7 */

0xb8 (PIN_OUTPUT | 
MUX_MODE1) /* (T3) lcd_data6.gpmc_a6 */

0xb4 (PIN_OUTPUT | 
MUX_MODE1) /* (T2) lcd_data5.gpmc_a5 */

0xb0 (PIN_OUTPUT | 
MUX_MODE1) /* (T1) lcd_data4.gpmc_a4 */

0xac (PIN_OUTPUT | 
MUX_MODE1) /* (R4) lcd_data3.gpmc_a3 */

0xa8 (PIN_OUTPUT | 
MUX_MODE1) /* (R3) lcd_data2.gpmc_a2 */

0xa4 (PIN_OUTPUT | 
MUX_MODE1) /* (R2) lcd_data1.gpmc_a1 */

0xa0 (PIN_OUTPUT | 
MUX_MODE1) /* (R1) lcd_data0.gpmc_a0 */

 

0x1c (PIN_INPUT | 
MUX_MODE0) /* (T9) gpmc_ad7.gpmc_ad7 */

0x18 (PIN_INPUT | 
MUX_MODE0) /* (R9) gpmc_ad6.gpmc_ad6 */

0x14 (PIN_INPUT | 
MUX_MODE0) /* (V8) gpmc_ad5.gpmc_ad5 */

0x10 (PIN_INPUT | 
MUX_MODE0) /* (U8) gpmc_ad4.gpmc_ad4 */

0xc (PIN_INPUT | MUX_MODE0) 
/* (T8) gpmc_ad3.gpmc_ad3 */

0x8 (PIN_INPUT | MUX_MODE0) 
/* (R8) gpmc_ad2.gpmc_ad2 */

0x4 (PIN_INPUT | MUX_MODE0) 
/* (V7) gpmc_ad1.gpmc_ad1 */

0x0 (PIN_INPUT | MUX_MODE0) 
/* (U7) gpmc_ad0.gpmc_ad0 */

 

0x70 (PIN_INPUT | 
MUX_MODE0) /* (T17) gpmc_wait0.gpmc_wait0 */

0x8c (PIN_INPUT | 
MUX_MODE2) /* (V12) gpmc_clk.gpmc_wait1 */


Re: [beagleboard] AM5728: BeagleBoard-X15 USB not working

2018-12-20 Thread Robert Nelson
On Thu, Dec 20, 2018 at 6:49 AM  wrote:
>
>
>  just compiled Linux kernel for BeagleBoard-X15 but somehow USB is not working
>
> Kernel compile instructions:
>
> $ git clone https://github.com/torvalds/linux
> $ cd linux
> $ export ARCH=arm
> $ export 
> CROSS_COMPILE=~/x-tools/arm-cortexa9_neon-linux-gnueabihf/bin/arm-cortexa9_neon-linux-gnueabihf-
> $ make omap2plus_defconfig
> $ make menuconfig
> $ make uImage LOADADDR=0x8200 -j4
> $ make -j4
>
> The kernel boots fine but there are USB errors:
>
> [3.106985] dwc3 4889.usb: Failed to get clk 'ref': -2
>
> Any help would be appreciated, find below complete log.
>
> Regards
> Marcel
>
>
> For bootlog and kernel configuration refer to
> Refer to https://e2e.ti.com/support/processors/f/791/t/756622

You should really report this to the linux-omap mailing list:

http://vger.kernel.org/vger-lists.html#linux-omap

So it can be fixed asap.

Regards,

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

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/CAOCHtYjv_eoH8VB78UA%3DKTrqTJBdP8M6%3DH0kOXX7SCgWT%2B8UGQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Connecting WifFi Module on SDIO (MMC2) of BBB

2018-12-20 Thread mahegaik


[image: PINS_Mapping_MMC2.png]
I am preparing hardware connections with BBB to have an WiFi Module 
interfaced with BBB on SDIO (MMC2)
I am attaching the connections i did.
Plus i have added 10K pullups on Wifi Board which will be interfaced on 
these lines, added pul ups on mmc2_dat0- mmc2_dat3 plus on mmc2_clk and 
mmc2_cmd.

Wanted to know if these connections are appropriate to what i am trying to 
do.

-maheshG

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/7b049bb0-b5e6-4216-b83a-ce9bb3a5ab15%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] AM5728: BeagleBoard-X15 USB not working

2018-12-20 Thread ldxcamera

 just compiled Linux kernel for *BeagleBoard-X15* 
 but somehow USB is not working

*Kernel compile instructions*:

$ git clone *https://github.com/torvalds/linux* 

*$*  cd linux
$ export ARCH=arm
$ export 
CROSS_COMPILE=~/x-tools/arm-cortexa9_neon-linux-gnueabihf/bin/arm-cortexa9_neon-linux-gnueabihf-
 

$ make omap2plus_defconfig
$ make menuconfig
$ make uImage LOADADDR=0x8200 -j4
$ make -j4

The kernel boots fine but there are USB errors:

[3.106985] dwc3 4889.usb: Failed to get clk 'ref': -2

Any help would be appreciated, find below complete log.

Regards
Marcel


For bootlog and kernel configuration refer to 
Refer to https://e2e.ti.com/support/processors/f/791/t/756622

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/9780db9a-4d96-4dbc-93f5-2918e277e6c0%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: SPI-bus is always idle despite writing to /dev/fb0 (fbtft)

2018-12-20 Thread waldroha
I wanted to add some more information:

I increased the debug level through the dts file and it looks like it 
thinks it is writing over the spi2.0 interface:
kern.log: https://pastebin.com/raw/tNPhwfbW
am335x-pocketbeagle.dts: https://pastebin.com/raw/hV9kc81e

I tried the IoT image distributed on beagleboard.org and the fbtft_device 
module does output data on SPI0... which is strange because I removed all 
the dtbo files and replaced the boot/dtbs file with my own.

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/192b76ab-aa10-4b39-b34c-f7c4c0bceb04%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: SPI-bus is always idle despite writing to /dev/fb0 (fbtft)

2018-12-20 Thread waldroha
Sorry for the triple post, I can't find a way to edit previous posts. But I 
narrowed the issue down enough that hopefully someone can answer. After 
switching the tft bus from using spi1 to spi0, it works.

This tree works (spi0): https://pastebin.com/raw/vs4M5XAL
This tree doesn't (spi1): https://pastebin.com/raw/iakK2dPE

-- 
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+unsubscr...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/beagleboard/1b07401e-cd5b-457e-a0f0-89bd9c9bd2ce%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: Cape Universal not enabled

2018-12-20 Thread sajeevan k
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/4830.epwmss/48300100.ecap/pwm/pwmchip0
lrwxrwxrwx  1 root pwm  0 Oct  7 17:37 pwmchip1 -> 
../../devices/platform/ocp/4830.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

On Thursday, December 20, 2018 at 3:19:29 AM UTC+5:30, Mala Dies wrote:
>
> 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. 
>
> On Wednesday, December 19, 2018 at 7:40:27 AM UTC-6, sajeevan k wrote:
>>
>> 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
>>
>> On Wednesday, December 19, 2018 at 8:53:59 AM UTC+5:30, Mala Dies wrote:
>>>
>>> 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. 
>>>
>>> On Saturday, December 15, 2018 at 7:26:18 AM UTC-6, sajeevan k wrote:

 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_o