[beagleboard] Advice please - I killed my BBBW and would like to avoid doing it again!

2020-08-06 Thread James Fitzsimons
Hi all,

I've somehow managed to kill one of my BBBW boards. It now displays the dim 
pulse of the power led when plugged into either the 5V barrel jack supply 
or USB and nothing further after that. From digging around on the web it 
appears that this is a sign that I've somehow managed to damage the 3358 
SoC.

I've been going over my last usage of the board to try and establish what 
killed it and would be grateful for any advice people can provide.

I had the BBBW connected to a motor driver board via PWM out on P9_16, and 
had two QEP inputs on P8_33 and P8_35. I was powering the motor encoders 
from the VDD_5V on P9_05 and was using the 3.3V rail from P9_03 to pull up 
some external resistors on the encoder inputs. The FETs that driver the 
motor are powered from a separate 12V battery, however the grounds from the 
battery input and BBBW are tied together. The schematic for the motor 
driver is attached if anyone is interested.

This was working initially, however I think I may have done the damage when 
I pulled the power from the BBBW instead of powering it down gracefully. I 
am working on developing some additional drivers for the RTEMS operating 
system on the Beaglebone and so don't have the ability to gracefully power 
the board down like you can with Linux.

I have exactly the same configuration running on another BBBW on a mobile 
robot without problems, however that is entirely powered from battery, 
(BBBW and motors) so there is no split supply issue there.

After doing some reading it appears I may have made a couple of mistakes 
but would appreciate your thoughts.

1. I shouldn't have pulled the power on the BBBW without disconnecting the 
motor battery first. In theory all inputs should have been at zero volts 
after power was removed from the BBBW, but from the reading I have done any 
residual input voltage on header pins after power has been removed can 
damage the board.

2. I should have either used SYS_5V (P9_07 or P9_08) to power the encoders 
rather than VDD_5V. This point is a little less clear as there seems to be 
conflicting advice as to whether you can use the VDD_5V header to power 
external circuitry.

One final observation I have is that looking at the schematic for the BBBW 
it doesn't seem to use a separate external PMIC but does that all inside 
the SoC. Does this make this version of the BBB less robust?

Any and all advice or feedback would be most welcome.

Cheers,
James 

-- 
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/507c06a4-6073-4270-9ac3-a74a2dc2effbo%40googlegroups.com.


mdrvwfb1.pdf
Description: Adobe PDF document


Re: [beagleboard] Re: Is it possible to use two PWM channels independently?

2018-02-28 Thread James Fitzsimons
Thanks very much guys, I now understand the limitations of the epwmss
better.

After giving it some more thought, I think I should be able to get by
without having the need to switch either the A or B output off
independently. Varying the duty cycle should be sufficient.

Thanks again,
James Fitzsimons

On 28 February 2018 at 08:40, TJF <jeli.freih...@gmail.com> wrote:

