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.

CCS/LMG5200EVM-02: LMG5200EVM-02 PWM Input

Part Number: LMG5200EVM-02
Other Parts Discussed in Thread: LMG5200, C2000WARE

Tool/software: Code Composer Studio

Hello,

currently I'm using the LMG5200EVM-02. I want to create a PWM Signal and I'm using following code:

volatile unsigned long timelimit = 200;

int main(void)
{
    InitSysCtrl();

    EALLOW;
    GpioCtrlRegs.GPADIR.bit.GPIO0 = 1;
    GpioCtrlRegs.GPAMUX1.bit.GPIO0 = 1;
    EDIS;

    epwm1_init(400);


    while(1)
    {
        EPWM1_CMPA = timelimit;
    }

    return 1;
}


The LMG5200EVM-02 needs a 100 kHz to 5 MHz PWM Signal. I want a 100 kHz PWM Signal, but I don't understand which value should I set in the function epwm1_init(...) to get 100 kHz?

Many thanks in advance!