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.

RTOS/TM4C1292NCPDT: PWM genartion without processor intervention

Part Number: TM4C1292NCPDT

Tool/software: TI-RTOS

HI 

Is it possible to generate PWM on GPIO without CPU intervention? i want to generate PWM @100KHz speed. 

i looked at the example project "pwmled_EK_TM4C1294XL_TI_TivaTM4C1294NCPDT" and but its using CPU intervention to toggle the LED.

can anybody help me on this?

Regards

Bala

  • I'm not clear what you meant? I don't think the example is using the CPU to toggle the LED. The CPU merely changes the duty cycle of the PWM. It is the PWM module that carries out the PWM generation according to the specified period and duty.
  • Greetings Charles,

    Indeed - you are correct - and perhaps (even) easier -

    "an MCU Timer" may be quickly/easily - forced into PWM mode - and then outputs PWM (forever) - only requiring MCU attention to:

    • alter the duty cycle
    • or halt/restart PWM...

    Could anything be "Less demanding upon the MCU?"       (even µDMA requires MCU intervention to alter the duty cycle)

  • Hi cb1,
    Yes, TMR could have been easier. It is the TI-RTOS example uses the PWM module instead of the TMR to toggle the LED.
  • Charles Tsai said:
    ... TMR could have been easier. It is the TI-RTOS example uses the PWM module instead of the TMR to toggle the LED.

    Yes - as well noted - vendor's (proven) aversion to "KISS" leads to, "Less than the "fastest, simplest, most resource conserving methods" - as proven (again) here...

    Both methods: the more demanding set-up/config. of a PWM Generator ... or ... faster/easier config of TMR - satisfy poster's desire for "processor free" PWM Output.

    It should be noted that poster reports "CPU intervention" when "toggling the Led" - yet such "toggling" is, "Outside the (usual) "role" of PWM!"

  • Thank You Charles. Now i have validated the PWM generation without CPU intervention.

    Bala
  • (cb1 quietly, once more, cocks - raises pistol to, "head level...")       No MCU intervention needed - poster intervention would reveal (some) care/class...