AnsweredAssumed Answered

Timer configuration

Question asked by hospodar.ivan on Mar 23, 2015
Latest reply on Mar 24, 2015 by waclawek.jan
Hello,
I using a STM32F103 processor and Keil uvision MDK. I have this timer configuration in my project:

01.TIM_TimeBaseInitTypeDef timerInitStructure;
02. 
03.RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
04. 
05.timerInitStructure.TIM_Prescaler = 40000;
06.timerInitStructure.TIM_CounterMode = TIM_CounterMode_Up;
07.timerInitStructure.TIM_Period = 500;
08.timerInitStructure.TIM_ClockDivision = TIM_CKD_DIV1;
09.timerInitStructure.TIM_RepetitionCounter = 0;
10.TIM_TimeBaseInit(TIM2, &timerInitStructure);
11.TIM_Cmd(TIM2, ENABLE);

During building a project I obtain this 3 errors:

Error: L6218E: Undefined symbol TIM_GetCounter (referred from main.o).
Error: L6218E: Undefined symbol TIM_Cmd (referred from periph_init.o).
Error: L6218E: Undefined symbol TIM_TimeBaseInit (referred from periph_init.o).

In project I have included all important files like "stm32f10x_tim.h", "stm32f10x_rcc.h", "misc.h", "stm32f10x_gpio.h".

Please, can someone explain me what is reason for this errors?

Outcomes