I think there are only three PWM units (ehrpwm0, ehrpwm1, and ehrpwm2), but
two of them have an A and a B.  I didn't dig too far, but I suspect there
are some constraints on how the A and B can be used, such as maybe they
have to both be at the same frequency, but they could have different duty
cycles.  The question about which pwmchipN to export is a good one, and I
think this is where the documentation is the weakest.  I think that when I
had all the PWMs enabled in the device tree, ehrpwm2B was pwmchip6.  I
think it just starts with a base of zero and increments for each enabled
pwm unit.  When I only had ehrpwm2A enabled, I saw only pwmchip0, so I knew
that was it.  An remember, you are not exporting the pin, but the PWM
itself, to user space.  I finally realized that's what 'export' means.  The
pinmux table handles the routing of the PWM output to the physical pin.
I'm pretty sure you are right about P8_13 and P8_19, but I don't recall the
other ehrpwm pins.  I found these tables (
http://www.embedded-things.com/bbb/beaglebone-black-pin-mux-spreadsheet/)
by googling "beaglebone black pin mux table".

On Thu, Oct 1, 2015 at 2:13 AM, Khanh Nguyen <[email protected]>
wrote:

> Hey Kevin,
>
> Thanks for the guide on enabling PWM on kernel 4.1. I'm a little confused
> with PWM now though,...Based on the values that you provide, are you saying
> that, there are only 3 PWM's on the Beagleboard? I thought there were more
> than that or maybe I was wrong.
>
> The 2nd question would be, is this right?
>
> 0x024  0x4    corresponds to ehrpwm2B = P8_13
> 0x020  0x4      corresponds to ehrpwm2A = P8_19
> 0x150  0x3    corresponds to ehrpwm0A = P9_14
> (Are we missing some pins)
>
> Also, how do you know it's pin 0 to export? I thought this were more like 
> exporting GPIO, whereas you'd need to know which pin is which to export?
>
> Thanks,
> Khanh
>
>
> --
> 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/dkS51WbicTo/unsubscribe.
> To unsubscribe from this group and all its topics, send an email to
> [email protected].
> 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 [email protected].
For more options, visit https://groups.google.com/d/optout.

Reply via email to