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.

TMS320F280039C: It seems EPWM clock is not disabled first when setting EPWM registers on SYSCONFIG?

Part Number: TMS320F280039C
Other Parts Discussed in Thread: SYSCONFIG, C2000WARE

Dear Champs,

I am asking this for our customer.

They use the latest SYSCONFIG GUI (c2000ware V4.01) for EPWM setting including syncing in phase (i.e. EPWM1/2/3 are in phase).

It seems Sysconfig does not disable EPWM clock first when the user tries to sync EPWM in phase.

That is, after we manually added below two lines in yellow, then EPWMs were synced in phase as desired.

But by default, the GUI does not add these two lines in the board.c.

// Initialize PWM
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); // Disable sync(Freeze clock to PWM as well)
board_init();
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); // Enable sync and clock to PWM

Therefore,

We suggest that SYSCONFIG have below codes in board.c.

// Initialize PWM
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); // Disable sync(Freeze clock to PWM as well)
EPWM_init();
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC); // Enable sync and clock to PWM

Would you please help clarify if this is a bug or if we miss anything in the GUI?

Wayne Huang

  • Wayne, you are correct. I was planning on leaving the sysctl calls outside of sysconfig and the user would place them around BOARD_init.

    I will file this so we can see what's the best way to assess it.

    It is certainly not a bug as we planned the user to place them around board_init.

    That would give the user the option to enable the clock whenever. Maybe even after further initialization in the main.c long after board_init.

    What do you think? Think about a GENERAL purpose use of the tool. When the user doesnt want to enable it just after EPWM initialization but after the whole application initalization.

    Nima

  • Dear Nima,

    As we discussed offline, we may consider adding a checkbox for the user to decide to enable it in sysconfig or do it themselves later in the application.

    Thank you.

    Wayne Huang