cancel
Showing results for 
Search instead for 
Did you mean: 

TIM1 interrupt on stm32f107vc

maryuriy
Associate II
Posted on March 22, 2013 at 21:32

Hello!

I can't enable the interrupt (NVIC_EnableIRQ (TIM1_UP_IRQn)) from the timer TIM1.

Keil dislike arguments TIM1_BRK_IRQn, TIM1_UP_IRQn, TIM1_TRG_COM_IRQn:

Main \ main.c (124): error: # 20: identifier ''TIM1_UP_IRQn'' is undefined,

but

 TIM1_CC_IRQn 

Keil 

understand and interrupt normal work.

Please, tell me, what am i doing wrong?

Use stm32f107vc (connectivity line)

2 REPLIES 2
Posted on March 22, 2013 at 22:20

Make sure you have the define STM32F10X_CL set in your project, and not something like STM32F10X_HD_VL, etc

Also make sure to use the right startup_stm32f1???.s file

#ifdef STM32F10X_HD_VL

  ADC1_IRQn                   = 18,     /*!< ADC1 global Interrupt                                */

  EXTI9_5_IRQn                = 23,     /*!< External Line[9:5] Interrupts                        */

  TIM1_BRK_TIM15_IRQn         = 24,     /*!< TIM1 Break and TIM15 Interrupts                      */

  TIM1_UP_TIM16_IRQn          = 25,     /*!< TIM1 Update and TIM16 Interrupts                     */

  TIM1_TRG_COM_TIM17_IRQn     = 26,     /*!< TIM1 Trigger and Commutation and TIM17 Interrupt     */

  TIM1_CC_IRQn                = 27,     /*!< TIM1 Capture Compare Interrupt                       */

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
maryuriy
Associate II
Posted on March 23, 2013 at 10:45

Thank you!

I will redo my startup.