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.

PWM module vs PWM with general Timer

Other Parts Discussed in Thread: LM339

So now that i got the PWM module to work it raised me a question,

What are the advantages? Besides not using a generic timer that can be used for other fuctions.

And will it work better at high frequency? I have a problem that i need a high PWM signal, it's stops being a square wave even when i raise the GPIO current, it just needs to be a square wave with half duty, always. I use it for a serial comunication CLK. Does the PWM module alow more current?

  • Hello Luis,

    The PWM Module is geared for PWM operations than a timer in the following manner

    1. Able to generate Deadband when PWM Pair is required

    2. Able to sense a fault at speed through GPIO or ADC Digital Comparator and stop PWM output or freeze it

    3. Able to synchronize multiple PWM Generators when a Synchronous PWM operation is required

    Regards

    Amit

  • Thanks as always for the quick and concise response

  • Amit Ashara said:
    Able to sense a fault at speed through GPIO or ADC Digital Comparator

    Amit's correct in listing those 2 as, "Fault triggers."

    Yet - the presence of digital pin, "PWM Fault Input" enables many more such, "Fault triggers."  And - some may even result from components "foreign" to the MCU.  (i.e. analog comparator (LM339/393 etc.)

    Indeed that PWM Fault Input enables the immediate "shut down" of multiple PWM Generators - potentially protecting your load, your power drivers, power supply and MCU board from destruction.  And - as a "fringe benefit" once the SW configs/sets-up your PWM Fault Scheme - that protection runs w/out SW intervention - it's very close to 100% HW protection - saving you even when SW, "runs amuck!"

    As Amit stated - Timer based PWM is often of value - yet the best/brightest PWM operation springs from the PWM Generators and their full implementation...