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.

Employing the MCU's PWM Generator to achieve dual, independent outputs or "complementary" outputs...

Guru 47900 points

Many have asked here for clarification (nitty-gritty) of the MCU's PWM Generators.   While this vendor's MCU manual & Peripheral User Guide are intensive - they do not fully/completely guide prospective users.   Firm/I do not offer "cookbook" style code - illustrated here are several key (yet not all) capabilities of a single, PWM Generator w/in TM4C MCU series.

Dual Outputs of a PWM Generator - identical frequency yet fully independent Duty Cycle.

Switching from "independent" to "complementary" outputs via, "PWMDeadBandEnable()" function w/ parameter values zero'ed.

Note that (ONLY) the addition of "PWMDeadBandEnable()" caused the switch from "independent PWM Output to Complementary!"

         And now Complementary Outputs w/Dead-band parameters set to 200.

Notably - at least by firm's/my read - vendor's manual does not explicitly list, "How to invoke Complementary" PWM Outputs.   Such is here (now) revealed...

Vendor may wish to add - at some point,  "Use of "PWMDeadBandEnable()" function yields the complementary PWM Output (defined by PWM_A) via PWM_B."   As outsider - such suggestions are (most always) "duly noted" yet rarely (i.e. never) survive into vendor's "official" note...   (and vendor's "round file" (surely) over-flows w/such "NIH" suggestions...)

  • So deadband does actually work.

    Nice summary BTW.

    Robert
  • Thank you, Sir - thank you very much.

    Some way/how it was claimed that falling edge (under dead-band) was difficult to view. (i.e. required "video" pause - you/I knew that such was "unlikely" - scope caps here confirm.)
  • Nice post, CB. I appreciate the time, thought, and effort that went into it.
  • And thank you too, Sir - both for your "post's approval" & for the on-going assistance you provide so many, here...
  • To those who have (via PM) requested (yet further) detail - please stand by. We'll summarize the various requests & present those in highest demand - as/if (real work) demands relent...

    Thanks for your votes of approval...   (>200 hits/views w/in first 24 hours - for a, "Non-Sticky" - indicates that we might have, "hit a nerve.")