cancel
Showing results for 
Search instead for 
Did you mean: 

why can not enter TIM5 interrupt service

haibao421
Associate
Posted on August 15, 2013 at 05:55

Hello:

   Today , I want to capture the high-level  length of input signal using TIM5 Channel 1 (PA.0) in chip (STM32F103ZET6)?but why program can not enter TIM5 interrupt service ? please help me ! I have attached the project here

#stm32f103zet6-tim5
5 REPLIES 5
Posted on August 15, 2013 at 08:06

Doesn't look unreasonable, I'd probably not be clearing interrupts immediately prior to exiting the service routine.

How are you testing the failure condition, are you breakpointing the TIM5_IRQHandler() ?
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
psandesh007
Associate II
Posted on August 17, 2013 at 12:51

Make sure that you are using startup_stmf10x_xl.s Standard lib..

Posted on August 17, 2013 at 22:42

Make sure that you are using startup_stmf10x_xl.s Standard lib..

How would that help? He has an HD part, not an XL one. And has a TIM5_IRQHandler in the vector table.
Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
psandesh007
Associate II
Posted on August 26, 2013 at 12:43

Yes startup_stm32f10x_hd.s lib needed. I faced the same problem while im doing Capturing using the same board. By default it will add the (startup_stm32f10x_md.s) lib. In startup_stm32f10x_md.s lib there is no TIM5, so startup_stm32f10x_hd.s file has to be added.. 

Posted on August 26, 2013 at 18:57

I faced the same problem while im doing Capturing using the same board.

What board is that? The OP doesn't identify one, and it's not the STM32 VL-Discovery board. He also attaches a project that contains the right source files, and right defines for the HD part. From the project one might infer he has a Core103Z.

By default it will add the (startup_stm32f10x_md.s) lib.

What does? The template project, for the STM3210E-EVAL doesn't, or the VL-DISCOVERY.

I can see that using the wrong file, with a vector table lacking the interrupt required, will be a problem. I'm just not seeing that in the project presented here. There is some other issue at play here. The OP has not responded.

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