2011-09-14 06:08 PM
What is a timebase and what is ?
2011-09-14 08:54 PM
TIM_Prescaler = N - 1; Divides the Bus/TIM clock down by N
TIM_Period = N - 1; Divide that clock down by N, ie the *period* is N ticks. So assume your TIMCLK is ticking at 72 MHz, the *external* clock If TIM_Prescaler = 71; the timers *internal* clock will be 1 MHz If TIM_Period = 999; the 1MHz is divided by a 1000, so it becomes 1KHz Your update interrupt with fire every 1ms Now if you want to play with the channels, say in a PWM mode you can play with the output pins. If TIM_Pulse = 500; the channel will out a frequency of 1 KHz, with a 50/50 duty cycle. ie TIM_Pulse = N / 22011-09-15 10:55 PM
thankyou!