[beagleboard] Re: PWM wave in pocketbeagle

2021-03-03 Thread Dennis Lee Bieber
On Wed, 3 Mar 2021 06:18:40 -0800 (PST), in
gmane.comp.hardware.beagleboard.user Rafael Meyer

wrote:

>
>I would like to know how to generate a PWM wave with code in python3. 
>

https://adafruit-bbio.readthedocs.io/en/latest/PWM.html

Based upon
https://raw.githubusercontent.com/wiki/beagleboard/pocketbeagle/images/PocketBeagle_pinout.png
there are four pins that support PWM output. P1_33 (defaults to PRU), P1_36
(PWM), P2_1 (PWM), P2_3 (default GPIO).

If Adafruit_BBIO.PWM can't change the pin mode, you may have to play
with config-pin external to the program first.

It looks like PWM has also been added to the blinka/circuitpython
adapter.




-- 
Dennis L Bieber

-- 
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/sdp04g50hhjhfbs5f57la9h1v1orub8dla%404ax.com.


[beagleboard] Re: PWM

2021-01-15 Thread TJF

stl...@gmail.com schrieb am Donnerstag, 14. Jänner 2021 um 23:51:46 UTC+1:

> However, I feel I am missing a bunch of information. Which pwmchip exports 
> to which pwm-X:X and corresponds to which pin? 
>

There're 20 pins for hardware PWM output on BBB (11 on Pocket). Find a list 
(including hardware limits) at

https://users.freebasic-portal.de/tjf/Projekte/libpruio/doc/html/ChaPins.html#sSecPwm

Note: In order to benefit from all that capabilities, you've to use 
libpruio (Phyton binding available).

Regards

-- 
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/5ecd36c8-3893-4f19-900d-bcd91a1289b6n%40googlegroups.com.


[beagleboard] Re: PWM using eCAP module in PRU-ICSS

2020-07-19 Thread Vedant Paranjape
Hi,
I need to add one more thing to this. On running *sudo 
/opt/scripts/tools/version.sh, *this is the output: 
https://pastebin.com/tgwb3u3S

Regards,
Vedant Paranjape
On Monday, July 20, 2020 at 1:36:48 AM UTC+5:30 Vedant Paranjape wrote:

>
> Hi, 
> I wanted to use PRU-ICSS's eCap module to generate PWM signals, It is 
> something I want to implement in my GSoC project. I referred to AM335x TRM 
>  section 15.3, It has a 
> detailed description of how to use ECAP to generate PWM signals at section 
> 15.3.3.5. 
> Since pru_ecap.h was missing bit fields required to use PWM mode, as 
> described in the TRM (15.3.3.5.1) I defined those required bit fields from 
> register descriptions in the TRM (15.3.4). Here's the new header I defined: 
> https://github.com/VedantParanjape/pru-ecap-pwm/blob/master/include/am335x/pru_ecap.h
>
> According to the register value (Table 15-100 and Example 15-13 of the 
> TRM) needed to be set to get it working, I set the registers in my code. 
> Here is my main code which drives the eCap module to generate PWM: 
> https://github.com/VedantParanjape/pru-ecap-pwm/blob/master/main0.c
>
> I am using pru-gcc version: 
>
>
>
>
>
> *pru-gcc (GCC) 10.0.1 20200315 (experimental)Copyright (C) 2020 Free 
> Software Foundation, Inc.This is free software; see the source for copying 
> conditions.  There is NOwarranty; not even for MERCHANTABILITY or FITNESS 
> FOR A PARTICULAR PURPOSE.*
> Command to compile: 
> *pru-gcc main0.c -o pwm -I./inlude/ -I./include/am335x/ -mmcu=am335x.pru0*
>
> Command to load binary and start PRU:
>
> *cp pwm /lib/firmware/am335x-pru0-fw *
>
> *config-pin p9.42 pru_ecap *
> *echo start > /sys/class/remoteproc/remoteproc0/state *
>
> When I load the binary, it loads without any issue, but i fail to get 
> output on p9.42 pin, which is the pr1_ecap pin. I check with a multimeter, 
> It shows Nada, zero Volts.
>
> I am using a BeagleBone Black Wireless: 
> *Linux beaglebone 4.19.94-ti-r45 #1buster SMP PREEMPT Thu Jun 18 19:18:41 
> UTC 2020 armv7l GNU/Linux*
>
> This the output on running *(sudo show-pins | sort*) 
> https://pastebin.com/r2128R9b
> This is my *uEnv.txt*: https://pastebin.com/99qxs8NN
>
> Regards,
> Vedant Paranjape
>

-- 
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/f33e6877-fe45-4d9b-b42c-dd8d4b5091e9n%40googlegroups.com.


[beagleboard] Re: PWM in beagle bone black

2019-08-14 Thread TJF
Hi Luis!

Am Dienstag, 13. August 2019 18:14:53 UTC+2 schrieb Luis Paulo Fernandes de 
Barros:
>
> I recomend you to use adafruit python library ... It is a very easy to use 
> lib and helped me a lot to test GPIO stuff.
>

Check out libpruio 
 
and judge again.

Regards

-- 
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/f2c7a474-c37c-4c23-aad4-7a07c686a731%40googlegroups.com.


[beagleboard] Re: PWM in beagle bone black

2019-08-13 Thread lbarros
Hi Megha,

I recomend you to use adafruit python library to check your uEnv.tx 
configuration and pin choice. It is a very easy to use lib and helped me a 
lot to test GPIO stuff.

Here is a link to a simple 
tutorial:https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/pwm

Em sexta-feira, 2 de agosto de 2019 01:07:38 UTC-3, Megha Bhirade escreveu:
>
>
> Hi,
>
> I got why that error is coming . already i used those pins to UART , so i 
> can't use that pins again to PWM.
>
> i am using P9.14 for pwm, but still also it is not working for me..
>
> i am feeling something i need to add in to uEnv.txt, but i am not getting 
> ..
>
> please suggest me??
>

-- 
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/6829d8fc-54ae-448a-b8e4-996d80d7335f%40googlegroups.com.


[beagleboard] Re: PWM in beagle bone black

2019-08-01 Thread Megha Bhirade

Hi,

I got why that error is coming . already i used those pins to UART , so i 
can't use that pins again to PWM.

i am using P9.14 for pwm, but still also it is not working for me..

i am feeling something i need to add in to uEnv.txt, but i am not getting ..

please suggest me??

-- 
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/063a4722-7e7e-4e7e-ab02-86bf08a07e90%40googlegroups.com.


Re: [beagleboard] Re: PWM in beagle bone black

2019-07-31 Thread Megha Bhirade
Hi ,

i am using kernel version of 4.14.so slots file and bone -capemgr are 
disabled in V4.14 of kernel in the favor of U-boot overlay.

my uEnv.txt file look like this.


debian@beaglebone:/boot$ cat uEnv.txt 
#Docs: http://elinux.org/Beagleboard:U-boot_partitioning_layout_2.0

uname_r=4.14.71-ti-r80
#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/.dtbo
#uboot_overlay_addr1=/lib/firmware/.dtbo
#uboot_overlay_addr2=/lib/firmware/.dtbo
#uboot_overlay_addr3=/lib/firmware/.dtbo
###
###Additional custom capes
#uboot_overlay_addr4=/lib/firmware/.dtbo
#uboot_overlay_addr5=/lib/firmware/.dtbo

uboot_overlay_addr6=/lib/firmware/BB-UART1-00A0.dtbo
uboot_overlay_addr7=/lib/firmware/BB-UART2-00A0.dtbo

###
###Custom Cape
#dtb_overlay=/lib/firmware/.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.4.x-ti kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-4-TI-00A0.dtbo
###pru_rproc (4.14.x-ti kernel)
uboot_overlay_pru=/lib/firmware/AM335X-PRU-RPROC-4-14-TI-00A0.dtbo
###pru_uio (4.4.x-ti, 4.14.x-ti & mainline/bone kernel)
#uboot_overlay_pru=/lib/firmware/AM335X-PRU-UIO-00A0.dtbo
###
###Cape Universal Enable
enable_uboot_cape_universal=1
###
###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... (6 = 384KB)
#uboot_fdt_buffer=0x6
###U-Boot Overlays###

cmdline=coherent_pool=1M net.ifnames=0 quiet

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

#Use an overlayfs on top of a read-only root filesystem:
#cmdline=coherent_pool=1M net.ifnames=0 quiet overlayroot=tmpfs

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

debian@beaglebone:/boot$ 

please help me , here i am missing anything ??

-- 
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/4f16b278-9deb-489c-88ca-e09e87c611ba%40googlegroups.com.


Re: [beagleboard] Re: PWM in beagle bone black

2019-07-30 Thread Megha Bhirade


On Wednesday, July 31, 2019 at 11:10:15 AM UTC+5:30, Megha Bhirade wrote:
>
>
> Hi,
>
> using pwm i am doing some configurations in the beagle bone black..
>
> in /sys/class/pwm/pwmchip1 
>
 echo 0 > export
 echo 1 > export

i can see the 2 pwm are added pwm1:0 , pwm1: 1

using cd pwm1:0  i am assigning the duty cycle , period and enable

if i rebooted the BBB means this configurations are erasing, why i am not 
getting??

using config-pin -l  P9.14 
 config-pin P9.14 pwm 

i am setting pin for pwm as p9.14

in hardware wise i am connecting 1 external led providing 1 connection from 
P9.14 and other end to ground.

but led should glow based on pwm duty-cycle, but here the LED not all 
glowing ???

please suggest me where i am missing??
 

>
>
>

-- 
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/cb9d6d7a-e780-4118-938a-fbf4e46853f7%40googlegroups.com.


Re: [beagleboard] Re: PWM in beagle bone black

2019-07-30 Thread Megha Bhirade

Hi,

using pwm i am doing some configuartions in the beaglebone black..

in /sys/class/pwm/pwmchip1 
   

-- 
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/53b0c422-c2f4-47fa-ba04-067754d00987%40googlegroups.com.


Re: [beagleboard] Re: PWM in beagle bone black

2019-07-30 Thread evilwulfie

https://stackoverflow.com/questions/29369616/beaglebone-black-pwm-using-c

On 7/30/2019 9:35 PM, Megha Bhirade wrote:



Hi,

can anybody suggest me c programing example on the pwm in beagle-bone 
black.

--
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/1d74bedf-24c1-4bfb-883b-037323fcac0a%40googlegroups.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/5edb037c-5987-4129-2460-42bca0da44e7%40gmail.com.


