cancel
Showing results for 
Search instead for 
Did you mean: 

What is CCx update rate in AN4013 timer overview?

Dmitry Bravikov
Associate II
Posted on June 28, 2014 at 11:30

There is equation in AN4013 timer overview:

CCx update rate = TIMx_Counter_CLK / CCRx.

What is CCx update rate?

Does CCx update rate depend on ARR?

#timer #an4013
1 REPLY 1
Posted on June 28, 2014 at 14:37

You'd advance the TIMx->CCRx registers to generate a signal when TIMx->CNT counts past the value

If the Period = 10000, TIMx->ARR = Period-1

If CCx needs to fire 1000 ticks after the prior setting. Ticks are at a frequency dependent on TIMCLK and the prescaler.

TIMx->CCR1 = (TIMx->CCR1 + 1000) % Period;

To generate multiple frequencies from the different timer channels, you'd have to manage the advancement of the CCRx registers in the CCx interrupts.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..