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.

HELP, how can I generate long PWM periods?

Other Parts Discussed in Thread: TMS320C6748

I'm using the eHRPWM module on a TMS320C6748.

The problem is that I want to generate a PWM output on EPWM0A with a period time up to 60 seconds.

The input clock to the eHRPWM module is 150MHz. I can't divide it enough with TBCTL[HSPCLKDIV] and TBCTL[CLKDIV].I would need TBCLK to bee as low as about 1.1kHz..

How can I solve this problem?

 

  • Marko,

    What signal or waveform do you want to generate?

    The eHRPWM is an Enhanced High-Resolution PWM generator, and I doubt you want the narrow resolution if offers for a 60 second waveforum.

    My thought is that you will generate your waveform manually using a 64-bit timer module or two, and maybe a GPIO. But that all depends on what you want to do.

    Regards,
    RandyP

  • I need to generate a frequency from 0.0167Hz up to 1.7kHz PWM.

    I could switch over to GPIO when the period becomes to long but I'm seeking a simpler way.

     

  • Not being an expert on PWMs I say this humbly, but "a frequency from 0.0167Hz up to 1.7kHz PWM" does not sound like a description of a PWM but of a square-wave frequency generator.

    Whether there is more detail to your signal or not, at these low frequencies the 64-bit timer is the right thing to use, in my opinion. Depending on the details, you might want to use two timers, you might want to toggle a GPIO in an interrupt service routine or using EDMA writes to the GPIO, or you may just use the timer output.

    Regards,
    RandyP