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.

TM4C1290NCPDT: Can't get second pulse stream out of PWM

Part Number: TM4C1290NCPDT

Tool/software:

I'm trying to get two identical pulse streams out of PWM0, GEN0 and GEN2.  I get the pulses out of GEN0 at PF0 but nothing out of GEN2 at PF2.

 GPIOPinTypePWM(GPIO_PORTF_BASE, 0x01);

    GPIOPinConfigure(GPIO_PF0_M0PWM0);

    GPIOPinTypePWM(GPIO_PORTF_BASE, 0x04);

    GPIOPinConfigure(GPIO_PF2_M0PWM2);

 

    PWMClockSet(PWM0_BASE, PWM_SYSCLK_DIV_16);                                  // 1250KHz Clock.

    PWMGenConfigure(PWM0_BASE, PWM_GEN_0, PWM_GEN_MODE_DOWN   |                 //

                                          PWM_GEN_MODE_NO_SYNC );               //

    PWMDeadBandDisable(PWM0_BASE, PWM_GEN_0);                                   //

    PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, 1250);                                // 1KHz output.

    PWMPulseWidthSet(PWM0_BASE, PWM_GEN_0, 625);                                // 50% duty cycle.

    PWMOutputUpdateMode(PWM0_BASE, PWM_OUT_0_BIT, PWM_OUTPUT_MODE_SYNC_LOCAL);  // Output change on 0 count.

    PWMGenEnable(PWM0_BASE, PWM_GEN_0);                                         //

   

    PWMGenConfigure(PWM0_BASE, PWM_GEN_2, PWM_GEN_MODE_DOWN   |                 //

                                          PWM_GEN_MODE_NO_SYNC );               //

    PWMDeadBandDisable(PWM0_BASE, PWM_GEN_2);                                   //

    PWMGenPeriodSet(PWM0_BASE, PWM_GEN_2, 1250);                                // 1KHz output.

    PWMPulseWidthSet(PWM0_BASE, PWM_GEN_2, 625);                                // 50% duty cycle.

    PWMOutputUpdateMode(PWM0_BASE, PWM_OUT_2_BIT, PWM_OUTPUT_MODE_SYNC_LOCAL);  // Output change on 0 count.

    PWMGenEnable(PWM0_BASE, PWM_GEN_2);                                         //

 

    PWMOutputState(PWM0_BASE, PWM_OUT_0_BIT | PWM_OUT_2_BIT, true);             // Turn on PWM output.

Thanks, Doug