Re: [[RFC] 2/5] Emulates PWM hardware using a high-resolution timer and a GPIO pin

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



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@xxxxxxxxxxxxxxx


--
To unsubscribe from this list: send the line "unsubscribe linux-embedded" in
the body of a message to majordomo@xxxxxxxxxxxxxxx
More majordomo info at  http://vger.kernel.org/majordomo-info.html

[Index of Archives]     [Gstreamer Embedded]     [Linux MMC Devel]     [U-Boot V2]     [Linux USB Devel]     [Video for Linux]     [Linux Audio Users]     [Yosemite News]     [Linux Kernel]     [Linux ARM Kernel]     [Linux OMAP]     [Linux SCSI]

  Powered by Linux