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.

TMS320F28033: When TBPHS load value is less than CMPA value the below figure, will the AQ action be lost?

Part Number: TMS320F28033

Hi Experts,

I am asking for my customer.

Here are EPWM1 (Master) and EPWM4 (Slave) both up-down count mode, AQ set as High when CTR = PRD, AQ set as Low when CTR = CAD as below figure. 

The EPWM4 sync to EPWM1, when EPWMRes.CNT = Zero generate the sync signal, and the TBPHS of EPWM4 would immediately load.

For example, CMPA match value is 100, current count status EPWM4's CTR = 120, and due to phase load if the counter jumps to say 80 then compare event is missed as showed the below figure. So, could it happen? 

If yes, we should check the timing of phase load and counter status w.r.t compare values, right? Ang good suggestion here? Thanks~

  • Hi Shaoxing,

    So, could it happen? 

    If yes, we should check the timing of phase load and counter status w.r.t compare values, right? Ang good suggestion here?

    Yes, this can happen. As you stated yourself, this would have to be a check that you implement with software. We don't have any kind of hardware mechanisms that would check for this condition. Basically if the phase value is calculated to be below the compare value then you want to change the compare value to be TBPHS-1 (since you are interested in the comparator A down count match) only for the next cycle. After that you can switch CMPA value back to the normal value. This is just so that when the phase is changed, you don't end up missing the action tied to the comparator event. 

    Best Regards,

    Marlyn 

  • Hi Marlyn,

    Very thanks for your confirmed info here, and kindly help here~