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.

TMS320F28379D: How to generate square wave signals from ePWM modules

Part Number: TMS320F28379D
Other Parts Discussed in Thread: C2000WARE

Dear all,

What is the function of register PCLKCR0 and PCLKCR1 in CPU_SYS_REGS Registers?

How can I configure clocks and generate squarewave signals at 85kHz from ePWM modules? Please help me.

I am a newbie with C2000 MCU and embedded systems. Any help will be very appreciated.

Thanks a lot!

  • Hi Van,

    Welcome to the C2000 Forum!

    VAN NGUYEN said:
    What is the function of register PCLKCR0 and PCLKCR1 in CPU_SYS_REGS Registers?

    The PCLKCR0 and PCLKCR1 are part of a series of registers that control the peripheral clocks going to the modules described within those registers. For example bit 3 of PCLKCR0 is for CPUTimer0. Both CPU1 and CPU2 each have a timer 0 module. If this bit is set then the module clock is turned-on, if it is not set then the module clock is off. This is a configurable option on each CPU.

    VAN NGUYEN said:
    How can I configure clocks and generate squarewave signals at 85kHz from ePWM modules?

    I would suggest starting off with an example and going from there. Our software platform, C2000Ware, has examples for the epwm module for the F28379D device. These examples are in a bit-field format and in driverlib (path to both sets of examples are below, which you decide to go with is personal preference). 

    C:\ti\c2000\C2000Ware_version\device_support\f2837xd\examples\cpu1

    C:\ti\c2000\C2000Ware_version\driverlib\f2837xd\examples\cpu1\epwm

    The frequency your output signals are configured to will depend on your count mode. I would suggest looking at the Time-Base (TB) submodule section of the technical reference module (TRM) for more information on this.

    If your new to C2000, I would also suggest taking a look at the C2000 F2837xD Microcontroller Workshop 

    Best Regards,

    Marlyn

  • Dear Marlyn,

    Thank you very much for your help.

    Regards,