Hello everybody. I am trying to set up a PWM using the M4, but unfortunetally I couldn't find any example to see how it is done.
So far this is what I have, a couple of ideas taken from some application notes, but I still can't have any output, can somebody help me? Is there anything missing?
SysCtlPWMClockSet(SYSCTL_PWMDIV_1);
SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM);
SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOH);
GPIOPinTypePWM(GPIO_PORTH_BASE, GPIO_PIN_0);
ulPeriod =
SysCtlClockGet() / 440;
PWMGenConfigure(PWM_BASE, PWM_GEN_0,
PWM_GEN_MODE_DOWN | PWM_GEN_MODE_NO_SYNC);
PWMGenPeriodSet(PWM_BASE, PWM_GEN_0, 400);
PWMPulseWidthSet(PWM_BASE, PWM_OUT_0, 100);
PWMGenEnable(PWM_BASE, PWM_GEN_0);
PWMOutputState(PWM_BASE, (PWM_OUT_0_BIT | PWM_OUT_1_BIT), true);