Hey
Sorry for all my newbie questions :-)
I have configured timer1, and I tried to make PWM with a periode time at 1ms.
I am running in Center-aligned mode 3, and PWM mode 2. The PWM is just outputed on the pins, so I am not using interrupt at all.
The uC is clock with 8Mhz, så the PSC_counter can count to 8000 in 1ms. When I set the PSC_counter_top TIM1_ARR to 4000, it should take exactly 1ms to count from 0 to 4000 and down to 0 again.
When I am mesuring the periode on the oscilloscope the periode time is 1,4ms?? If i change the values the error is allways 40%.
I tryde to calculate the dead time as well, and the error is also 40% her. 100uS ->140uS
Has anybody tryed this? what can be the mistake?
-Niels