[beagleboard] Re: PWM in beagle bone black

2019-07-30 Thread Megha Bhirade


Hi,

can anybody suggest me c programing example on the pwm in beagle-bone 
black. 

-- 
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/1d74bedf-24c1-4bfb-883b-037323fcac0a%40googlegroups.com.


[beagleboard] Re: PWM in beagle bone black

2019-07-30 Thread TJF
Insiders tip welcome?

Check out libpruio 
 
for easy and powerful PWM (and pinmuxing) features.

Regards

-- 
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/59b2b493-dce1-48b5-8ad3-767428c2e84c%40googlegroups.com.


[beagleboard] Re: PWM in beagle bone black

2019-07-30 Thread Megha Bhirade

In other hand if i try to add some more pwm means it is showing the error 
like this 


debian@beaglebone:/sys/class/pwm$ cd pwmchip0
debian@beaglebone:/sys/class/pwm/pwmchip0$ ls
device  export  npwm  power  pwm-0:0  subsystem  uevent  unexport
debian@beaglebone:/sys/class/pwm/pwmchip0$ echo 3 > export
-bash: echo: write error: No such device

i am not able to add other pwm module... why it is showing the error.

please resolve it

-- 
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/bbc34273-e3d1-4aaf-8901-f1c269383583%40googlegroups.com.


[beagleboard] Re: pwm audio driver on BBB wireless with snd-pwmsp module

2019-07-23 Thread João Manoel
I want to say that I managed to get the pwm sound working.

I was wrong when I said that the pwm sound was on the pin P9.28, in fact, 
this pin is related to the i2s sound from the board that is actually 
connected to the HDMI ic for sound. This explains why the "sound" was very 
noise; I'm surprised that I could listen to it, it is a digital sound data. 
I think that with good filtering it is even possible to remove the noise 
part of it if you have a mono sound for a cheap sound, just thinking Or 
maybe just connect an i2s ic driver and have a good sound :)

Anyway, in this case, the pwmsp module was not even working. To solve this, 
and to not confuse, I added the following line to uEnv.txt:

disable_uboot_overlay_audio=1

This will disable the i2s sound. (I think)
I used the dtbo created from the dts that I attached in the previous 
message on uEnv.txt, and loaded the module with: 

sudo modprobe snd_pwmsp

My system was freezing when I tried to play any sound. I recompiled the pwmsp 
module with the debug option enabled, and I found that the problem was on the 
statement (atomic_set(>timer_active, 1); of the file pwmsp_lib.c

This problem was fixed adding the line: pm_runtime_irq_safe(>dev); to the 
*drivers/pwm/pwm-tiehrpwm.c* (like here 
).
  I recompiled the kernel and the pwm sound worked. I don't know if the line 
added to the pwm driver of the board can 

impact in something else.








Em quarta-feira, 17 de julho de 2019 17:49:15 UTC+2, João Manoel escreveu:
>
> Hi,
>
> I'm trying to make the pwmsp driver work on my board. The driver is 
> compiled as a module on the kernel 4.14 by default
>
> https://github.com/beagleboard/linux/tree/4.14/sound/drivers/pwmsp
>
> I managed to make the driver work when I remove cape universal from 
> uEnv.txt (commenting the line #enable_uboot_cape_universal=1), the sound 
> is very noisy even with an RC low pass filter, but somehow it works. The 
> sound can be collected from pin P9.28, and it is recognized in ALSA as a 
> sound card.
>
> I have a LCD cape that I want to use, but when I connect my LCD to the 
> board the pwmsp driver doesn't load anymore. My LCD cape uses the same pin 
> P9.28 to control the brightness.
>
> I tried to recompile the dtbo used in my LCD removing the brightness 
> option leaving the pin completely free, but the pwmsp driver still not 
> loading, even when I force u-boot to not load the dtbo of the lcd (with 
> disable_uboot_overlay_addr0=1). I also tried to make my own dtbo file to 
> load the pwmsp driver but it also doesn't work, and the system crashes when 
> I try to play a sound.
>
> My question is how I change the PWM pin used by *pwmsp* to use as audio 
> output.
>
> My lcd module uses this dts:
>
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/src/arm/BB-CAPE-DISP-CT4-00A0.dts
>
> The dts that I tried to make to change the pwm port for pwmsp:
>
> /dts-v1/;
> /plugin/;
>
> / {
> compatible = "ti,beaglebone", "ti,beaglebone-black";
>
> /* identification */
> part-number = "BB-SND-PWM1";
> version = "00A0";
>
> /* state the resources this cape uses */
> exclusive-use =
> "P9.14",
> "P9.16";
>
> /*
>  * Free up the pins used by the cape from the pinmux helpers.
>  */
> fragment@0 {
> target = <>;
> __overlay__ {
> P9_14_pinmux { status = "disabled"; };  /* (U14) 
> gpmc_a2.ehrpwm1A */
> P9_16_pinmux { status = "disabled"; };  /* (T14) 
> gpmc_a3.ehrpwm1B */
> };
> };
>
> fragment@1 {
> target = <_pinmux>;
> __overlay__ {
> bb_pwm1_pin: pinmux-pwm1-pin {
> pinctrl-single,pins = <
> 0x48 0x06 /* (U14) 
> gpmc_a2.ehrpwm1A */
> 0x4c 0x06 /* (B17) 
> gpmc_a3.ehrpwm1B */
> >;
> };
> };
> };
>
> fragment@2 {
> target = <>;
> __overlay__ {
> bb_pwm1_test_helper: bb_snd-pwm1 {
> compatible = "bone-pinmux-helper";
> pinctrl-names = "default";
> pinctrl-0 = <_pwm1_pin>;
> status = "okay";
> };
> };
> };
>
> fragment@3 {
> target = <>;
> __overlay__ {
> status = "okay";
> };
> };
>
>
> fragment@4 {
> target = <>;
> __overlay__ {
> status = "okay";
> };
> };
>
> 

Re: [beagleboard] Re: PWM problem

2018-09-25 Thread Krzysztof Śmiałek
Ok, for me it is not important to flash emmc. I can use system from card.
And I want use this method. So, what should I do step  by step? For this
momet I have got old version on the emmc and ne we on sd card. If i remove
card, BBB boot from emmc. If I insert card, BBB boot from sd card. But when
I am using system form card there is problem with this PWM by adafruit in
python. When I use this comand: sudo dd if=/dev/zero of=/dev/mmcblk1 bs=1M
count=100 after rebooting BBB dont get up. All leds are off. With card,
without don't matter. BBB is off.

wt., 25 wrz 2018, 17:27 użytkownik Robert Nelson 
napisał:

> > *   I don't know enough about the flashing process to know if it is
> done on
> > a "by file" basis, or is done "by block". If the former, getting the used
> > space of the SD card down to around 1.5-1.8GB might be sufficient; if it
> is
> > by blocks, you'd have to somehow compress the SD card free space and
> shrink
> > the partition...
> > Perhaps Mr. Nelson could chime in on this part of the mysterious
> BBB
> > flashing process?
>
> So it's just rsync that copes files, so when it error's out, it really
> just error's out from lack of space..
>
> One option, for the 2GB eMMC that I've slightly played with but
> haven't tested in a flashing situation... Btrfs with compression..
>
> With BTFS with lzo, cut down the iot image from 3.3G to 1.6-ishG...
> Well somewhere around there, it's been a few months..
>
> Regards,
>
> --
> Robert Nelson
> https://rcn-ee.com/
>
> --
> For more options, visit http://beagleboard.org/discuss
> ---
> You received this message because you are subscribed to a topic in the
> Google Groups "BeagleBoard" group.
> To unsubscribe from this topic, visit
> https://groups.google.com/d/topic/beagleboard/VVhdRE72JFE/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> beagleboard+unsubscr...@googlegroups.com.
> To view this discussion on the web visit
> https://groups.google.com/d/msgid/beagleboard/CAOCHtYggtFGmyvt3euvo7QLUtfJj7PffCtf9t%3DXA5%2B7twAvqQA%40mail.gmail.com
> .
> For more options, visit https://groups.google.com/d/optout.
>

-- 
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/CAK-qOpDGWWqHSHh11paXtPOSWC%3DSEkDDyrQSYp6EoRSQNnFUQQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM problem

2018-09-25 Thread Robert Nelson
> *   I don't know enough about the flashing process to know if it is done 
> on
> a "by file" basis, or is done "by block". If the former, getting the used
> space of the SD card down to around 1.5-1.8GB might be sufficient; if it is
> by blocks, you'd have to somehow compress the SD card free space and shrink
> the partition...
> Perhaps Mr. Nelson could chime in on this part of the mysterious BBB
> flashing process?

So it's just rsync that copes files, so when it error's out, it really
just error's out from lack of space..

One option, for the 2GB eMMC that I've slightly played with but
haven't tested in a flashing situation... Btrfs with compression..

With BTFS with lzo, cut down the iot image from 3.3G to 1.6-ishG...
Well somewhere around there, it's been a few months..

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/CAOCHtYggtFGmyvt3euvo7QLUtfJj7PffCtf9t%3DXA5%2B7twAvqQA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM documentation and/logic for kernel 4.9.XX

2018-02-27 Thread evilwulfie
http://www.ti.com/lit/pdf/spruh73



On 2/27/2018 2:09 AM, James Fitzsimons wrote:
> Hi there,
>
> I've just gone through this myself, and you've already figured out all
> you need to know. The pwmchipX mapping can change on boot so you can't
> rely on the /sys/class/pwm structure. Figure out which address maps
> the epwmss device you want to use and navigate down the /sys/device
> tree as you have already posted. i.e.
> /sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchipX  
>
> See Roberts response to my question
> here 
> https://groups.google.com/forum/#!category-topic/beagleboard/software/uAHEiJTkE5E
>
> FWIW I found the Technical Reference Manual for the AM335x which has
> all the addresses for the peripherals
> here https://blog.dest-unreach.be/wp-content/uploads/2017/07/AM335x-TRM.pdf
> - it doesn't seem to be on the TI site anymore, at least not that I
> could find.
>
> HTH,
> James Fitzsimons
>
>
>
>
> On Thursday, 22 February 2018 17:58:22 UTC+13, Co M wrote:
>
> Hi,
>
> I am using C blacklib to handle some i2c and spi devices. Also I
> have few PWM's  P9_14 and 16 let's say.
>
> I learned the hard way that P9_14 and P9_16 are to be    found in
> '48302200'. For P9_14 for example
>
> |
> /sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchipX  
> |
>
>
>
> which is a link from
>
> |
> /sys/class/pwm/pwmchip3/
> |
>
>
>
> became available as pwm0 after echoing 0 to 
> /sys/class/pwm/pwmchip3/export
>
> as
>
> |
> root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# pwd
> /sys/class/pwm/pwmchip3/pwm0
> root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# ls -l
> total 0
> -rw-rw-r--1root pwm 4096Feb2203:14capture
> -rw-rw-r--1root pwm 4096Feb2203:14duty_cycle
> -rw-rw-r--1root pwm 4096Feb2203:14enable
> -rw-rw-r--1root pwm 4096Feb2203:14period
> -rw-rw-r--1root pwm 4096Feb2203:14polarity
> drwxrwxr-x 2root pwm    0Feb2203:14power
> -rw-rw-r--1root pwm 4096Feb2203:14uevent
> root@beaglebone:/sys/class/pwm/pwmchip3/pwm0#
> |
>
>
>
> The blacklib still doing old slot way of finding out which
> /sys/... files are  matching  for P9_14 pwm, going
> from symbolic links to some hardcoded PXY->1,2,3 mapping finally
> to find out the /sys/class/.../pwm/period.. and such...
>
> My question is:
>
>    How do I determine which X,Y from
> /sys/class/pwm/pwmchip*X*/pwm*Y*  maps to (X,Y) of a pwm pin
> P*X*_*Y* 
>
> Thank you
>
>  
>
> -- 
> 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/4df438c2-3352-4a99-8f3f-044e50957571%40googlegroups.com
> .
> For more options, visit https://groups.google.com/d/optout.

-- 
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/74312200-6d65-198d-81cc-6053988f299c%40gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM documentation and/logic for kernel 4.9.XX

2018-02-27 Thread James Fitzsimons
Hi there,

I've just gone through this myself, and you've already figured out all you 
need to know. The pwmchipX mapping can change on boot so you can't rely on 
the /sys/class/pwm structure. Figure out which address maps the epwmss 
device you want to use and navigate down the /sys/device tree as you have 
already posted. i.e. 
/sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchipX  

See Roberts response to my question 
here 
https://groups.google.com/forum/#!category-topic/beagleboard/software/uAHEiJTkE5E

FWIW I found the Technical Reference Manual for the AM335x which has all 
the addresses for the peripherals 
here https://blog.dest-unreach.be/wp-content/uploads/2017/07/AM335x-TRM.pdf 
- it doesn't seem to be on the TI site anymore, at least not that I could 
find.

HTH,
James Fitzsimons




On Thursday, 22 February 2018 17:58:22 UTC+13, Co M wrote:
>
> Hi,
>
> I am using C blacklib to handle some i2c and spi devices. Also I have few 
> PWM's  P9_14 and 16 let's say.
>
> I learned the hard way that P9_14 and P9_16 are to befound in 
> '48302200'. For P9_14 for example
>
> /sys/devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchipX  
>
>
>
> which is a link from
>
> /sys/class/pwm/pwmchip3/ 
>
>
>
> became available as pwm0 after echoing 0 to  /sys/class/pwm/pwmchip3/export
>
> as
>
> root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# pwd
> /sys/class/pwm/pwmchip3/pwm0
> root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# ls -l
> total 0
> -rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 capture
> -rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 duty_cycle
> -rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 enable
> -rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 period
> -rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 polarity
> drwxrwxr-x 2 root pwm0 Feb 22 03:14 power
> -rw-rw-r-- 1 root pwm 4096 Feb 22 03:14 uevent
> root@beaglebone:/sys/class/pwm/pwmchip3/pwm0# 
>
>
>
> The blacklib still doing old slot way of finding out which /sys/... files 
> are  matching  for P9_14 pwm, going
> from symbolic links to some hardcoded PXY->1,2,3 mapping finally to find 
> out the /sys/class/.../pwm/period.. and such...
>
> My question is: 
>
>How do I determine which X,Y from /sys/class/pwm/pwmchip*X*/pwm*Y*  
> maps to (X,Y) of a pwm pin P*X*_*Y*  
>
> Thank you
>
>  
>
>

-- 
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/4df438c2-3352-4a99-8f3f-044e50957571%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM in Pocket Beagle Bone

2017-12-12 Thread mike . maikaefer
What software are you talking about? Linux? Bare metal/StarterWare?



On Friday, December 8, 2017 at 10:55:39 AM UTC+1, Rohit Karkala wrote:
>
> Hello All, 
>
> I want to disable the PWM functionality of Pocket Beagle Bone and use it 
> as GPIO.
>
> How can i do this.
>

-- 
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/93cc01ec-08e5-4dc8-9ed5-194baa5c2a55%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM from BeagleBone Blue to external motor controller.

2017-11-14 Thread Adam Saenz
Hi Phil,

Q1)  I would suggest looking at rc_pwm.c which is in the 
Robotics_Cape_Installer source code.  A comment in the code says that there 
are 3 PWM subsystems; subsystem (ss) 1 and 2 are used by the built in motor 
drivers but ss 0 can be accessed from UART1; which leads one to believe is 
the the UART for GPS based on the comment from the PinMux online manual. 
 But the online manual for RoboticsCape says that UART2 (not UART1) is for 
GPS so either the code comment is old/wrong or the documentation is wrong. 
 Looks like a bit of experimenting is required to figure out which UART 
port is the correct one, but my guess would be that UART2 is the correct 
one.  You can then look at rc_motors.c to see how the pwm functions are 
used to configure the pwm subsystem and set duty cycle and frequency.  All 
this should be done after a call to the PinMux API to configure the pins 
for PWM. 

Q2)  What is your level of comfort with electronics modifications?  Then 
motor PWM signals are not mapped directly to a connector but you could 
access them via a hardware hack.  Remove the built in motor driver chips 
and solder in wires to the appropriate pads.  You could also try soldering 
directly to the appropriate built in motor driver pins as well.  In either 
case your soldered in wires should be hot glued or RTV'd in place to 
provide some strain relief.  It's a total hardware hack but it would allow 
you to used the robotics cape software as is.  This is assuming your new 
motor driver also uses 2 extra pins to control direction and braking (CW, 
CCW, short-brake, and stop) same as the TB6612FNG chip.  If it does not 
they you'll have to use the GP0 or GP1 IO pins to provide that 
functionality as your new motor driver needs.  Honestly this approach may 
be better suited for the BBBlack as all required I/O is mapped directly to 
and the header pins; but then you would loose all the other built in 
features of the BBBlue/Robotics cape.

If it were me I would go with the first approach and configure GPS UART2 
for PWM output.  Let me know if you have any question with this approach 
and I can look at the code a bit closer.

Adam




On Sunday, November 12, 2017 at 8:31:03 PM UTC-8, Phillip Glau wrote:
>
> I'm trying to build a differential drive robot using some 6v motors with 
> encoders from Pololu. Their amperage exceeds the capabilities of the built 
> in motor controllers on the BB Blue.
>
> I've got a larger separate motor controller that will accept PWM signal 
> for control.
>
> Question 1: Which physical connector on the BeagleBone Blue do I connect 
> to in order to access 2 channels of PWM? I'm not clear how PinMux 
>  works as described in the 
> manual. I'm assuming it means that once I figure out which physical 
> connector to attach to, that I can then change the functionality to PWM. 
> (Seems like perhaps the GPS connector is the correct one??) Unfortunately 
> the online manual doesn't seem to give practical example code of this 
> functionality.
>
> Question 2: Is it possible to access the PWM signal of the built in motor 
> controllers? This would be ideal as then the external motor controller 
> would be functionally transparent to the roboticscape software that 
> already exists. Again, I can't figure out if this is possible or which 
> connectors to tie into to access the PWM signal that drives Motor Channels 
> 1 to 4
>
> Thanks in advance for any help you can provide.
>
> - Phil
>

-- 
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/31d88d85-80a8-44fc-8c62-abafec5fb083%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] RE: PWM on Adafruit_BBIO and Python/Flask

