在线时间0 小时
UID345459
ST金币0
蝴蝶豆0
注册时间2009-9-26
中级会员
- 最后登录
- 1970-1-1
|
a0a.1 0b0c
void tim2_configuration(void)
{
TIM_TimeBaseInitTypeDef TIM_TimeBaseStructure;
TIM_DeInit(TIM2);
TIM_TimeBaseStructure.TIM_Period=2000; //ARR 的值
TIM_TimeBaseStructure.TIM_Prescaler=0;
TIM_TimeBaseStructure.TIM_ClockDivision=0; //时钟分频
TIM_TimeBaseStructure.TIM_CounterMode=TIM_CounterMode_Up; //向上计数模式
TIM_TimeBaseInit(TIM2, &TIM_TimeBaseStructure);
TIM_PrescalerConfig(TIM2,0x8C9F,TIM_PSCReloadMode_Immediate);//时钟分频系数 36000,所以定时器时钟为 2K
/* Clear TIM2 update pending flag[清除TIM2溢出中断标志] */
TIM_ClearFlag(TIM2, TIM_FLAG_Update);
/* Enable TIM2 Update interrupt [TIM2溢出中断允许]*/
TIM_ITConfig(TIM2, TIM_IT_Update, ENABLE);
TIM_ARRPreloadConfig(TIM2, DISABLE);//禁 止 ARR 预装载缓冲器
TIM_Cmd(TIM2, ENABLE); //开启时钟
}
编译连接时总是有这种情况,,,,到底肿么了,两天了,苦恼中,3.5的库,比着别人的一句句抄都不行
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_ARRPreloadConfig (referred from system_init.o).
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_ClearFlag (referred from system_init.o).
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_Cmd (referred from system_init.o).
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_DeInit (referred from system_init.o).
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_ITConfig (referred from system_init.o).
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_PrescalerConfig (referred from system_init.o).
.\Output\Project.axf: Error: L6218E: Undefined symbol TIM_TimeBaseInit (referred from system_init.o). |
|