Skip to main content
valeriogiampa
Associate
February 20, 2012
Question

TIM Config on STM32L1xx for Time Base Function

  • February 20, 2012
  • 1 reply
  • 571 views
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
This topic has been closed for replies.

1 reply

Tesla DeLorean
Guru
February 20, 2012
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 (See Profile) Up vote any posts that you find helpful, it shows what's working..