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: Generating a 1K square wave via PWM

Part Number: TM4C1290NCPDT

I'm trying to just generate a 1KHz 50% duty cycle signal stream, in the TM4C123 series I used a timer but can't do that with this chip (unless I had the timer generate an interrupt for each transition) but should be able to using a PWM generator.  My code is as follows:

    GPIOPinTypePWM(GPIO_PORTF_BASE, 0x01);
    GPIOPinConfigure(GPIO_PF0_M0PWM0);

    PWMGenConfigure(PWM0_BASE, PWM_GEN_0, PWM_GEN_MODE_DOWN   |             //
                                          PWM_GEN_MODE_NO_SYNC );           //
    PWMClockSet(PWM0_BASE, PWM_SYSCLK_DIV_16);                              // 1250KHz Clock.
    PWMDeadBandDisable(PWM0_BASE, PWM_GEN_0);                               //
    PWMOutputUpdateMode(PWM0_BASE, PWM_OUT_0_BIT, PWM_OUTPUT_MODE_NO_SYNC); //
    PWMGenPeriodSet(PWM0_BASE, PWM_GEN_0, 625);                             // 1KHz output (?)
    PWMPulseWidthSet(PWM0_BASE, PWM_OUT_0, 312);                            // 1KHz output (?)
    PWMGenEnable(PWM0_BASE, PWM_GEN_0);                                     //

The clock is 20MHz.

Thanks,

Doug