cancel
Showing results for 
Search instead for 
Did you mean: 

Clock divisions and power efficiency

qwer.asdf
Senior
Posted on January 26, 2015 at 15:29

Hi! I wonder, are clock divisions (like APB1Prescaler, APB2Prescaler, ADC Prescaler, Timers Clock Divisions, etc.) directly affect on power consumption? For example, to get a 1Hz timer, is it more efficient to use this:

[code]

    // My APB1 Timers Clock is 24MHz

    TIM_TimeBaseStructure.TIM_Prescaler = 2500 - 1; // 24000000/4 / 2500 = 2400

    TIM_TimeBaseStructure.TIM_Period = 2400 - 1;    // 2400 / 2400 = 1 Hz

    TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV4;

[/code]

than this:

[code]

    // My APB1 Timers Clock is 24MHz

    TIM_TimeBaseStructure.TIM_Prescaler = 10000 - 1; // 24000000 / 10000 = 2400

    TIM_TimeBaseStructure.TIM_Period = 2400 - 1;    // 2400 / 2400 = 1 Hz

    TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV1;

[/code]

Thank you.
2 REPLIES 2
Posted on January 26, 2015 at 16:09

TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV4;

This doesn't do what you think it does...

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
qwer.asdf
Senior
Posted on January 29, 2015 at 13:25

Can you please explain or point to the documentation where it explains? Thank you.