cancel
Showing results for 
Search instead for 
Did you mean: 

STM32L152 TIM5

brianshankland9
Associate II
Posted on May 10, 2012 at 11:17

I have an interesting problem I hope someone can explain.

I was trying to modify the PWM_Input example from the StdPeriph examples to work with TIM5 so I could get a longer range. 

I have tried to use both TIM5_CH2 (PA1) and TIM5_CH4 (PA3) but on both occasions the input signal from my Agilent waveform generator SYNC output gets attenuated to 1.2V and no timer capture events occur.

If I switch to using TIM2 with the same pins the signal is not changed and the example works as expected.

Can anyone explain why I'm having this problem with using TIM5?

#stm32-stm32l152-tim5
2 REPLIES 2
Posted on May 10, 2012 at 13:46

Sounds like the pins aren't correctly configured, and you are fighting a high output.

Does the STM32L152 even have a TIM5 ?

TIM2, 3, 4, 6, 7, 9, 10, 11 (8 timers)

http://www.st.com/internet/com/TECHNICAL_RESOURCES/TECHNICAL_LITERATURE/DATASHEET/CD00277537.pdf

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
brianshankland9
Associate II
Posted on May 10, 2012 at 14:33

Hello clive1,

Ahh penny has dropped. We are going to be using the STM32L151ZD so I've been referring to the STM32L151XD programmers manual, while the STM32L151-EVAL board that I'm prototyping on uses a STM32L152VBT, and hence no TIM5.

Thanks, explains why there were no TIM5 examples in the project library.