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.

ACTION QUALIFIER PROBLEM..



I LOADED 

EPwm1Regs.TBPRD = 5000;
EPwm1Regs.CMPA.half.CMPA = 2500;
EPwm1Regs.CMPB = 2500;

EPwm1Regs.AQCTLA.bit.CAU= AQ_SET;

EPwm1Regs.AQCTLA.bit.PRD= AQ_CLEAR;

EPwm1Regs.AQCTLB.bit.CBU= AQ_SET;

EPwm1Regs.AQCTLB.bit.PRD= AQ_CLEAR;

THIS GIVES PWM ON PWM1A AND PWM1B

NOW I MAKE CHANGES AS BELOW,

EPwm1Regs.AQCTLA.bit.CAU= AQ_SET;

EPwm1Regs.AQCTLA.bit.PRD= AQ_CLEAR;

EPwm1Regs.AQCTLB.bit.CAU= AQ_SET;

EPwm1Regs.AQCTLB.bit.PRD= AQ_CLEAR;

THIS GIVE PWM ON PWM1A ,BUT PWM1B NOT GIVES OUTPUT.

  • Hi Nilesh,
    spruh18e.pdf, See Page No:274 about ACTION QUALIFIER Submodule and some example.
  • Dear sir,
    i seen ref. given by you, we can use compare event of CAU and CBU with any EPWM1A or EPWM1B to set/reset. as i written code is ok as per menual but EPWM1B does not set/reset pin.
  • Nilesh,

    I agree that your code should work.

    I would recommend putting the variable you changed (EPwm1Regs.AQCTLB.bit.CAU) into the expressions watch window and double-checking the AQCTLx registers are getting written as you expect once code is running.


    Thank you,
    Brett

  • Dear Brett,

    I put followng statemnet into expesion window and observed that pwm1A is showing pulses and pwm1B is off. both EPwm1Regs.CMPA.half.CMPA  and EPwm1Regs.CMPB has same value 45000 and EPwm1Regs.TBPRD is 50000

    EPwm1Regs.AQCTLA.bit.CAU  : value=2

    EPwm1Regs.AQCTLB.bit.CAU  :value=2

     

    EPwm1Regs.AQCTLA.bit.ZRO : value=1

    EPwm1Regs.AQCTLB.bit.ZRO : value=1

     

    keeping all condition same just changing AQCTLB with CBU   as  

     

  • Nilesh,
    compared value in the register bits [CMPA, CPMB] most be different and in between the period register value [TBPRD].
  • Dear Asim,
    CMPA AND CMPB BOTH is 45000 AND TBPRD is 50000 so always CAU AND CBA event happens.
    configuaration1 : EPwm1Regs.AQCTLB.bit.CAU =AQ_SET , EPwm1Regs.AQCTLB.bit.ZRO = AQ_RESET, PIN PWM1B IS NOT CHANGES ACCORDING TO SETTING.
    configuaration2 :EPwm1Regs.AQCTLB.bit.CBU =AQ_SET , EPwm1Regs.AQCTLB.bit.ZRO = AQ_RESET, PIN PWM1B START TO CHANGE AS PER SETTING.
  • Nilesh,
    spruh18e.pdf of chapter:-3 read it, gives you basic idea of TB,CC,AQ submodule.

    For AQCTLA register bit CAU,CAD, ZRO, PRD is possible and AQCTLB register bit CBU,CBD, ZRO, PRD.
    Its good for you, if you see and run all example present in the pdf chp:-3.
  • When PWM1B isn't outputting, I would recommend that you make sure that all other AQCTLA and AQCTLB register fields (other than the four you are using) are defined as 0 - do nothing. 

    (for instance:  if CMPA = CMPB = 45000 and CAU is set to force the PWM1B low and CBU is set to force the PWM1B high, the PWM1B's output may not be defined)

    I might also recommend experimenting with CMPA and CMPB as different values until you can explain the behavior that you are seeing.


    Thank you,
    Brett