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.

LAUNCHXL-F28379D: Using CLA to software set/reset the action qualiifer of the EPWM module

Part Number: LAUNCHXL-F28379D


Hi,

I'm implementing a hysteresis controller (bang-bang controller) using CLA and ADC sampling of the sensed signal (on which the regulation is required). I was using GPIO toggle in the CLA task to gate signals for driving the mosfets, but I figured I also need deadtime in my gating signals.

Therefore now I'm thinking of moving to EPWM module instead. Following are my concerns -

  1. Is it possible to software trigger the AQ module periodically and then use the deadband module to generate the final PWM output signal with the necessary deadbands.
  2. I want this periodic triggering to have no connection with the PWM time base register i.e., the switching frequency should only depend on the hysteresis levels I choose to compare with, inside my CLA task.
  3. And I want to call this function for software triggering of EPWM AQ inside the CLA task itself.

Can anyone clarify if the above is possible and how?

Thanks in advance Slight smile

  • Hi Anurag,

    Yes, it is possible to software trigger the AQ module. After AQ is triggered in software, the signal goes to the deadband module where you should add necessary deadband for the output. If you use a software-forced AQ, this will be asynchronous (i.e. no connection to the timebase, as you described). And yes, you can accomplish this inside your CLA task. The CLA has access to the EPWM registers the same as C28x, so the CLA can perform the EPWM AQ software force as well. To trigger the AQ module by software, you will need to utilize the AQSFRC register (please see the device TRM for the details on settings). I will consult a CLA expert to confirm that deadband is still applied through this signal path as well but will follow up with you later today or Monday as soon as I hear back. Please let me know if you have further questions in the mean time.

    Regards,

    Allison

  • I believe these two fields will be used for the software force of output A, is this correct?

    I have seen two settings one-time software force and the other is continuous software force. Can you clarify the difference?

    Also please let me know about the deadtime considerations like you mentioned.

  • Hi Anurag,

    Yes, you are correct that those two fields of the AQSFRC register will be used to software-force an Action Qualifier on output A of the EPWM signal.

    In terms of the difference between the one-time and continuous: The one-time software force means that when you trigger the AQ via software by writing a '1' to the OTSFA, the output will perform the action specified in ACTSFA a single time and will be cleared automatically after the action takes places on the output signal. Since it auto-clears, the action lasts for one cycle and then resumes normal AQ activity. Contrastingly, a continuous software force means that the action specified in AQCSFRC register fields is output on the PWM signal without ceasing (i.e. 'continuously') until that bit is cleared or overridden by another submodule's actions.

    Also, I have confirmed that deadband should still apply to your output through this implementation.

    Hope this helps, and please let me know if you have other questions about any of this.

    Regards,

    Allison

  • The actions lasts for one cycle - this means that I can't use this as the gating signal for my project right? Because I'm setting and re-setting it based on a condition inside the CLA task and I want the EPWM to stay that way (either sset or clear) until I reevaluate this condition and change the state of the EPWM explicitly.

  • If you are wanting the EPWM to stay in that state, you could use the continuous AQ SW force. That way you can clear the AQCSFRC upon evaluating the condition to change the EPWM output state as desired.