2017-10-02 Thread Mala Dies
Hello,

I noticed that PWM, P8_13, on the BBBW is having issues with the 
Adafruit_BBIO framework. I have this software I found within a book I 
purchased, "Getting Started with BeagleBone" (Richardson 2014). Anyway, The 
software works without me using PWM but I would like to use PWM to make a 
LED go bright to dim just by using the web page format found via Flask (a 
Python Module).

So, here is the software:

from flask import Flask, render_template
app = Flask(__name__)
import Adafruit_BBIO.GPIO as GPIO
import Adafruit_BBIO.PWM as PWM

PWM.start("P8_13", 0.0)

@app.route("/")
def hello():
if GPIO.input(P8_11):
doorStatus = "open"
else:
doorStatus = "closed"
templateData = {
'doorStatus': doorStatus,
}
return render_template('main-door.html', **templateData)

@app.route('/ledLevel/')
def pin_state(level):
PWM.set_duty_cycle("P8_13", float(level))
return "LED level set to " + "."

if __name__ == "__main__":
app.run(host='192.168.7.2', port=5000, debug=True) 

So, please give advice or if you are using Adafruit_BBIO, please allow me 
some "behind-the-scenes" look at the software to change to get things 
"cracking."

Seth

P.S. I am sure there is a cure. Direct me to the software and I can start 
on it. I found a link to the sourceforge items and software. Is this where 
I should begin? 

-- 
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/6bc9ae11-66dc-4616-ba20-9d9bcb174c05%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM pins fluctuating during boot?

2017-07-27 Thread Graham
I think you need to assume that pretty much anything can happen while the 
board is booting or crashing, and inhibit all servo activities unless you 
know the BBB is in positive control.

Depending on how "large" your fixed-wing is, it probably would not be a bad 
idea to put some kind of watch-dog timer in the system, so that if the 
software crashes/stops/looses-interest/reboots/low-battery/ the servos all 
go to some neutral/safe setting.

--- Graham

== 

-- 
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/cfbb6678-2ba3-401a-83a6-c9c4ed0ac50e%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM not working in pins P9_14 & P9_16 in BBB

2017-07-14 Thread sajeevan k
Hi all,

Now I could make P9_14 working as PWM, with a Python script importing 
Adafruit_BBIO.PWM.

But for this to work, I need to enable the below line in uEnv.txt

cmdline=coherent_pool=1M net.ifnames=0 quiet cape_universal=enable

