This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

硬件PWM没输出



我用的是LM4F231H5QR芯片,PG4产生PWM信号(M0PWM4) 但是不知道为什么就是没有输出


SysCtlPWMClockSet(SYSCTL_PWMDIV_1);  //66.6M
SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOG);
GPIOPinConfigure(GPIO_PG4_M0PWM4);

GPIOPinTypePWM(GPIO_PORTG_BASE, GPIO_PIN_4);

PWMGenConfigure(PWM_BASE, PWM_GEN_0,PWM_GEN_MODE_DOWN |PWM_GEN_MODE_NO_SYNC);

PWMGenPeriodSet(PWM_BASE, PWM_GEN_0,64000);

PWMPulseWidthSet(PWM_BASE,PWM_OUT_4,640); 或者PWMPulseWidthSet(PWM_BASE,PWM_OUT_0,640);都试过

 PWMOutputState(PWM_BASE,PWM_OUT_4_BIT,1);

PWMGenEnable(PWM_BASE, PWM_GEN_0);

就是没有PWM输出,请指教