Part Number: TMS320F280049
C2000 Team,
I'm messing around with the EPWM and maybe I'm just not looking in the right place, but I'm finding the documentation on the EPWMCLK to be a little lacking. I've found a forum answer from Vivek S that appears to indicate the clock divider has been undocumented. However, I'm seeing mentions of a user configurable divider in the driverlib:
//*****************************************************************************
//
//! Set the time base clock and the high speed time base clock count pre-scaler
//!
//! \param base is the base address of the EPWM module.
//! \param prescaler is the time base count pre scale value.
//! \param highSpeedPrescaler is the high speed time base count pre scale
//! value.
//!
//! This function sets the pre scaler(divider)value for the time base clock
//! counter and the high speed time base clock counter.
//! Valid values for pre-scaler and highSpeedPrescaler are EPWM_CLOCK_DIVIDER_X,
//! where X is 1,2,4,8,16, 32,64 or 128.
//! The actual numerical values for these macros represent values 0,1...7.
//! The equation for the output clock is:
//! TBCLK = EPWMCLK/(highSpeedPrescaler * pre-scaler)
//!
//! \b Note: EPWMCLK is a scaled version of SYSCLK. At reset EPWMCLK is half
//! SYSCLK.
//!
//! \return None.
//
//*****************************************************************************
static inline void
EPWM_setClockPrescaler(uint32_t base, EPWM_ClockDivider prescaler,
EPWM_HSClockDivider highSpeedPrescaler)
Based on the above two sources of information, this would lead me to believe that EPWMCLK is always SYSCLK/2. Is that correct? If so, it sure would be nice if that was documented in the DS or TRM. I've searched through both documents for EPWMCLK and no where is this "fixed" divider called out.
Also further down in the HRPWM sections there are some tables that include information that is only valid for EPWMCLK of 100MHz. Assuming my hypothesis that EPWMCLK is always SYSCLK/2 is correct, these tables should be updated to reflect the maximum EPWMCLK frequency of 50MHz for this device.
Best,
Trey
