Task
Working PWM examples provided in the TivaWare_C_Series v2.1.3.156 SDK on the EK-TM4C1294XL Tiva Launchpad
Issue
TivaWare uses M0PWM0(PB6) & M0PWM1(PB7), which are not broken out for the EK-TM4C1294XL Launchpad for inspection or use
Attempted Resolution
Switch to GPIO which are broken out to EK-TM4C1294XL header pins. These are M0PWM2(PF2) & M0PWM3(PF3) which are broken out to X9. See the attached ZIP file for a project doing this
Status
No PWM output is observed on these pins PF2 or PF3. To note the wiring is validated, see and use deadband_debug_gpio_on() provided for confirmation
Question
What the heck is wrong here? I quite literally changed the pins, and that's it! :(
Code (extracted for illustration)
SysCtlPeripheralEnable(SYSCTL_PERIPH_PWM0); SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOF); //(orig)SysCtlPeripheralEnable(SYSCTL_PERIPH_GPIOB); GPIOPinConfigure(GPIO_PF2_M0PWM2); //(orig)GPIOPinConfigure(GPIO_PB6_M0PWM0); GPIOPinConfigure(GPIO_PF3_M0PWM3); //(orig)GPIOPinConfigure(GPIO_PB7_M0PWM1); GPIOPinTypePWM(GPIO_PORTF_BASE, GPIO_PIN_2); //(orig)GPIOPinTypePWM(GPIO_PORTB_BASE, GPIO_PIN_6); GPIOPinTypePWM(GPIO_PORTF_BASE, GPIO_PIN_3); //(orig)GPIOPinTypePWM(GPIO_PORTB_BASE, GPIO_PIN_7); PWMGenConfigure(PWM0_BASE, PWM_GEN_2, PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_NO_SYNC); //(orig)PWMGenConfigure(PWM0_BASE, PWM_GEN_0, PWM_GEN_MODE_UP_DOWN | PWM_GEN_MODE_NO_SYNC); PWMGenPeriodSet(PWM0_BASE, PWM_GEN_2, 64000); //(orig)PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, 64000); PWMPulseWidthSet(PWM0_BASE, PWM_OUT_2, PWMGenPeriodGet(PWM0_BASE, PWM_GEN_0) / 4); //(orig)PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0, PWMGenPeriodGet(PWM0_BASE, PWM_GEN_0) / 4); PWMDeadBandEnable(PWM0_BASE, PWM_GEN_2, 160, 160); //(orig)PWMDeadBandEnable(PWM0_BASE, PWM_GEN_0, 160, 160); PWMOutputState(PWM0_BASE, PWM_OUT_2_BIT | PWM_OUT_3_BIT, true); //(orig)PWMOutputState(PWM0_BASE, PWM_OUT_1_BIT | PWM_OUT_0_BIT, true); PWMGenEnable(PWM0_BASE, PWM_GEN_2); //(orig)PWMGenEnable(PWM0_BASE, PWM_GEN_0);