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.

TMS320F280039C: Routinely update ADC SOC event trigger points with epwm configuration

Part Number: TMS320F280039C

Hi Champ,

I am asking for my customer, checking on the epwm configuration (in up-down mode) to trigger ADC SOC event timing. 

My customer wants to routinely update the ADC SOC event trigger timing with CMPC for EPWM_SOC_A  and CMPD for EPWM_SOC_B, and calculate the new value for CMPC and CMPD every time in a control loop. 

Checking with the configuration with the expert, we are thinking to configure the function of 

EPWM_setADCTriggerSource(EPWMx_BASE, EPWM_SOC_A, EPWM_SOC_TBCTR_U_CMPC) &

EPWM_setADCTriggerSource(EPWMx_BASE, EPWM_SOC_B, EPWM_SOC_TBCTR_U_CMPD) &

Besides, using the simultaneous write for both CMPC and CMPD at the same time, and global load when CTR=ZERO, to accomplish varied ADC SOC event trigger points with CMPC and CMPD separately. 

Is there any configuration that we are missing or we need to think about any scenario to add more code here ?

Thanks and regards,

Johnny

  • Hi Johnny,

    You are wanting to trigger ADC SOC event using CMPC and CMPD and changing compare values but make sure that compare values are updated in time for required soc trigger event.

    Make sure you are aware of the options available for SOC event triggers: 

    So that you account for the direction of counter and it dependencies on CMPA and CMPB values also, there is no single option to trigger just based on CMPC or CMPD

    Thanks,
    Prarthan