But enabling this line will make my other applications(including UARTs, 
I2Cs) not working.

Any way to make all things working?

Thanks & Regards,
Sajeevan.K

On Thursday, July 13, 2017 at 10:06:18 AM UTC+5:30, sajeevan k wrote:
>
> Hi all,
>
> Let me make my question short.
>
> I could configure the pins P9_21 and P9_22 as PWM output using BB-PWM0 
> overlay.
> But why it is not possible configure the the pins P9_14 & P9_16 and P8_13 
> & P8_19 as PWM signals, by doing the same procedure with BB-PWM2 and 
> BB-PWM1 overlays?
>
> Thanks & Regards,
> Sajeevan.K
>
> On Wednesday, July 12, 2017 at 5:30:15 PM UTC+5:30, sajeevan k wrote:
>>
>>
>> Hi all,
>>
>> I have already configured the pins P9_21 and P9_22 for PWM function using 
>>
>> BB-PWM0 overlays.
>>
>>
>> But now I want to use these pins as UART and some other pins as PWM.
>>
>>
>> I tried to make P9_14(EHRPWM1A) & P9_16(EHRPWM1B). For this I used the 
>> overlay BB-PWM1.
>>
>> A part of *BB-PWM1-00A0.dts* is shown here to confirm that BB-PWM1 
>> corresponds to P9_14(EHRPWM1A) & P9_16(EHRPWM1B).
>>
>>
>>
>> fragment@0 { 
>> target = <_pinmux>; 
>> __overlay__ { 
>> pinctrl_spec: Panel_Pins { 
>> pinctrl-single,pins = < 
>> 0x48 0x06 /* (U14) gpmc_a2.ehrpwm1A */ 
>> 0x4c 0x06 /* (T14) gpmc_a3.ehrpwm1B */ 
>> >; 
>> }; 
>> }; 
>> };
>>
>>
>>
>>
>> This is creating a folder pwmchip4 in /sys/class/pwm directory.
>>
>> Then with the following commands, pwm0 and pwm1 are created in  
>> /sys/class/pwm/pwmchip4 directory.
>>
>>
>> sudo echo 0 > /sys/class/pwm/pwmchip4/export
>>
>> sudo echo 1 > /sys/class/pwm/pwmchip4/export
>>
>>
>>
>> And software written same as in the case of P9_21 and P9_22.
>>
>>
>> But PWM signals are not appearing in P9_14(EHRPWM1A) & P9_16(EHRPWM1B).
>>
>>
>>
>> I tried also P8_13(ehrpwm2B) & P8_19(ehrpwm2A) in the same way with  
>> BB-PWM2 overlay. 
>>
>> This is creating a folder pwmchip2 in /sys/class/pwm directory. These are 
>> also not working.
>>
>>
>> I think I am missing something. 
>>
>>
>>
>> Please help me to find out a solution.
>>
>>
>> Thanks in advance for the help.
>>
>>
>> Thanks & Regards,
>> Sajeevan.K
>>
>

-- 
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/9c2c45b1-c7fd-429c-8aac-fa7c87b953db%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM not working in pins P9_14 & P9_16 in BBB

2017-07-12 Thread sajeevan k
Hi all,

Let me make my question short.

I could configure the pins P9_21 and P9_22 as PWM output using BB-PWM0 
overlay.
But why it is not possible configure the the pins P9_14 & P9_16 and P8_13 & 
P8_19 as PWM signals, by doing the same procedure with BB-PWM2 and BB-PWM1 
overlays?

Thanks & Regards,
Sajeevan.K

On Wednesday, July 12, 2017 at 5:30:15 PM UTC+5:30, sajeevan k wrote:
>
>
> Hi all,
>
> I have already configured the pins P9_21 and P9_22 for PWM function using 
>
> BB-PWM0 overlays.
>
>
> But now I want to use these pins as UART and some other pins as PWM.
>
>
> I tried to make P9_14(EHRPWM1A) & P9_16(EHRPWM1B). For this I used the 
> overlay BB-PWM1.
>
> A part of *BB-PWM1-00A0.dts* is shown here to confirm that BB-PWM1 
> corresponds to P9_14(EHRPWM1A) & P9_16(EHRPWM1B).
>
>
>
> fragment@0 { 
> target = <_pinmux>; 
> __overlay__ { 
> pinctrl_spec: Panel_Pins { 
> pinctrl-single,pins = < 
> 0x48 0x06 /* (U14) gpmc_a2.ehrpwm1A */ 
> 0x4c 0x06 /* (T14) gpmc_a3.ehrpwm1B */ 
> >; 
> }; 
> }; 
> };
>
>
>
>
> This is creating a folder pwmchip4 in /sys/class/pwm directory.
>
> Then with the following commands, pwm0 and pwm1 are created in  
> /sys/class/pwm/pwmchip4 directory.
>
>
> sudo echo 0 > /sys/class/pwm/pwmchip4/export
>
> sudo echo 1 > /sys/class/pwm/pwmchip4/export
>
>
>
> And software written same as in the case of P9_21 and P9_22.
>
>
> But PWM signals are not appearing in P9_14(EHRPWM1A) & P9_16(EHRPWM1B).
>
>
>
> I tried also P8_13(ehrpwm2B) & P8_19(ehrpwm2A) in the same way with  
> BB-PWM2 overlay. 
>
> This is creating a folder pwmchip2 in /sys/class/pwm directory. These are 
> also not working.
>
>
> I think I am missing something. 
>
>
>
> Please help me to find out a solution.
>
>
> Thanks in advance for the help.
>
>
> Thanks & Regards,
> Sajeevan.K
>

-- 
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/1edc60c9-9375-4351-a4e6-ba507a57d7fe%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM generation using libpruio

2017-01-29 Thread 'woody stanford' via BeagleBoard
Break out your PWM on to a PIC16Fx (using it crystal-controlled with 
software-based PWM by counting the clock cycles per instruction) and then 
use UART to control it.

An alternative fix, but it does give you nice isolation in the process.

Depending on how powerful your servos are, you might have to 2 or 3 stage 
it with SSR's (solid state relay chips) or direct to MOSFET (Irfz24N is a 
nice cheap one, and use some beefy fast rectifiers going backward to null 
out the inductive blowback from the coils on stop).

Hobby servos can be controlled direct from a standard TTL level output btw.

On Tuesday, November 29, 2016 at 10:30:41 PM UTC-7, Akshay Gahlot wrote:
>
> I want to use for PWM generation to control servo motor. The problem i m 
> facing is :
>
> To enable libpruio i m using this dts file 
>
> https://github.com/jadonk/cape-firmware/blob/master/arch/arm/boot/dts/BB-BONE-PRU-01-00A0.dts
>
> To enable the pwm pin i m using cape-universaln 
>
> https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dts
>
> These both files are kind of conflicting with each other as if one is 
> loaded to slots then other is not loading.
>
> If i do not load the cape-universaln i m not able to export the pwm pins.
>  
> Any help appreciated.
>

-- 
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/cc6b758e-6ac8-4fa7-a722-135ada7fb6c9%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM generation using libpruio

2016-11-30 Thread TJF
 
Hi!

Am Mittwoch, 30. November 2016 06:30:41 UTC+1 schrieb Akshay Gahlot:
>
> I want to use for PWM generation to control servo motor. The problem i m 
> facing is :
>
> To enable libpruio i m using this dts file 
>
> https://github.com/jadonk/cape-firmware/blob/master/arch/arm/boot/dts/BB-BONE-PRU-01-00A0.dts
>
> To enable the pwm pin i m using cape-universaln 
>
> https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dts
>
> These both files are kind of conflicting with each other as if one is 
> loaded to slots then other is not loading.
>

AFAIR cape-universal enables all subsystems, including the PRUSS. So you 
don't need BB-BONE-PRU-01.
 

>
> If i do not load the cape-universaln i m not able to export the pwm pins.
>

You need not export any pins when using libpruio. Just disable 
cape-universaln and load libpruio overlay instead. This has the same 
pinmuxing capabilities and will enable the PRUSS (just PRUSS, not all the 
other subsystems, in order to save power). For testing and in the 
development phase, you run your application with sudo (for pinmuxing). When 
finished, separate the configuration part from your source, add a line 
'io->Init = io->Conf' after configuration and before deleting the libpruio 
instance, and compile it, in order to execute it in system init (for fixed 
pinmuxing). Then your app can run without root privileges. (Or use 
dts_custom.bas to create your customized device tree.)

Regards

PS:
Recent images don't support libpruio at all.
libpruio-0.2.2 is designed for kernel 3.8. It needs adaption for newer 
kernel versions. In kernel 4.x, PWMSS->ehrPWM generated PWM signals don't 
work. So it's best to stay with the latest 3.8 for now.

-- 
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/52c53d80-cad0-446a-bd4d-576e1d160590%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM generation using libpruio

2016-11-30 Thread TJF

Hi!

Am Mittwoch, 30. November 2016 06:30:41 UTC+1 schrieb Akshay Gahlot:
>
> I want to use for PWM generation to control servo motor. The problem i m 
> facing is :
>
> To enable libpruio i m using this dts file 
>
> https://github.com/jadonk/cape-firmware/blob/master/arch/arm/boot/dts/BB-BONE-PRU-01-00A0.dts
>
> To enable the pwm pin i m using cape-universaln 
>
> https://github.com/cdsteinkuehler/beaglebone-universal-io/blob/master/cape-universaln-00A0.dts
>
> These both files are kind of conflicting with each other as if one is 
> loaded to slots then other is not loading.
>

AFAIR cape-universal enables all subsystems, including the PRUSS. So you 
don't need BB-BONE-PRU-01.
 

>
> If i do not load the cape-universaln i m not able to export the pwm pins.
>

You need not export any pins when using libpruio. Just disable 
cape-universaln and load libpruio overlay instead. This will enable the 
PRUSS (just PRUSS, not all the other subsystems, in order to save power) 
and also handle the pinmuxing. For testing and in the development phase, 
you run your application with sudo (for pinmuxing). When finished, separate 
the configuration part from your source and compile it, in order to execute 
in system init (for fixed pinmuxing). then your app can with root 
privileges. 

Regards

PS:
Recent images don't support libpruio at all.
libpruio-0.2.2 is designed for kernel 3.8. It needs adaption for newer 
kernel versions. In kernel 4.x, PWMSS->ehrPWM generated PWM signals don't 
work. So it's best to stay with the latest 3.8 for now.

