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 Software Force Register problem

Other Parts Discussed in Thread: CONTROLSUITE

Hi!

I used F28035

I want software force way to control PWM action.

I had looked Datasheet and example cord but there are not say clearly. 

I don't know how to setting it ?

Can anyone help me?

thanks

  • Hi,

    Can you more clear/ explain further on:

    I want software force way to control PWM action.

    Is it that you want an algorithm dependent  variable to alter the AQCTLA register?

    Regards,

    Gautam

  • I want AQSFRC register to make wareform.

    How to setting it?

     

  • Chi,

    The behavior when using software force is determined by the registers AQSFRC and AQCSRFC, 

    First you need to determine if you want the affect of the software force happen immediately or after PWM period match or zero match, dependent on this set the PWM register bit AQSFRC.bit.RLDCSF. In the below line it is set to immediately change the PWM output. 

       EPwm1Regs.AQSFRC.bit.RLDCSF=3;

    Next you need to decide if you want a continuous force or a one time force on the PWM output, a one time software force can be overridden by the configuration in the other action qualifier register i.e. after doing a one time force the PWM is put to low, but if a CMPA event is configured to make it high and the event occurs the PWM output will change. If this type of behavior is desired write appropriate bits to AQSRFC.bit.ACTSFA to describe what happens when the force is invoked and AQSRFC.bit.OTSFA to initiate the software force. There is no need to clear this software force.

    If a continuous force is desired you can write to AQCSRFC.bit.CSFA or CSFB the appropriate values, to disable this action you will need to write the appropriate value to the bits. 

     

  • Hi,

    Using the AQSFRC bits to generate a software controlled PWM signal seems like a lot of work.

    I would recommend just toggling a standard GPIO if you just want to generate a software controlled PWM signal.  This would be much more straightforward.

    Alternatively, you could use the AQCSFRC (continuous force) bits if you really want to use the PWM module as Manish describes above.


    Thank you,
    Brett

  • Hi,

    I'm working into my final tesis and I'm using the DSP 28335. I loaded  HVACI_Sensorless project and I need to make a last protection. I want to force low the PWM signals and keep that until I set down a flag. To do this, I have to write these lines:

    EPwm1Regs.AQCSFRC.bit.CSFA=1;
    EPwm1Regs.AQCSFRC.bit.CSFB=1;

    EPwm2Regs.AQCSFRC.bit.CSFA=1;
    EPwm2Regs.AQCSFRC.bit.CSFB=1;

    EPwm3Regs.AQCSFRC.bit.CSFA=1;
    EPwm3Regs.AQCSFRC.bit.CSFB=1;

    But, I don't understand how can I trigger the protection. And the last question is: how can I go back and let the program continue?

    Thanks! And sorry for my english.

    Fernando

  • Hey Fernando,

    You may want to look into using the TripZone SubModule to get your desired effect. Take a quick look at the documentation for the SubModule here.

    There's an example that uses the TripZone that can be found in controlSUITE at the following location: controlSUITE\device_support\f2833x\v133\DSP2823x_examples_ccsv4\epwm_trip_zone

    As a quick overview, you can use the submodule to force an ePWM signal high or low. This is done by setting the TZCTL bits. The controlSUITE example does the following:

       EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_HI;
        EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_LO;

        EPwm2Regs.TZCTL.bit.TZA = TZ_FORCE_HI;
        EPwm2Regs.TZCTL.bit.TZB = TZ_FORCE_LO;

    This sets ePWM1A and ePWM2A high and ePWM1Band ePWM2B low when tripped. This specific example trips when either TZ1 or TZ2 are pulled low. 

    Also, there are two methods of tripping. One-Shot-Trip and Cycle-By-Cycle-Trip. A One-Shot-Trip will simply trip once and keep the desired trip result. A Cycle-By-Cycle trip will check to make sure the trip source (TZ1 or TZ2) is in the tripped state and maintain the desired trip result until the trip source is returned to it's normal state. In the controlSUTIE example, ePWM is configured as a One-Shot-Trip and ePWM2 is configured as a Cycle-By-Cycle-Trip so you can see how both function. For your use case, you may want to use the Cycle-By-Cycle-Trip method.

    Let me know if you need any other clarifications!

    Regards,

    Zain