2016-03-08 06:15 AM
Hi,
according to the reference manual the STM32F4(07) Timer 2 and Timer 5 are capable of counting 32bit. I want to use upcounting and overflow event. As far as I understand these timers, the timer counts from 0 to ARR (auto reload value), creates an overflow event and starts from 0 again. Using STD Peripherals library you can see in stm32f4xx_tim.h
uint32_t TIM_Period; /*!< Specifies the period value to be loaded into the active Auto-Reload Register at the next update event. This parameter must be a number between 0x0000 and 0xFFFF. */ Is loaded into ARR. So my problem is, that I want to use 32bits of the timer and a ARR that is bigger than 16bit. Any ideas why only 16bit auto reload values are allowed ?
2016-03-08 08:26 AM
Any ideas why only 16bit auto reload values are allowed ?
The comment comes from the older F1 library, the value can be 0x00000000..0xFFFFFFFF2016-03-09 05:49 AM
Hi l..michael,
That's depends on the device and which timer in that device you are using. Keep your first reference of information both reference manual and datasheet of that device.In your case , with STM32F407, it is mentioned in the reference manual, in TIM2 to TIM5 main features part page 582 the following: “16-bit (TIM3 and TIM4) or 32-bit (TIM2 and TIM5) up, down, up/down auto-reload counter.�For the driver/ headers are developed to support all kinds of integrated Timers and give the safe conditions to avoid inconvenience.
So TIM2 and TIM5 contains 32-bit auto-reload counters and you can work with safely.
-Hannibal-