[求助] stm32f10x中为什么设置输入捕获编译都通不过??

squn   2011-7-22 10:15 楼主

  TIM_ICInitStructure.TIM_ICMode= TIM_ICMode_ICAP;//配置为输入捕获模式 
  TIM_ICInitStructure.TIM_Channel = TIM_Channel_1;
  TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Falling;
  TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
  TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
  TIM_ICInitStructure.TIM_ICFilter = 0x0;
  TIM_ICInit(TIM2, &TIM_ICInitStructure);


  TIM_ICInitStructure.TIM_Channel = TIM_Channel_2;
  TIM_ICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Falling;
  TIM_ICInitStructure.TIM_ICSelection = TIM_ICSelection_DirectTI;
  TIM_ICInitStructure.TIM_ICPrescaler = TIM_ICPSC_DIV1;
  TIM_ICInitStructure.TIM_ICFilter = 0x0;
  TIM_ICInit(TIM2, &TIM_ICInitStructure);
一直提示没有找到TIM_ICMode??

只有把TIM_ICInitStructure.TIM_ICMode= TIM_ICMode_ICAP;//配置为输入捕获模式  注释掉才能通过,那不就是没有设捕获类型了??

[ 本帖最后由 squn 于 2011-7-22 10:29 编辑 ]

回复评论 (2)

库版本用的不一致了吧
点赞  2011-7-22 22:04

回复 沙发 astwyg 的帖子

现在的配置好像不用TIM_ICInitStructure.TIM_ICMode= TIM_ICMode_ICAP;//这句,不懂行不行...
点赞  2011-7-25 10:31
电子工程世界版权所有 京B2-20211791 京ICP备10001474号-1 京公网安备 11010802033920号
    写回复