/********************************************************************* ?*?@fn??????TIM_CtrlPWMOutputs ?* ?*?@brief???Enables?or?disables?the?TIM?peripheral?Main?Outputs. ?* ?*?@param???TIMx?-?where?x?can?be?1/8/9/10?to?select?the?TIM?peripheral. ?*??????????NewState?-?ENABLE?or?DISABLE. ?* ?*?@return??none ?*/ void?TIM_CtrlPWMOutputs(TIM_TypeDef?*TIMx,?FunctionalState?NewState) { ????if(NewState?!=?DISABLE) ????{ ????????TIMx->BDTR?|=?TIM_MOE; ????} ????else ????{ ????????TIMx->BDTR?&=?(uint16_t)(~((uint16_t)TIM_MOE)); ????} }
參數(shù)說明上沒寫TIM3,而且datasheet上看TIM3也沒有BDTR寄存器。
我直接用發(fā)現(xiàn)確實不起作用。
請問TIM3要做到停止輸出是不是只能先把占空比調到0,然后停止計時器?
熱門產品 :
CH641: PD及無線充電專用MCU