-- 
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/9d827aea-5abb-42da-910b-219fa6daf53f%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM generation using libpruio

2016-11-30 Thread Greg
Are you using a recent Beagleboard image?  Beaglebone?

I haven't used libpruio, but I assume it uses the UIO kernel driver.
First, you will need to activate that driver.

This utility will help get it done:

https://github.com/RobertCNelson/dtb-rebuilder

You will need to clone the above to your board and make 2 very easy changes 
to text files.
Then you have to run the script in the above and re-boot.
Can perhaps guide you but need to know which kernel and which board you are 
using.
I didn't have to do anything to the Device tree for Remoteproc and PWM. 
 Hopefully the same
will be true for UIO.

Regarding the PWM, once again, have to assume you are using a recent Debian 
image.
The version 4 kernels require some steps to get the PWM exported.
I did this just a few days ago, and got it to work.  You need to look for:

/sys/class/pwm/pwmchip0

You need to export by something like:

echo 0 > export

Or it could be other numbers depending on which PWM.

I haven't found a concise reference for the above process, and how the 
export number maps to the particular PWM.
Perhaps someone else can point us to a good reference guide for this 
process.

Greg




-- 
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/e4f692e6-e939-46fc-8dc8-93fc4c6e828d%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM Pin Error on Boot

2016-03-30 Thread John Syne
One more thing, you may want to look at /driver/pinctrl/pinctrl-single.c as 
this is where the pinmux gets set.You could also use dynamic tracing to help 
find the responsible routine. Look in /Documentation/dynamic-debug-howto.txt. 
Probably a little bit of trial and error will be needed to narrow down this 
problem.

Regards,
John




> On Mar 30, 2016, at 3:45 PM, M House  wrote:
> 
> Thanks for the reply John.  I'm pretty new to modifying kernel modules and I 
> haven't worked with u-boot at all.  I'm not sure at the moment when the GPIO 
> is modified but I think it happens whenever the system resets, most likely on 
> startup.  Should I try a kernel dump right after I boot?
> 
> Thanks,
> Mike
> 
> On Wednesday, March 30, 2016 at 2:03:58 PM UTC-7, john3909 wrote:
> Well, that depends on how skilled you are at modifying u-boot and the linux 
> kernel?
> 
> In each case, modify the code that toggles the GPIO pin by printing text to 
> the console when the GPIO you want is modified. You could always issue a 
> kernel dump when that GPIO is modified, which will list the call sequence 
> that causes the GPIO toggle. For the Kernel, I believe the code you want is 
> in drivers/gpio/gpio-omap.c, but I haven’t looked at u-boot in a while, but 
> it should be simple to find the equivalent code. 
> 
> If you had a decent JTAG emulator, you could simply set a breakpoint on the 
> GPIO toggle and then look at the call stack to see which routing is 
> responsible. 
> 
> Regards,
> John
> 
> 
> 
> 
>> On Mar 30, 2016, at 1:25 PM, M House  
>> wrote:
>> 
>> Hey everyone I'm still stuck as to why my beaglebone keeps changing the 
>> polarity to 1 on boot.  I can go in and manually change it but it always 
>> resets after reboot.  Should I maybe write a start up script to force the 
>> polarity to 0?  I'd rather find the root cause rather than a hack but at 
>> this point anything that works is fine by me.
>> 
>> Thank you
>> 
>> On Saturday, March 19, 2016 at 11:30:58 PM UTC-7, M House wrote:
>> I'm doing a project right now that involves using a micro servo.  One is on 
>> port P8_13 and another on P9_14.  
>> 
>> Everytime I boot the beaglebone it gives me - error: Error enabling PWM 
>> controls: Error: ENOENT, no such file or directory 
>> '/sys/devices/ocp.3/bs_pwm_test_P9_14.15/polarity'
>> 
>> When I check this file it shows a value of '1' inside of it.  Where the same 
>> file for P8_13 shows a zero.  When I change the P9_14 polarity file to 0 the 
>> servo works as intended.  I'm really confused why the polarity is being set 
>> to 1 every time I boot the beaglebone.  This also happens if I move the 
>> servo to P9_16.
>> 
>> I did just upgrade from Debian 7.8 to 7.9 but I don't see how that would 
>> change the GPIO behavior.
>> 
>> 
>> -- 
>> 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 .
>> For more options, visit https://groups.google.com/d/optout 
>> .
> 
> 
> -- 
> 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 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM Pin Error on Boot

2016-03-30 Thread M House
Thanks for the reply John.  I'm pretty new to modifying kernel modules and 
I haven't worked with u-boot at all.  I'm not sure at the moment when the 
GPIO is modified but I think it happens whenever the system resets, most 
likely on startup.  Should I try a kernel dump right after I boot?

Thanks,
Mike

On Wednesday, March 30, 2016 at 2:03:58 PM UTC-7, john3909 wrote:
>
> Well, that depends on how skilled you are at modifying u-boot and the 
> linux kernel?
>
> In each case, modify the code that toggles the GPIO pin by printing text 
> to the console when the GPIO you want is modified. You could always issue a 
> kernel dump when that GPIO is modified, which will list the call sequence 
> that causes the GPIO toggle. For the Kernel, I believe the code you want is 
> in drivers/gpio/gpio-omap.c, but I haven’t looked at u-boot in a while, but 
> it should be simple to find the equivalent code. 
>
> If you had a decent JTAG emulator, you could simply set a breakpoint on 
> the GPIO toggle and then look at the call stack to see which routing is 
> responsible. 
>
> Regards,
> John
>
>
>
>
> On Mar 30, 2016, at 1:25 PM, M House  
> wrote:
>
> Hey everyone I'm still stuck as to why my beaglebone keeps changing the 
> polarity to 1 on boot.  I can go in and manually change it but it always 
> resets after reboot.  Should I maybe write a start up script to force the 
> polarity to 0?  I'd rather find the root cause rather than a hack but at 
> this point anything that works is fine by me.
>
> Thank you
>
> On Saturday, March 19, 2016 at 11:30:58 PM UTC-7, M House wrote:
>>
>> I'm doing a project right now that involves using a micro servo.  One is 
>> on port P8_13 and another on P9_14.  
>>
>> Everytime I boot the beaglebone it gives me - error: Error enabling PWM 
>> controls: Error: ENOENT, no such file or directory 
>> '/sys/devices/ocp.3/bs_pwm_test_P9_14.15/polarity'
>>
>> When I check this file it shows a value of '1' inside of it.  Where the 
>> same file for P8_13 shows a zero.  When I change the P9_14 polarity file to 
>> 0 the servo works as intended.  I'm really confused why the polarity is 
>> being set to 1 every time I boot the beaglebone.  This also happens if I 
>> move the servo to P9_16.
>>
>> I did just upgrade from Debian 7.8 to 7.9 but I don't see how that would 
>> change the GPIO behavior.
>>
>>
> -- 
> 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 .
> For more options, visit https://groups.google.com/d/optout.
>
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM Pin Error on Boot

2016-03-30 Thread John Syne
Well, that depends on how skilled you are at modifying u-boot and the linux 
kernel?

In each case, modify the code that toggles the GPIO pin by printing text to the 
console when the GPIO you want is modified. You could always issue a kernel 
dump when that GPIO is modified, which will list the call sequence that causes 
the GPIO toggle. For the Kernel, I believe the code you want is in 
drivers/gpio/gpio-omap.c, but I haven’t looked at u-boot in a while, but it 
should be simple to find the equivalent code. 

If you had a decent JTAG emulator, you could simply set a breakpoint on the 
GPIO toggle and then look at the call stack to see which routing is 
responsible. 

Regards,
John




> On Mar 30, 2016, at 1:25 PM, M House  wrote:
> 
> Hey everyone I'm still stuck as to why my beaglebone keeps changing the 
> polarity to 1 on boot.  I can go in and manually change it but it always 
> resets after reboot.  Should I maybe write a start up script to force the 
> polarity to 0?  I'd rather find the root cause rather than a hack but at this 
> point anything that works is fine by me.
> 
> Thank you
> 
> On Saturday, March 19, 2016 at 11:30:58 PM UTC-7, M House wrote:
> I'm doing a project right now that involves using a micro servo.  One is on 
> port P8_13 and another on P9_14.  
> 
> Everytime I boot the beaglebone it gives me - error: Error enabling PWM 
> controls: Error: ENOENT, no such file or directory 
> '/sys/devices/ocp.3/bs_pwm_test_P9_14.15/polarity'
> 
> When I check this file it shows a value of '1' inside of it.  Where the same 
> file for P8_13 shows a zero.  When I change the P9_14 polarity file to 0 the 
> servo works as intended.  I'm really confused why the polarity is being set 
> to 1 every time I boot the beaglebone.  This also happens if I move the servo 
> to P9_16.
> 
> I did just upgrade from Debian 7.8 to 7.9 but I don't see how that would 
> change the GPIO behavior.
> 
> 
> -- 
> 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 
> .
> For more options, visit https://groups.google.com/d/optout 
> .

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM Pin Error on Boot

2016-03-30 Thread M House
Hey everyone I'm still stuck as to why my beaglebone keeps changing the 
polarity to 1 on boot.  I can go in and manually change it but it always 
resets after reboot.  Should I maybe write a start up script to force the 
polarity to 0?  I'd rather find the root cause rather than a hack but at 
this point anything that works is fine by me.

Thank you

On Saturday, March 19, 2016 at 11:30:58 PM UTC-7, M House wrote:
>
> I'm doing a project right now that involves using a micro servo.  One is 
> on port P8_13 and another on P9_14.  
>
> Everytime I boot the beaglebone it gives me - error: Error enabling PWM 
> controls: Error: ENOENT, no such file or directory 
> '/sys/devices/ocp.3/bs_pwm_test_P9_14.15/polarity'
>
> When I check this file it shows a value of '1' inside of it.  Where the 
> same file for P8_13 shows a zero.  When I change the P9_14 polarity file to 
> 0 the servo works as intended.  I'm really confused why the polarity is 
> being set to 1 every time I boot the beaglebone.  This also happens if I 
> move the servo to P9_16.
>
> I did just upgrade from Debian 7.8 to 7.9 but I don't see how that would 
> change the GPIO behavior.
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM Pin Error on Boot

2016-03-20 Thread M House
I should clarify that it is every time I start my node.js server file that 
a has a required module that uses P9_14.  I can manually change the 
polarity to 0 but it resets every time I reboot.

