TI中文支持网
TI专业的中文技术问题搜集分享网站

F280049使用8組EPWM做相移變頻,PWM動作異常

目前使用F280049做4相全橋(變頻與變duty)的應用,每相都會用到兩組EPWM,所以總共8組EPWM都用完。

 

目前遇到的問題是4相都要各相差90度,發現在變頻的過程中會發生PWM打出來的不如預期,如下圖所示。

 

如果將4相設定為同相就沒有問,如下圖所示。

 

所以看起來是設定相移發生了問題。

 

1、請問在做相移該需要注意什麼?

2 、我有使用1001的interleaved LLC的global update,一起更新,但似乎問題是一樣的,並且DB無法使用global update更新,所以這也是個問題。

 

下面是我設定global的程式,不知道是否還少了那些?

 

每次程式更新

//   EALLOW;

//   EPwm1Regs.GLDCTL2.all = 1;

//   EDIS;

 

程式Init

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBCTL);

//

//   EALLOW;

////   EPwm1Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm2Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm3Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm4Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm5Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm6Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm7Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm8Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//

//   EPwm1Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm1Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm1Regs.GLDCTL.bit.GLD = 1;                  // Enable global load

//

//   EPwm2Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm2Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm2Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm3Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm3Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm3Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm4Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm4Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm4Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm5Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm5Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm5Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm6Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm6Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm6Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm7Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm7Regs.GLDCTL.bit.OSHTMODE = 1;            // Enable one shot mode

//   EPwm7Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm8Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm8Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm8Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//

//   EPwm1Regs.GLDCTL2.all = 1;

//   EDIS;

 

Green Deng:抱歉你上传的图片上的信息太少,我不确定你的“不如預期”是指移相的相位角度不对还是移相不成功?或是其他问题?

目前使用F280049做4相全橋(變頻與變duty)的應用,每相都會用到兩組EPWM,所以總共8組EPWM都用完。

 

目前遇到的問題是4相都要各相差90度,發現在變頻的過程中會發生PWM打出來的不如預期,如下圖所示。

 

如果將4相設定為同相就沒有問,如下圖所示。

 

所以看起來是設定相移發生了問題。

 

1、請問在做相移該需要注意什麼?

2 、我有使用1001的interleaved LLC的global update,一起更新,但似乎問題是一樣的,並且DB無法使用global update更新,所以這也是個問題。

 

下面是我設定global的程式,不知道是否還少了那些?

 

每次程式更新

//   EALLOW;

//   EPwm1Regs.GLDCTL2.all = 1;

//   EDIS;

 

程式Init

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBCTL);

//

//   EALLOW;

////   EPwm1Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm2Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm3Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm4Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm5Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm6Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm7Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm8Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//

//   EPwm1Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm1Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm1Regs.GLDCTL.bit.GLD = 1;                  // Enable global load

//

//   EPwm2Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm2Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm2Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm3Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm3Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm3Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm4Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm4Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm4Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm5Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm5Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm5Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm6Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm6Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm6Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm7Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm7Regs.GLDCTL.bit.OSHTMODE = 1;            // Enable one shot mode

//   EPwm7Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm8Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm8Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm8Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//

//   EPwm1Regs.GLDCTL2.all = 1;

//   EDIS;

 

Yang Meng-Chu:

回复 Green Deng:

基本上全部的EPWM的頻率都要一樣。

我是做LLC控制

在有問題的部分EPWM5/6的頻率跟duty都不對了。

目前使用F280049做4相全橋(變頻與變duty)的應用,每相都會用到兩組EPWM,所以總共8組EPWM都用完。

 

目前遇到的問題是4相都要各相差90度,發現在變頻的過程中會發生PWM打出來的不如預期,如下圖所示。

 

如果將4相設定為同相就沒有問,如下圖所示。

 

所以看起來是設定相移發生了問題。

 

1、請問在做相移該需要注意什麼?

2 、我有使用1001的interleaved LLC的global update,一起更新,但似乎問題是一樣的,並且DB無法使用global update更新,所以這也是個問題。

 

下面是我設定global的程式,不知道是否還少了那些?

 

每次程式更新

//   EALLOW;

//   EPwm1Regs.GLDCTL2.all = 1;

//   EDIS;

 

程式Init

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base1, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base2, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base3, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base4, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base5, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base6, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base7, EPWM_GLDCFG_DBCTL);

//

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_TBPRD_TBPRDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPA_CMPAHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPB_CMPBHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPC);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_CMPD);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBRED_DBREDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBFED_DBFEDHR);

//   EPWM_enableGlobalLoadRegisters(base8, EPWM_GLDCFG_DBCTL);

//

//   EALLOW;

////   EPwm1Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm2Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm3Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm4Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm5Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm6Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm7Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//   EPwm8Regs.EPWMXLINK.bit.GLDCTL2LINK = 0;

//

//   EPwm1Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm1Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm1Regs.GLDCTL.bit.GLD = 1;                  // Enable global load

//

//   EPwm2Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm2Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm2Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm3Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm3Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm3Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm4Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm4Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm4Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm5Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm5Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm5Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm6Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm6Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm6Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm7Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm7Regs.GLDCTL.bit.OSHTMODE = 1;            // Enable one shot mode

//   EPwm7Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//   EPwm8Regs.GLDCTL.bit.GLDMODE = 0;             // Load on CTR = 0

//   EPwm8Regs.GLDCTL.bit.OSHTMODE = 1;             // Enable one shot mode

//   EPwm8Regs.GLDCTL.bit.GLD = 1;                 // Enable global load

//

//

//   EPwm1Regs.GLDCTL2.all = 1;

//   EDIS;

 

Yang Meng-Chu:請問有人可以協助此問題嗎?

基本上全部的EPWM的頻率都要一樣。

我是做LLC控制

在有問題的部分EPWM5/6的頻率跟duty都不對了。

赞(0)
未经允许不得转载:TI中文支持网 » F280049使用8組EPWM做相移變頻,PWM動作異常
分享到: 更多 (0)