Question
Timer configuration
Posted on March 23, 2015 at 17:56
Hello,
I using a STM32F103 processor and Keil uvision MDK. I have this timer configuration in my project:
TIM_TimeBaseInitTypeDef timerInitStructure;
RCC_APB1PeriphClockCmd(RCC_APB1Periph_TIM2, ENABLE);
timerInitStructure.TIM_Prescaler = 40000;
timerInitStructure.TIM_CounterMode = TIM_CounterMode_Up;
timerInitStructure.TIM_Period = 500;
timerInitStructure.TIM_ClockDivision = TIM_CKD_DIV1;
timerInitStructure.TIM_RepetitionCounter = 0;
TIM_TimeBaseInit(TIM2, &timerInitStructure);
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?