On Saturday, March 19, 2016 at 11:30:58 PM UTC-7, M House wrote:
>
> I'm doing a project right now that involves using a micro servo.  One is 
> on port P8_13 and another on P9_14.  
>
> Everytime I boot the beaglebone it gives me - error: Error enabling PWM 
> controls: Error: ENOENT, no such file or directory 
> '/sys/devices/ocp.3/bs_pwm_test_P9_14.15/polarity'
>
> When I check this file it shows a value of '1' inside of it.  Where the 
> same file for P8_13 shows a zero.  When I change the P9_14 polarity file to 
> 0 the servo works as intended.  I'm really confused why the polarity is 
> being set to 1 every time I boot the beaglebone.  This also happens if I 
> move the servo to P9_16.
>
> I did just upgrade from Debian 7.8 to 7.9 but I don't see how that would 
> change the GPIO behavior.
>
>

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM: only a finite number of pulses? Controlling stepper motor

2014-12-01 Thread David Armstrong
what is the end product you want ? cnc ? 3d printer ?
Linuxcnc does all this and is proven and reliable and works on a beaglebone
black ( machinekit)

i am a moderator for Linuxcnc , and have worked with steppers for a lot of
years , so give me some more information and see how it fits or not to your
project needs it all depends on what else you want the BBB to do , as you
only have limited resources

A4988 is a standard stepper driver and works no differently than any other
,

if Linuxcnc is too much of bruteforce etc , see Derricks video here , it
works very well

http://derekmolloy.ie/beaglebone/driving-stepper-motors-in-embedded-linux-on-the-beaglebone/

Shout if i can be of help

Dave

see
Linuxcnc.org

Machinekit see
http://www.machinekit.io/
google group machinekit






 --
 For more options, visit http://beagleboard.org/discuss
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups BeagleBoard group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/beagleboard/hEql7u7kAlc/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/d/optout.


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM: only a finite number of pulses? Controlling stepper motor

2014-11-25 Thread cncbasher

see Linuxcnc.org  and the beaglbone variant Machinekit does exactly that  


On Saturday, 18 October 2014 02:26:26 UTC+1, plla...@gmail.com wrote:



 http://electronics.stackexchange.com/questions/134356/beaglebone-generate-finite-pulse-train#
  
   
 I'm wanting to use the BeagleBone Black to generate a FINITE number of 
 pulses, in order to control a stepper motor. For the controller I have, an 
 A4988, each pulse is one step on the motor. How can I use the PWM on the 
 BBB to send, say, 5 pulses, and no more or less than 5? Or I can use a 
 GPIO. Whichever works. 

 I have the Adafruit BBIO library 
 https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/using-the-bbio-library
  
 installed. I have thought of doing this in a simple, stupid way - just 
 using python's time.wait() and toggling a GPIO pin, however many times 
 I'd like. But this seems very inaccurate, timing-wise, and moreover 
 inelegant; is there a way to do this better? I'm also investigating events 
 -- i.e., count the numberof pulses that have occured using another GPIO, 
 then stop the PWM when the number of pulses I want has been counted. 


 Any ideas?


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM: only a finite number of pulses? Controlling stepper motor

2014-10-27 Thread karlkarpfen79
May be you can ask these guys here: http://www.halaser.eu/e1701m.php

They're offering an industrial motor controller based on an BBB and should 
have solved this problem.


Am Samstag, 18. Oktober 2014 03:26:26 UTC+2 schrieb plla...@gmail.com:



 http://electronics.stackexchange.com/questions/134356/beaglebone-generate-finite-pulse-train#
  
   
 I'm wanting to use the BeagleBone Black to generate a FINITE number of 
 pulses, in order to control a stepper motor. For the controller I have, an 
 A4988, each pulse is one step on the motor. How can I use the PWM on the 
 BBB to send, say, 5 pulses, and no more or less than 5? Or I can use a 
 GPIO. Whichever works. 

 I have the Adafruit BBIO library 
 https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/using-the-bbio-library
  
 installed. I have thought of doing this in a simple, stupid way - just 
 using python's time.wait() and toggling a GPIO pin, however many times 
 I'd like. But this seems very inaccurate, timing-wise, and moreover 
 inelegant; is there a way to do this better? I'm also investigating events 
 -- i.e., count the numberof pulses that have occured using another GPIO, 
 then stop the PWM when the number of pulses I want has been counted. 


 Any ideas?


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM: only a finite number of pulses? Controlling stepper motor

2014-10-27 Thread fakd23
You could use the SPI interface 

Am Samstag, 18. Oktober 2014 03:26:26 UTC+2 schrieb plla...@gmail.com:



 http://electronics.stackexchange.com/questions/134356/beaglebone-generate-finite-pulse-train#
  
   
 I'm wanting to use the BeagleBone Black to generate a FINITE number of 
 pulses, in order to control a stepper motor. For the controller I have, an 
 A4988, each pulse is one step on the motor. How can I use the PWM on the 
 BBB to send, say, 5 pulses, and no more or less than 5? Or I can use a 
 GPIO. Whichever works. 

 I have the Adafruit BBIO library 
 https://learn.adafruit.com/setting-up-io-python-library-on-beaglebone-black/using-the-bbio-library
  
 installed. I have thought of doing this in a simple, stupid way - just 
 using python's time.wait() and toggling a GPIO pin, however many times 
 I'd like. But this seems very inaccurate, timing-wise, and moreover 
 inelegant; is there a way to do this better? I'm also investigating events 
 -- i.e., count the numberof pulses that have occured using another GPIO, 
 then stop the PWM when the number of pulses I want has been counted. 


 Any ideas?


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM howto for BBB linux 3.16.x?

2014-09-28 Thread Seth
Bump, as I have the same question. Any updates? Thanks.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM: changing Period of EHRPWM

2014-09-16 Thread avterekhov
Hi,

In case someone still needs a solution to this problem, I've written a 
small kernel patch: ti_ehr_pwm.patch 
https://sites.google.com/site/avterekhov/ti_ehr_pwm.patch and a short 
description of how to apply it: 
https://randomlinuxhacks.wordpress.com/2014/09/16/changing-pwm-period-on-beaglebone-black/

So far it works for me.

