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.

TMS320F28388D: Answer to question about EPWM_setADCTriggerEventCountInitValue() etc.

Part Number: TMS320F28388D

I had asked a question about why my usage of EPWM_setADCTriggerEventCountInitValue() failed. The answer turned out to be that one has to call EPWM_disableADCTriggerEventCountInit() ... otherwise the value keeps getting reloaded, meaning the count is never reached.

So, for my use case, this works:

        EPWM_enableADCTriggerEventCountInit(base, soc);
        EPWM_setADCTriggerEventCountInitValue(base, soc, initial_value);
        EPWM_forceADCTriggerEventCountInit(base, soc);
        EPWM_disableADCTriggerEventCountInit( base, soc);