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.

TMS320F28375D: The matter that toggle may occur at an unexpected timing in ePWM

Guru 14850 points

Part Number: TMS320F28375D

Hi,

I have a question about the ePWM module of the TMS320F28375D.

CLA is started by an interrupt using XINT, and the processing to update CMPA, CMPB, AQCTLA, TBPRD of PWM is performed.

The read setting value is updated by CTR = ZRO using the shadow register.

CLA reads externally calculated values using EMIF.

Currently, the following unexpected behavior is occurring. Even though CAU is set to Low and CBD is set to Toggle, PRD may cause Toggle.

I checked it with an oscilloscope and judged it to be a PRD because it is toggled around the middle of the cycle. As long as the CCS is monitoring the AQCTLA registers, the PRD has no value.

If you have any advice, please let me know.

Thanks,

  • Hi,

    There is an update.

    Q1. When I changed the LOAD MODE of CMPCTL from 2 (load on CTR = 0 or CTR = PRD) to 0 (CTR = 0), the phenomenon disappeared.

    The up / down counter mode is used, and it was set by referring to "15.14.1.5.4.1 High-Resolution Period Configuration" of TRM.

    In this description, I read that it should be set to 2 in the up / down counter mode, but is it okay to set it to 0?

     

    Q2. If LOADMODE should be 2, will both CTR = 0 and CTR = PRD update from the shadow register?
    Also, in that case, will either of the read values be valid?

     Example) Up / down counter mode, LOADMODE = 2, PRD = 100
     ① Update the CMPB shadow register to 70 before CTR = 0
     ② Update the CMPB shadow register to 80 while 0 <CTR <PRD
     At this time, can a compare match occur with either CTR = 70 or 80?

    Thanks,

  • Hi Koki,

    In this description, I read that it should be set to 2 in the up / down counter mode, but is it okay to set it to 0?

    Are you using high resolution pwm or just epwm?

    Q2. If LOADMODE should be 2, will both CTR = 0 and CTR = PRD update from the shadow register?
    Also, in that case, will either of the read values be valid?

    When a loadmode of 2 is used that means that whenever the timebase counter is equal to zero or period the latest value written to the shadow register of CMPA and CMPB will be transferred over to the active register. 

    PRD may cause Toggle

    This may be due to conflicting actions of the CMPA/CMPB and PRD. Are you storing the values of CMPA/CMPB and PRD?

    Best Regards,

    Marlyn