在PWM0初始设置了占空比之后,还要用
PWMOutputState(PWM0_BASE, PWM_OUT_0_BIT,true); PWMGenEnable(PWM0_BASE, PWM_GEN_0);xyz549040622:
PWM_OUT_0_BIT,应该是PWM输出0吧,具体可不可以修改,要看头文件中有没有宏定义
xyz549040622:
数据手册中是可以取上面图中的值的,至于第二个值是什么,库函数中是这么介绍的
//! Selects the inversion mode for PWM outputs.//!//! \param ui32Base is the base address of the PWM module.//! \param ui32PWMOutBits are the PWM outputs to be modified. This parameter//! must be the logical OR of any of \b PWM_OUT_0_BIT, \b PWM_OUT_1_BIT,//! \b PWM_OUT_2_BIT, \b PWM_OUT_3_BIT, \b PWM_OUT_4_BIT, \b PWM_OUT_5_BIT,//! \b PWM_OUT_6_BIT, or \b PWM_OUT_7_BIT.//! \param bInvert determines if the signal is inverted or passed through.//!//! This function is used to select the inversion mode for the selected PWM//! outputs. The outputs are selected using the parameter \e ui32PWMOutBits.//! The parameter \e bInvert determines the inversion mode for the selected//! outputs. If \e bInvert is \b true, this function causes the specified//! PWM output signals to be inverted or made active low. If \e bInvert is//! \b false, the specified outputs are passed through as is or made active//! high.
Sun DaSheng Sun:
回复 xyz549040622:
英语渣看不懂啊TAT
TI中文支持网

