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.

TMS320F2800137: Changing AQ of EPWM during runtime

Part Number: TMS320F2800137

Hi,

I'm working on EPWM module both A,B outputs (according to AQ related to CMPA, CMPB values)
I'm operating with TMS..137 MCU to operate DC/DC Buck converter, and when im detecting during run time that Buck is operate on DCM/CCM then I need to change EPWM accordingly, the change effect AQ conditions (cause on DCM we have 3 switching states, while on CCM we have only 2)
Now when I'm changing AQ I got glitch cause CMPA CMPB is related to the other mode, how can I make this transition smoothly? 
what are the correct set of actions need to do to change AQ during run time?


Thanks!
Michael

  • Hi Michael,

    How would you like to change the action qualifier events ?

    For example when you change from DCM to CCM. Would you like to change your Action qualifiers ? Would you like to change the compare values ?
    You could use shadow loading of CMPA,CMPB and ACQTLA, ACQTLB registers as well, load at counter zero of next cycle and that should help in smooth transition.

    Thanks!

  • Hi Prathan,

    Yes, actually my process is like that:
    Freeze shadow mode of CMPA,CMPB, ACQA,ACQB and DeadBand control shadow--> Changing values for all of them(according to DCM/CCM) --> unfreeze al shadow modes and then all changes happens
    When I'm changing dead band configuration (from active high to dual edge) on the second step, the change is happened immediately although dead band is on freeze.
    Hope I clarify my problem,
    Any ideas?

    Thanks,
    Michael

  • Freeze shadow mode of CMPA,CMPB, ACQA,ACQB and DeadBand control shadow--> Changing values for all of them(according to DCM/CCM) --> unfreeze al shadow modes and then all changes happens

    What do you mean by freeze shadow mode ? Do you jump in and out of shadow load and immediate load modes ?
    If so that isn't what you should be doing, you should always be in shadow load mode from initialization and update values in shadow registers load to active registers on shadow load event.

    When I'm changing dead band configuration (from active high to dual edge) on the second step, the change is happened immediately although dead band is on freeze.

    What do you mean by deadband is on freeze ? 
    Deadband mode in DBCTL can also be shadow load controlled, put everything in shadow load mode and load at the same event in next cycle

    Thanks!