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.

TMDS243GPEVM: TMDS243GPEVM: synchronize EPWM3 to EPWM2

Part Number: TMDS243GPEVM


Hello,

I have just started to play with TMDS243GPEVM evaluation module. I'm trying to evaluate the EPWM capabilities of the AM243x.

I have started with the epwm_duty_cycle example that came with mcu_plus_sdk_am243x_08_01_00_36 and have managed to generate PWM signals on outputs connected to EPWM0 ... EPWM3.

Now I wish to synchronize the counters of EPWM2 and EPWM3. According to Figure 12-2215 from spruim2c.pdf

I need to change some bits CTRL_MMR0 in order to MUX EPWM2SYNCO to EPWM3SYNCI. What is the preferred way to achieve that? Is there an SDK function for that purpose?

Best regards,

Johannes

  • Hi Johannes,

    A time-base synchronization scheme connects all of the ePWM modules on a device. Each ePWM module has a synchronization input (SYNCI) and a synchronization output (SYNCO). The input synchronization for the first instance (ePWM1) comes from an external pin. The 3rd and 6th instances have more options to get sync signals from previous ePWM module or from external pin or other internal modules. Each ePWM module can be configured to use or ignore the synchronization input. As you mentioned, it is configurable through CTRL_MMR0 register for ePWM3 to select SYNCO from ePWM2. 

    I will check if there is API in SDK later.

  • Hi Johannes,

    I don't notice that there is a specific API for configuring the CTRL_MMR0 registers. 

  • My current solution is:

    #define CTRLMMR_EPWM3_CTRL ((volatile uint32_t *) 0x4300414c)

    *CTRLIMMR_EPWM3_CTRL |= 0x00000100; // route EPWM2SYNCO to EPWM3SYNCI

    Is this solution recommended by TI?

    I had hoped at least for the #define to be provided by TI in a file but I could not find one. Are there other locations of include files for the AM243x besides the directories under mcu_plus_sdk...?