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.

TMS320F28375S: Period(TBPRD) value loading into CMPA/B registers of PWM

Part Number: TMS320F28375S


Hi team,

Please clarify me on the following:

1) I found this note mentioned in reference manual. But is this also applicable when given PRD value to CMPx with shadow to active load on TBCTR = PRD. 

Shadow to Active Load of Action Qualifier Output A/B Control Register [AQCTLA &
AQCTLB] on CMPA = 0 or CMPB = 0 boundary
If the Counter-Compare A Register (CMPA) or Counter-Compare B Register (CMPB) is set
to a value of 0 and the action qualifier action on AQCTLA and AQCTLB is configured to
occur in the same instant as a shadow to active load (that is, CMPA=0 and AQCTLA shadow
to active load on TBCTR=0 using AQCTL register LDAQAMODE and LDAQAMODE bits),
then both events enter contention and it is recommended to use a Non-Zero Counter-
Compare when using Shadow to Active Load of Action Qualifier Output A/B Control Register
on TBCTR = 0 boundary.

2) When PRD value is given to CMP, what does AQ consider CMP value as CAU or CAD (When CTRMODE configured in Up_Down mode).

3) When I configured AQCTLA to clear at Counter = PRD (i.e. EpwmxRegs.AQCTLA.bit.PRD = 1) during initialization, and if I have given PRD value to CMP

during run time for a certain time period, what would be the output?

  • Hi Shreni,

    1. This is also applicable when given PRD value to CMPx with shadow to active loading on TBCTR = PRD.

    2. When PRD value is given to CMP, AQ considers value as CAD. In up down mode, when TBCTR = period, the direction is DOWN.

    3. You should refer to this table for the priorities on the action qualifier: