mirror of
https://github.com/micropython/micropython.git
synced 2026-01-07 04:30:24 +01:00
The PWM driver uses a double buffer for the PWM timing array, one in current use and the other one to update when changing duty parameters. The issue was that once the duty parameters were changed the updated buffer was applied immediately without synchronising to the start of the PWM period. By moving the buffer toggling/swapping to the interrupt when the cycle is done there are no more glitches.