Skip to main content
qwer.asdf
Senior
January 26, 2015
Question

Clock divisions and power efficiency

  • January 26, 2015
  • 2 replies
  • 634 views
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.
    This topic has been closed for replies.

    2 replies

    Tesla DeLorean
    Guru
    January 26, 2015
    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 (See Profile) Up vote any posts that you find helpful, it shows what's working..
    qwer.asdf
    qwer.asdfAuthor
    Senior
    January 29, 2015
    Posted on January 29, 2015 at 13:25

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