2018-09-26 05:00 AM
Hi
I was reviewing my code and I wanted to change some timer configuration
So I use a STM32F727 @216MHz with all clock periph at max speed.
I use the following init (generate by cube) to configure TIM2 to get a 1 µs based timer
htim2.Instance = TIM2;
htim2.Init.Prescaler = 107;
htim2.Init.CounterMode = TIM_COUNTERMODE_UP;
htim2.Init.Period = 0xFFFFFFFF;
htim2.Init.ClockDivision = TIM_CLOCKDIVISION_DIV2;
htim2.Init.AutoReloadPreload = TIM_AUTORELOAD_PRELOAD_ENABLE;
After some test, it seem's that even if I modify the clock division factor (1, 2 or 4), it doesn"t change the timing of TIM2
(After the init, the timer configuration isn't modified)
Any idea why ?
2018-09-26 05:03 AM
The name is misleading, the division in this context relates to the filter on the input sampler.
2018-09-26 07:03 AM
It's explain a lot of things :)
I re-read the documentation and it was written, so I should have paid more attention to this small detail.
Here is the extract from the user manual, It's clear that the clock division is link to the digital filter