> You can generate PWM outputs by
>
>- 2x3 channels on the PWM modules in the PWMSS
>- 3 channels on the CAP modules in the PWMSS (P9_28, P9_42, JT_05=5V)
>- 4 channels on TIMER 4 to 7 (P8_07, P8_08, P8_09, P8_10
>- 1 channel on CAP module in the PRU (P8_15)
>
> In case of the PWM modules the A and B channel operates at the same
> frequency (and start at the same time). In order to switch a channel off,
> you can set the duty cycle to 0 (zero).
>
>
> All other outputs can operate independendly (duty cycle, frequency and
> start 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/BnQ64iCb6kw/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/b13da308-9310-46dd-ad68-6a21e4a42a86%40googlegroups.com
> <https://groups.google.com/d/msgid/beagleboard/b13da308-9310-46dd-ad68-6a21e4a42a86%40googlegroups.com?utm_medium=email_source=footer>
> .
>
> 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/CAPi7d%3DCuLEr6gnXR2y8_d_1n12QT%3DH-SF7SWkmPH%3DkcL0GpZVA%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Is it possible to use two PWM channels independently?

2018-02-27 Thread James Fitzsimons
Hi all,

I've got pwm working both through echoing values directly to the device 
files from bash, and also via my C++ program. However I can't get two 
channels of a epwmss device to operate independently. e.g. If I export both 
/sys/devices/platform/ocp/4830.epwmss/48300200.pwm/pwm/pwmchip1/pwm-1:0 
and pwm-1:1 then set a value for period and duty on either one of the 
channels (pwm-1:0 or pwm-1:1), as soon as I enable that channel both 
channels start. Stopping the channel stops both channels. I've even tested 
starting one channel then stopping the other and both stop.

I had read elsewhere that both channels had to use the same frequency 
(period), which would work for my application, however I need to be able to 
set the duty cycle and enable/disable independently. Is that possible?

I'm using the 4.14.20-ti-r36 kernel and have the following overlays enabled:

uboot_overlay_addr6=/lib/firmware/am33xx_pwm-00A0.dtbo
uboot_overlay_addr7=/lib/firmware/BB-PWM0-00A0.dtbo

I'll go read the Technical Reference Manual now, but if someone can shed 
some light on this for me it would be much appreciated!

Cheers,
James Fitzsimons

-- 
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/c769153a-74e9-4ff5-9fa4-de9ef116ccc7%40googlegroups.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.


Re: [beagleboard] Where do I find PWM device address mappings?

2018-02-21 Thread James Fitzsimons
Hi Robert,

Thanks so much for your speedy response!

Just to confirm then - I understand from the comment at the top of that
file "#PWM's change on every bootup:" that my C++ driver code is going to
have to list the contents of each of the epwmss device directories
(e.g. /sys/devices/platform/ocp/4830.epwmss/48300200.pwm/pwm/) to get
the pwmchipXX mapping to use on each boot?

Cheers,
James Fitzsimons

On 22 February 2018 at 15:00, Robert Nelson <robertcnel...@gmail.com> wrote:

> On Wed, Feb 21, 2018 at 7:44 PM, James Fitzsimons
> <james.fitzsim...@gmail.com> wrote:
> > Hi all,
> >
> > I'm trying to use the PWM outputs on my beaglebone and have a question
> about
> > working out which pwmchip device a pin maps to.
> >
> > After figuring out the steps to get the PWM overlays working with u-boot
> (as
> > most tutorials are still referring to cape manager), I was struggling
> with
> > getting a PWM output working using standard shell commands (echoing
> values
> > to duty_cycle, period, enabled etc.) I came across this nugget of
> > information on a blog post:
> >
> >  "EHRPWM1 is under PWMSS1 which has address 0x48302000 and can be
> seen
> > under pwmchip0."
> >
> > When I list the contents of my /sys/class/pwm directory I get the
> following:
> >
> > root@beaglebone:/sys/class/pwm# ls -la
> > total 0
> > drwxrwxr-x  2 root pwm  0 Jan  1  2000 .
> > drwxr-xr-x 59 root root 0 Jan  1  2000 ..
> > lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip0 ->
> > ../../devices/platform/ocp/4830.epwmss/48300100.ecap/pwm/pwmchip0
> > lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip1 ->
> > ../../devices/platform/ocp/4830.epwmss/48300200.pwm/pwm/pwmchip1
> > lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip3 ->
> > ../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3
> > lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip5 ->
> > ../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip5
> > lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip6 ->
> > ../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6
> >
> > Note that in my system the device that maps to 0x48302000 is actually
> > pwmchip3, not pwmchip0 as in the blog post. Once I established that I got
> > things working.
> >
> > My question is - where do I find the information that tells me that
> EHRPWM1
> > is under PWMSS1 which has address 0x48302000? I've had a hunt through the
> > am3358 datasheet and can't see it there. Can anyone point me in the right
> > direction please?
>
> Here you go:
>
> https://github.com/beagleboard/bb.org-overlays/blob/master/examples/cape-
> unversal-pwm.txt#L13-L18
>
> 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/CAPi7d%3DDunAC%2BRZQMeh0m4YGje3Sixvb-Yq8uJht3BQydHgQ2tQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.


[beagleboard] Where do I find PWM device address mappings?

2018-02-21 Thread James Fitzsimons
Hi all,

I'm trying to use the PWM outputs on my beaglebone and have a question 
about working out which pwmchip device a pin maps to.

After figuring out the steps to get the PWM overlays working with u-boot 
(as most tutorials are still referring to cape manager), I was struggling 
with getting a PWM output working using standard shell commands (echoing 
values to duty_cycle, period, enabled etc.) I came across this nugget of 
information on a blog post:

 "EHRPWM1 is under PWMSS1 which has address *0x48302000 *and can be 
seen under *pwmchip0*."

When I list the contents of my /sys/class/pwm directory I get the following:

root@beaglebone:/sys/class/pwm# ls -la
total 0
drwxrwxr-x  2 root pwm  0 Jan  1  2000 .
drwxr-xr-x 59 root root 0 Jan  1  2000 ..
lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip0 -> 
../../devices/platform/ocp/4830.epwmss/48300100.ecap/pwm/pwmchip0
lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip1 -> 
../../devices/platform/ocp/4830.epwmss/48300200.pwm/pwm/pwmchip1
lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip3 -> 
../../devices/platform/ocp/48302000.epwmss/48302200.pwm/pwm/pwmchip3
lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip5 -> 
../../devices/platform/ocp/48304000.epwmss/48304100.ecap/pwm/pwmchip5
lrwxrwxrwx  1 root pwm  0 Nov  3  2016 pwmchip6 -> 
../../devices/platform/ocp/48304000.epwmss/48304200.pwm/pwm/pwmchip6

Note that in my system the device that maps to 0x48302000 is actually 
pwmchip3, not pwmchip0 as in the blog post. Once I established that I got 
things working.

My question is - where do I find the information that tells me that EHRPWM1 
is under PWMSS1 which has address *0x48302000*? I've had a hunt through the 
am3358 datasheet and can't see it there. Can anyone point me in the right 
direction please?

Many thanks,
James Fitzsimons

-- 
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/86154a9c-a2fc-4af8-b0ea-79598c513618%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: [beagleboard] Looking for BBBWL eeprom dump.

2017-11-26 Thread james . fitzsimons
Hi all,

Just wanted to say thanks for the helpful advice in this thread. I've just 
got one of the BBB Wireless boards and flashed it to the latest Debian IoT 
image. I'd spent a while trying to figure out why my custom overlay wasn't 
working (took a bit to figure out uboot given all the info on the web is 
still talking about cape manager), so I decided to distract myself by 
figuring out why the wifi wasn't working. Turns out my eeprom was fubar'd 
too! I got mine from Digi-key so it looks like a fairly common issue.

Anyway problem now solved and wifi working! Turns out my custom cape is 
also now loading, although I only figured that out by looking at the pin 
configuration. dmesg doesn't seem to have any useful information about cape 
loading, and I haven't come across an easy way like the old "cat $SLOTS" 
approach to figure out what overlays are loaded.

Thanks again.

Cheers,
James Fitzsimons 

On Monday, 12 June 2017 05:14:29 UTC+12, RobertCNelson wrote:
>
> On Sun, Jun 11, 2017 at 7:44 AM, JoelM <joel.m...@gmail.com > 
> wrote: 
> > Hi, I got a BBB Wireless from Mouser this week. This is the eeprom 
> content: 
> >   aa 55 33 ee 41 33 33 35  42 4e 4c 54 42 42 57 47 
> > |.U3.A335BNLTBBWG| 
> > 0010  33 30 36 32 00 00 00 00  b0 4f 0d 00 ff ff ff ff 
> > |3062.O..| 
> > 0020  ff ff ff ff ff ff ff ff  ff ff ff ff ff ff ff ff 
> > || 
> > 
> >  I had to add the following to /boot/uEnv.txt to get wireless going: 
> > dtb=am335x-boneblack-wireless.dtb 
> > 
> > I haven't flashed the eeprom with the BWA3 version, do I need that now 
> when 
> > uEnv.txt is changed? 
>
> Lovely, another furbar'ed eeprom: 
>
>
> GND TP1 and run: 
>
> sudo dd if=/opt/scripts/device/bone/bbbw-eeprom.dump 
> of=/sys/devices/platform/ocp/44e0b000.i2c/i2c-0/0-0050/eeprom 
>
> then run: 
>
> sudo /opt/scripts/tools/version.sh | grep eeprom 
>
> and it "should" show: 
>
> A335BNLTBWA5BBWG 
>
> Then it'll work out of the box.. 
>
> 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/ca56f1c8-4b90-40f4-b7ff-dd8ab7d970f4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.