double buffer for PWM module