My requests: PWM enhancement.
The current software PWM implementation does a decent job, it's usable, but it looks like it hasn't been finished. To make it really comparable to a hardware implementation we're used to please add:
- Dynamic membership of a GPIO (i.e. user can make GPIO a PWM or a normal GPIO after user started the PWM subsystem)
- Implement 100% on and 100% off for PWM GPIO's. I think this could be added quite simply by making the GPIO a normal GPIO if 0% or 100% is detected and then staticly setting the GPIO off or on. That's what I do on AVR's at least, works quite well
When the duty is changed, make the GPIO PWM again. I guess for that to work my first enhancement request should also be implemented
- Implement glitch-free frequency-correct PWM (not for me personally, but for the user that use PWM to drive motors); i.e. make the counter go up, then bounce, go down, bounce and go up again, so the duty is cycle is mirrored and the effective PWM frequency is divided by two.
The current state of PWM makes a lot of users not using it and trying to create their own using hardware interrupts (which is more or less prone to fail anyway, because apparently the non-maskable interrupt is used not only for PWM).