Other Parts Discussed in Thread: C2000WARE, CONTROLSUITE
Tool/software: Code Composer Studio
#############################################
interrupt void epwm1_timer_isr(void)
{
EPwm1_Count++;
Vo = AdcRegs.ADCRESULT0 >>4;
Vin = (AdcRegs.ADCRESULT1 >>4);
IL = AdcRegs.ADCRESULT2 >>4;
'/###########Buck mode
if(.......... )
{
........
{
EPwm1Regs.AQCSFRC.bit.CSFA = 2;
EPwm1Regs.AQCSFRC.bit.CSFB = 1;
}
else if (..........)
{'''''''''''''''
DELAY_US(2L);
EPwm1Regs.AQCSFRC.bit.CSFA = 1;
EPwm1Regs.AQCSFRC.bit.CSFB = 2;
DELAY_US(2L);
}
else
#################################################
I used the DELAY() function and set 2L in (). then I used oscilloscope to check it which is approximate 5.6mS.
I found the formula that is "((A * 1000)/16.67 -9)/5", this number must be 0.316uS.
Is the setting wrong??