真够辛苦的了,顶一个啊。 学习学习! 咱们有个问题讨论下,你看KEIL5,/**
* @briefEnables or disables the TIM peripheral Main Outputs.
* @paramTIMx: where x can be 1, 15, 16 or 17 to select the TIMx peripheral.
* @paramNewState: new state of the TIM peripheral Main Outputs.
* This parameter can be: ENABLE or DISABLE.
* @retval None
*/
void TIM_CtrlPWMOutputs(TIM_TypeDef* TIMx, FunctionalState NewState)
{
/* Check the parameters */
assert_param(IS_TIM_LIST2_PERIPH(TIMx));
assert_param(IS_FUNCTIONAL_STATE(NewState));
if (NewState != DISABLE)
{
/* Enable the TIM Main Output */
TIMx->BDTR |= TIM_BDTR_MOE;
}
else
{
/* Disable the TIM Main Output */
TIMx->BDTR &= (uint16_t)(~((uint16_t)TIM_BDTR_MOE));
}
}
TIM3属于高级定时器吗?貌似只有高级定时器才有这句吧?
datasheet上明明写的是AF0, 为什么楼主配置为AF2也能成功?
不错喔
页:
1
[2]