From: Bill Gatliff <bgat@billgatliff.com>
To: David Brownell <david-b@pacbell.net>
Cc: linux-embedded@vger.kernel.org
Subject: Re: [[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin
Date: Tue, 17 Nov 2009 10:00:46 -0600 [thread overview]
Message-ID: <4B02C8AE.8050600@billgatliff.com> (raw)
In-Reply-To: <200911170029.36669.david-b@pacbell.net>
David Brownell wrote:
> Worth highlighting that this is necessarily a "low quality"
> PWM ... in the sense that it's got lots of jitter because
> of needing CPU intervention in IRQ context, so it's subject
> to delays from both IRQs being blocked and from other timer
> driven activities firing first.
>
Very, very good point.
The jitter can be quite low (100's of usecs) on a 200 MHz ARM9 chip, in
fact, but you'll eat your battery alive if it's a portable device. And
the jitter will also destroy your waveform at high or low duty cycles.
> There are lots of applications where that jitter is enough
> to preclude using this kind of PWM. I get the feeling that
> some of the Linux folk seeing "this PWM thing" are not very
> cognizant of such issues ... they've not had to use PWM to
> do anything where the jitter matters. (Not that I have;
> but I know that such apps are a motivation for most of the
> PWM hardware on microcontrollers. A few PWMs plus some
> sensors, hall effect or QEI or whatever; then you get a
> motor controller.)
>
For some definitions of "motor controller". :)
You might even be able to use a GPIO-as-PWM signal to feed an R/C servo
positioner, but the jitter there will be very visual when it occurs.
Dimming control of LEDs and incandescent lamps can be very forgiving of
jitter, but I was thinking more along the lines of "make this LED blink
faster or slower" when I came up with the implementation.
b.g.
--
Bill Gatliff
bgat@billgatliff.com
next prev parent reply other threads:[~2009-11-17 16:00 UTC|newest]
Thread overview: 22+ messages / expand[flat|nested] mbox.gz Atom feed top
2009-10-19 20:32 [[RFC] 0/5] Generic PWM API Proposal Bill Gatliff
2009-10-19 20:32 ` [[RFC] 1/5] API to consolidate PWM devices behind a common user and kernel interface Bill Gatliff
2009-10-19 20:32 ` [[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin Bill Gatliff
2009-10-19 20:32 ` [[RFC] 3/5] Expunge old Atmel PWMC driver, replacing it with one that conforms to the PWM API Bill Gatliff
2009-10-19 20:32 ` [[RFC] 4/5] An LED "dimmer" trigger, which uses the PWM API to vary the brightness of an LED according to system load Bill Gatliff
2009-10-19 20:32 ` [[RFC] 5/5] Incorporate PWM API code into KBuild Bill Gatliff
2009-10-19 22:30 ` Mike Frysinger
2009-10-19 21:51 ` [[RFC] 4/5] An LED "dimmer" trigger, which uses the PWM API to vary the brightness of an LED according to system load Mike Frysinger
2009-10-20 1:42 ` Bill Gatliff
2009-10-20 3:58 ` Mike Frysinger
2009-10-30 14:03 ` Luotao Fu
2009-10-31 7:43 ` Trilok Soni
2009-10-31 7:45 ` Trilok Soni
2009-10-19 22:34 ` [[RFC] 3/5] Expunge old Atmel PWMC driver, replacing it with one that conforms to the PWM API Mike Frysinger
2009-10-20 2:02 ` Bill Gatliff
2009-10-19 21:56 ` [[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin Mike Frysinger
2009-10-20 1:47 ` Bill Gatliff
2009-11-17 8:29 ` David Brownell
2009-11-17 16:00 ` Bill Gatliff [this message]
2009-11-18 21:02 ` Aras Vaichas
2009-10-19 22:29 ` [[RFC] 1/5] API to consolidate PWM devices behind a common user and kernel interface Mike Frysinger
2009-10-20 1:59 ` Bill Gatliff
Reply instructions:
You may reply publicly to this message via plain-text email
using any one of the following methods:
* Save the following mbox file, import it into your mail client,
and reply-to-all from there: mbox
Avoid top-posting and favor interleaved quoting:
https://en.wikipedia.org/wiki/Posting_style#Interleaved_style
* Reply using the --to, --cc, and --in-reply-to
switches of git-send-email(1):
git send-email \
--in-reply-to=4B02C8AE.8050600@billgatliff.com \
--to=bgat@billgatliff.com \
--cc=david-b@pacbell.net \
--cc=linux-embedded@vger.kernel.org \
/path/to/YOUR_REPLY
https://kernel.org/pub/software/scm/git/docs/git-send-email.html
* If your mail client supports setting the In-Reply-To header
via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line
before the message body.
This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).