看这里的代码:
TIM_ICStructInit(&TIM_HALLICInitStructure);
TIM_HALLICInitStructure.TIM_Channel = TIM_Channel_1;
TIM_HALLICInitStructure.TIM_ICPolarity = TIM_ICPolarity_Falling;
TIM_HALLICInitStructure.TIM_ICFilter = pDParams_str->hInpCaptFilter;
TIM_ICInit(TIMx,&TIM_HALLICInitStructure);
....................
/* Enables the XOR of channel 1, channel2 and channel3 */
TIM_SelectHallSensor(TIMx, ENABLE);
霍尔信号还是单边沿检测. |