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.

TMS320F28069M: Does the capture-compare submodule (ePWM module) generate signals on CTR = ZERO and CTR = PRD?

Part Number: TMS320F28069M

Tool/software:

Greetings

I was studying the ePWM module and I see that wave-shaping is done by the action-qualifier module based on compare events. However, I am a little confused regarding the origin of these compare-events. The TRM says that the CC module generates two outputs, based on CMPA or CMPB match:

But it also mentions that ZERO and PRD matches are also given by the CC, in a table, given soon after the above text:

In a particular diagram however, it says that CTR = 0 and CTR = PRD signals are directly fed to the AQ from the time-base submodule:

And in a certain other diagram, only the CC is connected with the AQ:

Please shed some light on this. Where is the AQ getting it's compare-event inputs, or is there some comparison-mechanism in-built the AQ, to take care of TBCTR = ZERO and TBCTR = PRD events?

Thanks
Best Regads

  • Hello,

    To answer your question specifically, the time-base submodule generates the period and zero match event strobes while the counter compare submodule generates the CMPx match event strobes. That being said, the time-base submodule (1) routes the time-base counter into the counter compare submodule to use as comparison against the CMPx values and (2) the counter compare submodule also uses the CTR = 0 and CTR = TBPRD match event strobes as well for other uses such as shadow loading events. 

    But in general, please note that the TRM diagrams are high-level diagrams meant to provide an overview of the PWM. All inputs into the action qualifier submodule are simply PWM event strobes (just pulses from PWM logic signaling that a specific event is occurring, such as a Counter = CMPA match event or a Counter = 0 match event etc.). The events are sourced from values that the user has programmed in both the time-base and counter compare submodules (e.g. TBPRD value, CMPA value, etc). And the counter of the time-base submodule is fed to the counter compare module to be used to compare the counter value to the compare values. 

    Regardless of the origin of a PWM event, all event signals are routed into the action qualifier submodule which can determine what action should be taken on a PWM channel and carry it out based on the source of the event. We often list the CTR = 0 and CTR = PRD match events are listed with CTR = CMPA/B match events when being described in the TRM since both come from the same internal comparison logic (even though in separate PWM submodules) and these are all key event options used to generate your PWM waveform. Slight smile

    Best Regards.

    Allison

  • Hi,
    Thank you for the detailed answer, I'll just quickly summarize in my own words to see if I am getting this right.

    1. The CC submodule is responsible only for the CMPx match event strobes.
    2. The Time-Base submodule generates the PRD and ZERO match event strobes.
    3. The PRD and ZERO match event strobes are passed on to both
      1. the CC submodule (for it's loading events)
      2. and the AQ submodule, for the waveshaping
    4. And for apparent reasons, the CC submodule also receives the counter from the time-base submodule

    The comparison logic, even though the same, is implemented twice over in the two different submodules.

    So this diagram is not incorrect then, as it doesn't represent the blocks as submodules, and goes below that abstraction. Here, the compare-logic block does deal with all the 4 comparisons, but at the submodule/hardware level, the CC submodule deals with CMPx comparisons and TB submodule takes care of the ZERO and PRD comparisons.

    I hope I have gotten it down correctly!
    Again, thank you for the really detailed answer

  • Hello,

    Thank you for the organized follow-up. Yes, your understanding is correct! Hope this clears up any confusion you had- if so, you can mark your post or my post as the resolution. And feel free to create another post should you run into further questions!

    Best Regards,

    Allison