cancel
Showing results for 
Search instead for 
Did you mean: 

TIM Config on STM32L1xx for Time Base Function

valeriogiampa
Associate II
Posted on February 20, 2012 at 08:47

Hi,

I need a support to understand how I can configure the TIM Peripheral of my stm32l1xx (TIM8 for example) to develop a time base unit. I have to configure it for generating an interrupt every 100usec.

In the Structure if the Library there are same field that I don't understand how this are related to the clock frequency and output timer frequency. This field are:

TIM_TimeBaseStructure., TIM_TimeBaseStructure., TIM_TimeBaseStructure. .

Can sameone help me to understand this fields and to understand how to configure the TIM Peripheral?

#tim-stm32l1xx-timer-config
1 REPLY 1
Posted on February 20, 2012 at 14:00

timebase frequency = TIMCLK / ((TIM_TimeBaseStructure.Prescale + 1) * (TIM_TimeBaseStructure.Period + 1))

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..