Other Parts Discussed in Thread: C2000WARE
Hi experts,
My customer used the HRPWM demo of C2000Ware_3_04_00_00, but found the HRPWM did not enabled. The configuration is the same as demo:
int MEP_ScaleFactor; // Global variable used by the SFO library
// Result can be used for all HRPWM channels
// This variable is also copied to HRMSTEP
// register by SFO() function.
volatile struct EPWM_REGS *ePWM[] = {0, &EPwm1Regs, &EPwm2Regs};
while(status == SFO_INCOMPLETE)
{
status = SFO();
if(status == SFO_ERROR)
{
//error(); // SFO function returns 2 if an error occurs & # of MEP
} // steps/coarse step exceeds maximum of 255.
}
SysCtl_disablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
initHRPWM(LLC_PWM_PER_DFT);
SysCtl_enablePeripheral(SYSCTL_PERIPH_CLK_TBCLKSYNC);
When calling HRPWM, they do not use the automatic compensation function, but rather calculate the compensation 'compCount' themselves:
HRPWM_setTimeBasePeriod(EPWM1_BASE, compCount);
They compared the codes with our demo, they were the same. However, HRPWM still could not be implemented.
Could you help with this? Thank you in advance!