Dear TI engineers,
I have some doubt about AQSFRC.RLDCSF=0x11. The configuration is below.
The destination of this configuration seems to use shadow mode. But EPwm1Regs.AQSFRC.bit.RLDCSF = 3 make the shadow mode not work.
So,how to realize this configuration?
Looking forward for your direction.
EPwm1Regs.TBCTL.bit.HSPCLKDIV = 0; EPwm1Regs.TBCTL.bit.CLKDIV = 0; //TBCLK = EPWMCLK EPwm1Regs.TBCTL.bit.CTRMODE = TB_COUNT_UPDOWN; // Symmetrical mode EPwm1Regs.TBCTL.bit.PHSEN = TB_DISABLE; // Master module,not load timebase from TBPHS EPwm1Regs.TBCTL.bit.PRDLD = TB_SHADOW; // load TBPRD from its shadow ,when TBCTR is 0 EPwm1Regs.TBCTL.bit.SYNCOSEL = TB_CTR_ZERO; //TBCTR = 0x0000, EPWMxSYNCO Synchronization Output EPwm1Regs.TBPRD = 6410; // 200M / 6410.2 / 2 = 15.6KHz EPwm1Regs.TBPHS.bit.TBPHS = 0; // Set Phase register to zero EPwm1Regs.CMPCTL.bit.SHDWAMODE = CC_SHADOW; //CMPA Register Operating shadow Mode EPwm1Regs.CMPCTL.bit.SHDWBMODE = CC_SHADOW; //CMPB Register Operating shadow Mode EPwm1Regs.CMPCTL.bit.LOADAMODE = CC_CTR_PRD; //CMPA load from shadow , on CTR=PRD EPwm1Regs.CMPCTL.bit.LOADBMODE = CC_CTR_PRD; //CMPB load from shadow, on CTR=PRD // duty = CMPA /TBPRD EPwm1Regs.AQCTLA.bit.CAU = AQ_SET; //when the counter rising equals the active CMPA,force EPWMxA output low. EPwm1Regs.AQCTLA.bit.CAD = AQ_CLEAR; //when the counter falling equals the active CMPA ,force EPWMxA output high. //EPwm1Regs.DBCTL.bit.MODE = DB_FULL_ENABLE; // enable Dead-band module EPwm1Regs.DBCTL.bit.IN_MODE = DBA_ALL; //EPWMxA In is the source for both falling-edge and rising-edge delay. // EPwm1Regs.DBCTL.bit.OUT_MODE = DB_FULL_ENABLE; //both rising and falling edge of EPWM1A have dead band. EPwm1Regs.DBCTL.bit.POLSEL = DB_ACTV_HIC; // EPWMxB is inverter of EPWMxA EPwm1Regs.DBFED.all = 300; // falling delay 2.5us EPwm1Regs.DBRED.all = 300; // rising delay 2.5us EPwm1Regs.ETSEL.bit.INTSEL = 1; // EPWMx_INT interrupt active when TBCTR = 0x0000, under overflow ,INV interrupt EPwm1Regs.ETSEL.bit.INTEN = 1; // enable interrupt EPwm1Regs.ETPS.bit.INTPRD = 1; // Generate INT on first event EPwm1Regs.TZSEL.bit.CBC1 = TZ_ENABLE; // Enable TZ1 as a CBC trip source for this ePWM module,OVC EPwm1Regs.TZSEL.bit.OSHT2 = TZ_ENABLE; // Enable TZ2 as a One-shot trip source for this ePWM module,BUSOV EPwm1Regs.TZCTL.bit.TZA = TZ_FORCE_LO; // Force EPWMxA to a low state EPwm1Regs.TZCTL.bit.TZB = TZ_FORCE_LO; // Force EPWMxB to a low state EPwm1Regs.AQSFRC.bit.RLDCSF = 3;