This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

UCD3138 程序问题,请指教

Other Parts Discussed in Thread: UCC3895, UCD3138

在INTERRUPT.C文件里面

 

void fast_interrupt(void) {  volatile int32 temp;

 fir_index = CimRegs.FIQIVEC.all;

 if(fir_index == 28)  //index =27

 {   vloop_filter = (signed int) (Filter0Regs.FILTERYNREAD.bit.YN);  

      iloop_filter = (signed int) (Filter1Regs.FILTERYNREAD.bit.YN);

  if (iloop_filter  > vloop_filter)  

 {        FeCtrl1Regs.EADCDAC.bit.DAC_VALUE = (pmbus_dcdc_config_translated[0].cpcc_imax +350);   

 LoopMuxRegs.EXTDACCTRL.bit.DAC2_SEL = 4;   //voltage loop     

 LoopMuxRegs.PCMCTRL.bit.PCM_FILTER_SEL =0; //select filter0 for voltage loop slope source   

 Filter0Regs.FILTERCTRL.bit.KI_STALL =0;    

vv_flag =1;    if(cc_flag ==1)   

 {     cv_trans_flag =1;     

cc_flag =0;     

start_state = START_UP;    }

  }

 

里面 FeCtrl1Regs.EADCDAC.bit.DAC_VALUE = (pmbus_dcdc_config_translated[0].cpcc_imax +350);   

 

这里选择的是恒压控制,为什么DAC_VALUE用的是cpcc_imax ,我理解的是电压环应该用的是电压值,而且还+350,请指教,谢谢