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.

TMS320F28379S: Achieving pwm signal fixed delay using CLB in TMS320F28379S controller

Part Number: TMS320F28379S

Tool/software:

  • Hi,

I am trying to implement a fixed delay on PWM3A signal using CLB in TMS320F28379S controller. I have verified my .syscfg settings through simulation(GTKWave tool).

I am not able to achieve this delay in hardware while observing in scope. Following are my lines of clb_logic.c(PWM initialised separately).

CLB_enable(CLB3_BASE);
initTILE3(CLB3_BASE);
CLB_configLocalInputMux(CLB3_BASE, CLB_IN0, CLB_LOCAL_IN_MUX_GLOBAL_IN);
CLB_configGlobalInputMux(CLB3_BASE, CLB_IN0, CLB_GLOBAL_IN_MUX_EPWM3A_OE);
CLB_configGPInputMux(CLB3_BASE, CLB_IN0, CLB_GP_IN_MUX_EXTERNAL);
CLB_setOutputMask(CLB3_BASE, 0x02, true);

Is there anything I am overlooking?

Thanks,

Shreni

  • Hi Shreni,

    I would recommend changing your input from CLB_GLOBAL_IN_MUX_EPWM3A_OE which is the trip output of the EPMW to CLB_GLOBAL_IN_MUX_EPWM3A which is the actual EPWM signal itself. 

    I would also recommend that you double check that your output mask is the correct value to route the signal to the desired output pin. 

    Kind regards,
    AJ Favela 

  • Hi Favela,

    Thanks for your response. After changing to CLB_GLOBAL_IN_MUX_EPWM3A, achieved delay in the rising edge but not in falling edge of the input signal.

    May I know where exactly is the CLB output manipulating the actual PWM signal. Is it somewhere at GPIO MUX BLOCK after Trip_Zone module

    Thanks,
    Shreni

  • Hi Favela,

    Achieved falling edge delay after changing output mask as well to EPWM3A instead of EPWM3A_OE. 

    Thanks,

    Shreni

  • Hi Shreni,

    I'm glad this has solved your issue Slight smile. I will go ahead and close this thread now. 

    Kind regards,

    AJ Favela