Part Number: TMS320F2800157-Q1
Other Parts Discussed in Thread: C2000WARE
Tool/software:
missing info in "f280015x_epwm_defines.h" file of device support.
Divide info (by 8, 16, 32, etc) is missed in "f280015x_epwm_defines.h"
//
// HSPCLKDIV and CLKDIV bits
//
#define TB_DIV1 0x0
#define TB_DIV2 0x1
#define TB_DIV4 0x2
Please consider to correct them in future c2000ware release.
Compare with "epwm.h" from driverlib:
//*****************************************************************************
//
//! Values that can be passed to EPWM_setClockPrescaler() as the
//! \e prescaler parameter.
//
//*****************************************************************************
typedef enum
{
EPWM_CLOCK_DIVIDER_1 = 0, //!< Divide clock by 1
EPWM_CLOCK_DIVIDER_2 = 1, //!< Divide clock by 2
EPWM_CLOCK_DIVIDER_4 = 2, //!< Divide clock by 4
EPWM_CLOCK_DIVIDER_8 = 3, //!< Divide clock by 8
EPWM_CLOCK_DIVIDER_16 = 4, //!< Divide clock by 16
EPWM_CLOCK_DIVIDER_32 = 5, //!< Divide clock by 32
EPWM_CLOCK_DIVIDER_64 = 6, //!< Divide clock by 64
EPWM_CLOCK_DIVIDER_128 = 7 //!< Divide clock by 128
} EPWM_ClockDivider;
//*****************************************************************************
//
//! Values that can be passed to EPWM_setClockPrescaler() as the
//! \e highSpeedPrescaler parameter.
//
//*****************************************************************************
typedef enum
{
EPWM_HSCLOCK_DIVIDER_1 = 0, //!< Divide clock by 1
EPWM_HSCLOCK_DIVIDER_2 = 1, //!< Divide clock by 2
EPWM_HSCLOCK_DIVIDER_4 = 2, //!< Divide clock by 4
EPWM_HSCLOCK_DIVIDER_6 = 3, //!< Divide clock by 6
EPWM_HSCLOCK_DIVIDER_8 = 4, //!< Divide clock by 8
EPWM_HSCLOCK_DIVIDER_10 = 5, //!< Divide clock by 10
EPWM_HSCLOCK_DIVIDER_12 = 6, //!< Divide clock by 12
EPWM_HSCLOCK_DIVIDER_14 = 7 //!< Divide clock by 14
} EPWM_HSClockDivider;