2015-01-26 06:29 AM
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.2015-01-26 07:09 AM
TIM_TimeBaseStructure.TIM_ClockDivision = TIM_CKD_DIV4;
This doesn't do what you think it does...2015-01-29 04:25 AM
Can you please explain or point to the documentation where it explains? Thank you.