On Thursday, June 26, 2014 8:10:26 AM UTC+2, jmc...@gmail.com wrote:

 I also tried this and had no luck :-/

 PWM on the BBB is turning out to be more work than I had thought.

 On Monday, January 6, 2014 12:13:37 PM UTC-8, Anto Dominic wrote:

 Thanks,

 Tried your trick even replaced the new dtbo file but even after 
 that I am getting the default value for Period ( ie, 500) and duty (ie, 
 0) ... Is there any step that you missed in between...??. Anyways thanks 
 for the tip..:)

 On Monday, 8 July 2013 08:44:54 UTC+5:30, tohr...@gmail.com wrote:

 Hello,

 you can change period by changing dtbo files.

 1 Generate dts file from original dtbo file
 dtc -I dtb -O dts -o /lib/firmware/bone_pwm_P8_13-00A0.dts /lib/firmware
 /bone_pwm_P8_13-00A0.dtbo

 2 Change period
 open file /lib/firmware/bone_pwm_P8_13-00A0.dts with editor at 
 lines around line 26:
 pwm_test_P8_13 {
 compatible = pwm_test;
 pwms = 0xdeadbeef 0x1 0x7a120 0x1;

  and change to following, for example change period to 10ns=0.1ms

 pwm_test_P8_13 {
 compatible = pwm_test;
 pwms = 0xdeadbeef 0x1 10 0x1;
   
 where
 -3rd parameter of linepwms = ~ is period.
 -period (and other parameters) can be written in either decimal or 
 hexadecimal of 0xABC format.
 -default period 0x7a120 is 500 in decimal.
 -As you mentioned, Both A and B output for one eHRPWM must have same 
 period setting.
  If not, the second device will fail to setup at echo (device) 
 /sys/devices/bone_capemgr.*/slots command.

 3 Compile to new dtbo file
 dtc -O dtb -o bone_pwm_P8_13-00A0.dtbo -b 0 -@ bone_pwm_P8_13-00A0.dts

  You'd better back up original dtbo file before overwriting it.

 4 Use new dtbo file. 
 echo bone_pwm_P8_13  /sys/devices/bone_capemgr.*/slots



 2013年6月4日火曜日 16時33分00秒 UTC+9 sultanof.ilo...@gmail.com:

 Hey, 
 yes sure, duty must be (0 = duty = period). Otherwise you would try 
 to to set a pwm duty cycle of less than 0% or more than 100%. Returning an 
 error to the user is a proper way to handle this. 

 As mentioned above EHRPWM1 and EHRPWM2 share the same base period (or 
 respectively the base frequency). If I enable both PWM ouputs, writing to 
 the period files always results in an error. Enabeling only one of the two 
 outputs lets me change the periods.
 This does make sense after all. I assume the necessary crosschecking of 
 the conditions (0 = duty = period) for related PWM outputs is simply not 
 implemented yet or mayby just faulty. 

 Am Montag, 3. Juni 2013 12:25:15 UTC+2 schrieb lawe...@gmail.com:

 Hi

 I'm just starting out, but here is what I found. Hopefully it can help 
 you.
 The period must be greater than duty.
 This worked fine for me:
 echo 10  /sys/devices/ocp.2/pwm_test_P9_14.12/period
 Period is given in ns. Duty is given in ns on/off depending on 
 polarity.




-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM: changing Period of EHRPWM

2014-06-26 Thread jmc5113
I also tried this and had no luck :-/

PWM on the BBB is turning out to be more work than I had thought.

On Monday, January 6, 2014 12:13:37 PM UTC-8, Anto Dominic wrote:

 Thanks,

 Tried your trick even replaced the new dtbo file but even after 
 that I am getting the default value for Period ( ie, 500) and duty (ie, 
 0) ... Is there any step that you missed in between...??. Anyways thanks 
 for the tip..:)

 On Monday, 8 July 2013 08:44:54 UTC+5:30, tohr...@gmail.com wrote:

 Hello,

 you can change period by changing dtbo files.

 1 Generate dts file from original dtbo file
 dtc -I dtb -O dts -o /lib/firmware/bone_pwm_P8_13-00A0.dts /lib/firmware/
 bone_pwm_P8_13-00A0.dtbo

 2 Change period
 open file /lib/firmware/bone_pwm_P8_13-00A0.dts with editor at 
 lines around line 26:
 pwm_test_P8_13 {
 compatible = pwm_test;
 pwms = 0xdeadbeef 0x1 0x7a120 0x1;

  and change to following, for example change period to 10ns=0.1ms

 pwm_test_P8_13 {
 compatible = pwm_test;
 pwms = 0xdeadbeef 0x1 10 0x1;
   
 where
 -3rd parameter of linepwms = ~ is period.
 -period (and other parameters) can be written in either decimal or 
 hexadecimal of 0xABC format.
 -default period 0x7a120 is 500 in decimal.
 -As you mentioned, Both A and B output for one eHRPWM must have same 
 period setting.
  If not, the second device will fail to setup at echo (device) 
 /sys/devices/bone_capemgr.*/slots command.

 3 Compile to new dtbo file
 dtc -O dtb -o bone_pwm_P8_13-00A0.dtbo -b 0 -@ bone_pwm_P8_13-00A0.dts

  You'd better back up original dtbo file before overwriting it.

 4 Use new dtbo file. 
 echo bone_pwm_P8_13  /sys/devices/bone_capemgr.*/slots



 2013年6月4日火曜日 16時33分00秒 UTC+9 sultanof.ilo...@gmail.com:

 Hey, 
 yes sure, duty must be (0 = duty = period). Otherwise you would try to 
 to set a pwm duty cycle of less than 0% or more than 100%. Returning an 
 error to the user is a proper way to handle this. 

 As mentioned above EHRPWM1 and EHRPWM2 share the same base period (or 
 respectively the base frequency). If I enable both PWM ouputs, writing to 
 the period files always results in an error. Enabeling only one of the two 
 outputs lets me change the periods.
 This does make sense after all. I assume the necessary crosschecking of 
 the conditions (0 = duty = period) for related PWM outputs is simply not 
 implemented yet or mayby just faulty. 

 Am Montag, 3. Juni 2013 12:25:15 UTC+2 schrieb lawe...@gmail.com:

 Hi

 I'm just starting out, but here is what I found. Hopefully it can help 
 you.
 The period must be greater than duty.
 This worked fine for me:
 echo 10  /sys/devices/ocp.2/pwm_test_P9_14.12/period
 Period is given in ns. Duty is given in ns on/off depending on polarity.




-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: pwm pinmux

2014-05-12 Thread cameronstiffler
I also have similar questions. I have a robot with 24 servos and I am 
wondering if I can control all of them straight from the BBB board. Can all 
of these pins be used for PWM if mapped as such in the device tree?

On Wednesday, October 2, 2013 7:03:53 AM UTC-7, tbh wrote:

 I've just gotten pwm working through sysfs drivers on my beaglebone black. 
 Now I'm looking more in depth into the different things I can do with it, 
 and I can't seem to find any information on a few signals.  I'm using derek 
 molloy's 
 chartshttps://github.com/derekmolloy/boneDeviceTree/tree/master/docsfor the 
 headers (which he compiled from the BBB SRM)

 I see the following signals that I believe relate to PWM:
 ehrpwm2B (P8_13)
 ehrpwm2_tripzone_in  (P8_14)
 ehrpwm0_synco (P8_17)
 ehrpwm2A (P8_19)
 ehrpwm1B (P8_34)
 ehrpwm1A (P8_36)
 ehrpwm1_tripzone_in  (P8_37)
 ehrpwm0_synco (P8_38)
 ehrpwm2_tripzone_in  (P8_43)
 ehrpwm0_synco (P8_44)
 ehrpwm2A (P8_45)
 ehrpwm2B  (P8_46)

 ehrpwm1A_mux1(P9_14)
 ehrpwm1_tripzone_input  (P9_15)
 ehrpwm1B_mux1(P9_16)
 ehrpwm0_synci   (P9_17)
 ehrpwm0_tripzone   (P9_18)
 ehrpwm0B  (P9_21)
 ehrpwm0A  (P9_22)
 ehrpwm0_synco  (P9_23)
 eCAP2_in_PWM2_out and ehrpwm0_synci (P9_28)
 ehrpwm0B  (P9_29)
 ehrpwm0_tripzone   (P9_30)
 ehrpwm0A  (P9_31)
 pr1_ecap0_cap_capin_apwm_o and eCAP0_in_PWM0_out (P9_42)


 I understand what all the signals mean except for a few.  They're probably 
 just due to the fact that notation changed, but I wanted to make sure 
 before I structured projects around the wrong information.

 Is there a difference between ehrpwm1A_mux1 and ehrpwm1A?
 Is there a difference between ehrpwm1_tripzone_in and 
 ehrpwm1_tripzone_input?
 What is pr1_ecap0_cap_capin_apwm_o? 

 Thanks.


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM period

2014-04-22 Thread Sungjin Chun
If you are using device tree based approach, then refer this link

https://groups.google.com/forum/#!topic/beagleboard/4R91_v9WBEY

I hope this can help you.

On Tuesday, April 22, 2014 9:02:11 AM UTC+9, Dorian Levy wrote:

 I want to use two servos with pins 8_13 and 8_19. How can I change the 
 period? I tried editing the dts file and compiling with 
 dtc -O dtb -o bone_pwm_P8_13-00A0.dtbo -b 0 -@ bone_pwm_P8_13-00A0.dts, but 
 the period remains the same. Is there something else that need to be done? 
 I not sure it actually compiles, because the command line returns instantly.


-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM in the 3.13 Kernel

2014-04-19 Thread robert.berger
Hi,

Check my comment here:

http://thread.gmane.org/gmane.comp.hardware.beagleboard.user/65797


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM in the 3.13 Kernel

2014-04-18 Thread halherta
I retried accessing PWM in the latest 3.13 kernel.with no luck. Is PWM 
still not supported in 3.13 (under /sys/devices/ocp.#/pwm_test_P9_14.#/) or 
is there simply a new way to access PWM that I'm not aware of ?

Hussam

On Tuesday, March 25, 2014 5:29:03 PM UTC-4, halh...@gmail.com wrote:

 I'm having problems with PWM under the latest 3.13 kernel (built as per 
 the instructions provided @ 
 http://www.eewiki.net/display/linuxonarm/BeagleBone+Black) with a Debian 
 root filesystem.The Device tree seems to support 3 PWM channels on P9_14, 
 P9_16 (ehprwm1ab)  P9_42 (ecap0). But when i take a peek at the 
 contents of the /sys/devices/ocp.#/pwm_test_P9_14.#/ directory I do not 
 see the 'period', 'duty', 'run' or 'polarity' files needed to control the 
 PWM channels.

 Is PWM supported in the 3.13 Kernel yet? 

 Thanks!
 Hussam


-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM in the 3.13 Kernel

2014-04-18 Thread Sungjin Chun
If properly enabled in dtb file during booting, you can always use any 
peripherals in AM335X SoC.
Refer https://github.com/chunsj/nxctrl/blob/master/pwm-test.c, which uses 
/dev/mem for control
pwm. Of course this code does not provide sysfs interface.

Sent from my iPad

 On Apr 18, 2014, at 9:12 PM, halhe...@gmail.com wrote:
 
 I retried accessing PWM in the latest 3.13 kernel.with no luck. Is PWM 
 still not supported in 3.13 (under /sys/devices/ocp.#/pwm_test_P9_14.#/) or 
 is there simply a new way to access PWM that I'm not aware of ?
 
 Hussam
 
 On Tuesday, March 25, 2014 5:29:03 PM UTC-4, halh...@gmail.com wrote:
 I'm having problems with PWM under the latest 3.13 kernel (built as per the 
 instructions provided @ 
 http://www.eewiki.net/display/linuxonarm/BeagleBone+Black) with a Debian 
 root filesystem.The Device tree seems to support 3 PWM channels on P9_14, 
 P9_16 (ehprwm1ab)  P9_42 (ecap0). But when i take a peek at the contents 
 of the /sys/devices/ocp.#/pwm_test_P9_14.#/ directory I do not see the 
 'period', 'duty', 'run' or 'polarity' files needed to control the PWM 
 channels.
 
 Is PWM supported in the 3.13 Kernel yet? 
 
 Thanks!
 Hussam
 
 -- 
 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.
 For more options, visit https://groups.google.com/d/optout.

-- 
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.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Re: PWM in the 3.13 Kernel

2014-04-18 Thread halherta
Thanks  Sungjin!
I'll take a look a your codeI'm still curious as to what exactly 
happened to the pwm sysfs interface in the 3.13 kernel though. If anyone 
knows please let me/us know

Thanks!

On Friday, April 18, 2014 8:48:12 AM UTC-4, Sungjin Chun wrote:

 If properly enabled in dtb file during booting, you can always use any 
 peripherals in AM335X SoC.
 Refer https://github.com/chunsj/nxctrl/blob/master/pwm-test.c, which uses 
 /dev/mem for control
 pwm. Of course this code does not provide sysfs interface.

 Sent from my iPad

 On Apr 18, 2014, at 9:12 PM, halh...@gmail.com javascript: wrote:

 I retried accessing PWM in the latest 3.13 kernel.with no luck. Is PWM 
 still not supported in 3.13 (under /sys/devices/ocp.#/pwm_test_P9_14.#/) 
 or is there simply a new way to access PWM that I'm not aware of ?

 Hussam

 On Tuesday, March 25, 2014 5:29:03 PM UTC-4, halh...@gmail.com wrote:

 I'm having problems with PWM under the latest 3.13 kernel (built as per 
 the instructions provided @ 
 http://www.eewiki.net/display/linuxonarm/BeagleBone+Black) with a Debian 
 root filesystem.The Device tree seems to support 3 PWM channels on P9_14, 
 P9_16 (ehprwm1ab)  P9_42 (ecap0). But when i take a peek at the 
 contents of the /sys/devices/ocp.#/pwm_test_P9_14.#/ directory I do 
 not see the 'period', 'duty', 'run' or 'polarity' files needed to control 
 the PWM channels.

 Is PWM supported in the 3.13 Kernel yet? 

 Thanks!
 Hussam

  -- 
 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 javascript:.
 For more options, visit https://groups.google.com/d/optout.



-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM ADC on BBB using C++

2014-03-16 Thread bakshiaditya
Dear Mr Sai

Am looking to get in touch with you regarding your good work.

Please do connect

Thanks and regards

Aditya


-- 
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.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Re: PWM on more than 4 pins?

2014-03-03 Thread Andrew Dai
Which pins are you using?
P9_14
P9_22
P8_12
and P8_14 work just fine for me

On Sunday, March 2, 2014 2:24:31 PM UTC-5, ghostma...@gmail.com wrote:

 very time I try to use certain PWM pins on the BeagleBone Black I get this 
 error for most of the pins (from the ones shown in yellow here: 
 http://beagleboard.org/static/images/cape-headers-pwm.png)
 I am using Ubuntu on my BeagleBone Black.
 RuntimeError: You must start() the PWM channel first

 Any reason why? What's the max number of same-frequency PWM channels I can 
 have ongoing at any one time?


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [beagleboard] Re: PWM on more than 4 pins?

2014-03-03 Thread Andrew Dai
Woops sorry, my mistake.
I have PWM on P9_14 and P9_22


On Mon, Mar 3, 2014 at 10:14 AM, Andrew Dai the...@andrewdai.co wrote:

 Which pins are you using?
 P9_14
 P9_22
 P8_12
 and P8_14 work just fine for me

 On Sunday, March 2, 2014 2:24:31 PM UTC-5, ghostma...@gmail.com wrote:

 very time I try to use certain PWM pins on the BeagleBone Black I get
 this error for most of the pins (from the ones shown in yellow here:
 http://beagleboard.org/static/images/cape-headers-pwm.png)
 I am using Ubuntu on my BeagleBone Black.
 RuntimeError: You must start() the PWM channel first

 Any reason why? What's the max number of same-frequency PWM channels I
 can have ongoing at any one time?

  --
 For more options, visit http://beagleboard.org/discuss
 ---
 You received this message because you are subscribed to a topic in the
 Google Groups BeagleBoard group.
 To unsubscribe from this topic, visit
 https://groups.google.com/d/topic/beagleboard/xYHHfaWXZrU/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to
 beagleboard+unsubscr...@googlegroups.com.
 For more options, visit https://groups.google.com/groups/opt_out.




-- 
Best Wishes,
Andrew

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


Re: [beagleboard] Re: PWM on more than 4 pins?

2014-03-03 Thread ghostman414004
Firstly, the working pins tend to change randomly... Cos P8_13 works for 
me. Secondly yeah, I do get a set of 4 working PWMs but I need more than 
that, I need 5 pwm. I am trying to work with the Adafruit library but that 
gives me this error when I try it on some of them. Even the pyBBIO library 
doesn't support pwm outputs with the 3.8 kernel.

At this point I think that a stable version of the 3.2 Angstrom 
distribution will fit my needs as it is much easier to set the pin muxes. 
Does anyone know where to get them?

On Monday, March 3, 2014 9:16:27 AM UTC-6, Andrew Dai wrote:

 Woops sorry, my mistake.
 I have PWM on P9_14 and P9_22


 On Mon, Mar 3, 2014 at 10:14 AM, Andrew Dai the...@andrewdai.cojavascript:
  wrote:

 Which pins are you using?
 P9_14
 P9_22
 P8_12
 and P8_14 work just fine for me

 On Sunday, March 2, 2014 2:24:31 PM UTC-5, ghostma...@gmail.com wrote:

 very time I try to use certain PWM pins on the BeagleBone Black I get 
 this error for most of the pins (from the ones shown in yellow here: 
 http://beagleboard.org/static/images/cape-headers-pwm.png)
 I am using Ubuntu on my BeagleBone Black.
 RuntimeError: You must start() the PWM channel first

 Any reason why? What's the max number of same-frequency PWM channels I 
 can have ongoing at any one time?

  -- 
 For more options, visit http://beagleboard.org/discuss
 --- 
 You received this message because you are subscribed to a topic in the 
 Google Groups BeagleBoard group.
 To unsubscribe from this topic, visit 
 https://groups.google.com/d/topic/beagleboard/xYHHfaWXZrU/unsubscribe.
 To unsubscribe from this group and all its topics, send an email to 
 beagleboard...@googlegroups.com javascript:.
 For more options, visit https://groups.google.com/groups/opt_out.




 -- 
 Best Wishes,
 Andrew
  

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[beagleboard] Re: PWM and Analog ins on TI Android with BBB and Kernel 3.2

2014-02-11 Thread Vishveshwar
On Tuesday, February 11, 2014 4:15:52 AM UTC+5:30, Ernesto Gigliotti wrote:

 Hello, I have I2C,SPI and GPIOs working on TI Android with 3.2 Kernel 
 (without device tree) but I have no clue about PWM and Analog inputs, I 
 don't know where I can start looking. I would appreciate any help.

 Thanks


LCD backlight uses PWM, that should get you started.
Not sure about analog inputs. Touchscreen uses the same subsystem though. 

You can try the TI Linux SDK user guide/release notes for more details. The 
TI Android 3.2 kernel is based on this.

-Vishveshwar

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[beagleboard] Re: PWM Subsystem Time Base input clock frequency?

2014-01-31 Thread robjsstewart
On Friday, January 31, 2014 1:38:32 PM UTC-5, robjss...@gmail.com wrote:
 According to the TRM, the Time Base module on each of the PWM subsystems is 
 clocked directly from the cpu clock. That is, its being clocked at a period 
 of 1 nsec. It can be prescaled down to 1/128,for a period of 128 nsecs. The 
 period and the counter compare registers are only 16 bits wide so the minimum 
 PWM frequency is about 120 MHz. Is that correct?
 
 Bob Stewart

sigh...thanks, you are correct. But, it is fast than I would have expected.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[beagleboard] Re: PWM Subsystem Time Base input clock frequency?

2014-01-31 Thread robjsstewart
On Friday, January 31, 2014 1:48:09 PM UTC-5, Peter Baltus wrote:
 I guess I would argue that with 16 bits the counter can count up to 65535 and 
 wrap around after 65536 counts of 128ns max. That gives a max period of the 
 PWM of 8.39ms and a min frequency of 119Hz - I think. But it has been a long 
 day, so I might very well be very wrong ;-)
 
Peter

Sigh...you are correct! But it's still a higher frequency than I expected for 
the slowest PWM signal. I thought that the input clock might not be at the cpu 
frequency.
Thanks.

-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[beagleboard] Re: PWM: changing Period of EHRPWM

2014-01-06 Thread Giuseppe Iellamo
Hi,

the problem is a bug in pwm_test so that once you enabled two channels of 
the same ehrpwm you cannot change the period.

Try look at

http://saadahmad.ca/using-pwm-on-the-beaglebone-black/

https://github.com/SaadAhmad/beaglebone-black-cpp-PWM

Il giorno lunedì 6 gennaio 2014 21:13:37 UTC+1, anto...@gmail.com ha 
scritto:

 Thanks,

 Tried your trick even replaced the new dtbo file but even after 
 that I am getting the default value for Period ( ie, 500) and duty (ie, 
 0) ... Is there any step that you missed in between...??. Anyways thanks 
 for the tip..:)

 On Monday, 8 July 2013 08:44:54 UTC+5:30, tohr...@gmail.com wrote:

 Hello,

 you can change period by changing dtbo files.

 1 Generate dts file from original dtbo file
 dtc -I dtb -O dts -o /lib/firmware/bone_pwm_P8_13-00A0.dts /lib/firmware/
 bone_pwm_P8_13-00A0.dtbo

 2 Change period
 open file /lib/firmware/bone_pwm_P8_13-00A0.dts with editor at 
 lines around line 26:
 pwm_test_P8_13 {
 compatible = pwm_test;
 pwms = 0xdeadbeef 0x1 0x7a120 0x1;

  and change to following, for example change period to 10ns=0.1ms

 pwm_test_P8_13 {
 compatible = pwm_test;
 pwms = 0xdeadbeef 0x1 10 0x1;
   
 where
 -3rd parameter of linepwms = ~ is period.
 -period (and other parameters) can be written in either decimal or 
 hexadecimal of 0xABC format.
 -default period 0x7a120 is 500 in decimal.
 -As you mentioned, Both A and B output for one eHRPWM must have same 
 period setting.
  If not, the second device will fail to setup at echo (device) 
 /sys/devices/bone_capemgr.*/slots command.

 3 Compile to new dtbo file
 dtc -O dtb -o bone_pwm_P8_13-00A0.dtbo -b 0 -@ bone_pwm_P8_13-00A0.dts

  You'd better back up original dtbo file before overwriting it.

 4 Use new dtbo file. 
 echo bone_pwm_P8_13  /sys/devices/bone_capemgr.*/slots



 2013年6月4日火曜日 16時33分00秒 UTC+9 sultanof.ilo...@gmail.com:

 Hey, 
 yes sure, duty must be (0 = duty = period). Otherwise you would try to 
 to set a pwm duty cycle of less than 0% or more than 100%. Returning an 
 error to the user is a proper way to handle this. 

 As mentioned above EHRPWM1 and EHRPWM2 share the same base period (or 
 respectively the base frequency). If I enable both PWM ouputs, writing to 
 the period files always results in an error. Enabeling only one of the two 
 outputs lets me change the periods.
 This does make sense after all. I assume the necessary crosschecking of 
 the conditions (0 = duty = period) for related PWM outputs is simply not 
 implemented yet or mayby just faulty. 

 Am Montag, 3. Juni 2013 12:25:15 UTC+2 schrieb lawe...@gmail.com:

 Hi

 I'm just starting out, but here is what I found. Hopefully it can help 
 you.
 The period must be greater than duty.
 This worked fine for me:
 echo 10  /sys/devices/ocp.2/pwm_test_P9_14.12/period
 Period is given in ns. Duty is given in ns on/off depending on polarity.




-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.


[beagleboard] Re: PWM input in beaglebone

2014-01-05 Thread Bruce Schaller
I'm guessing that you figured this out already or don't care any more.  But 
in case you were wondering, you can use the GPIO pins, google around for 
this and there's the interrupt method.  Maybe the easiest if you don't 
mind 10bit resolution would be to use the PWM with an optocoupler, like the 
LED dimming example.  Then you could go right to the analog in pin.  I 
guess it really depends on how fast you need to do it.  10 bit is 1024...so 
that would give you about... 800-20=780; 780/1024 = 0.76kHz per step.

Cheers,
Bruce

On Wednesday, July 4, 2012 12:26:01 PM UTC-4, Jeshwanth wrote:

 Hello All,

 I have a PWM signal which is going to give input to beaglebone, the 
 frequency starts from 20kHz to 800kHz. What is the method I can use to 
 calculate the frequency ?? 


-- 
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.
For more options, visit https://groups.google.com/groups/opt_out.