FASTPWM

Dependents:   OV7670_make

Revision:
22:db9c0cf445e2
Parent:
17:8378bc456f0d
Child:
24:1f451660d8c0
--- a/Device/FastPWM_STM_TIM.cpp	Mon Jan 12 10:31:18 2015 +0000
+++ b/Device/FastPWM_STM_TIM.cpp	Thu Apr 16 19:23:53 2015 +0000
@@ -19,6 +19,9 @@
     fast_obj = new (CHANNEL_P_T);
     *(CHANNEL_P_T*)fast_obj = getChannel(PWM_TIMER, _pwm.pin);
     
+    //Enable PWM period syncing for glitch free result
+    PWM_TIMER->CR1 |= TIM_CR1_ARPE;
+    
     bits = 16;
 }