Other Parts Discussed in Thread: C2000WARE
Dear champs,
I am asking this for our customer.
In C2000ware V4.03 driverlib,
EPWM_setDeadBandControlShadowLoadMode(myEPWM1_BASE, EPWM_DB_LOAD_ON_CNTR_ZERO);
seems to clear DBCTL.OUT_MODE, which is not expected!!
See CCS step-by-step debug on watch window,
Before running EPWM_setDeadBandControlShadowLoadMode(myEPWM1_BASE, EPWM_DB_LOAD_ON_CNTR_ZERO);
After running EPWM_setDeadBandControlShadowLoadMode(myEPWM1_BASE, EPWM_DB_LOAD_ON_CNTR_ZERO);
Looking into its source,
static inline void EPWM_setDeadBandControlShadowLoadMode(uint32_t base, EPWM_DeadBandControlLoadMode loadMode) { // // Check the arguments // ASSERT(EPWM_isBaseValid(base)); // // Enable the shadow mode and setup the load event // HWREGH(base + EPWM_O_DBCTL2) = ((HWREGH(base + EPWM_O_DBCTL2) & ~EPWM_DBCTL2_LOADDBCTLMODE_M) | (EPWM_DBCTL2_SHDWDBCTLMODE | (uint16_t)loadMode)); }
Does loadMode need shift like this "(uint16_t)loadMode << EPWM_DBCTL2_LOADREDMODE_S" ?
Would you please check this?