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.

C2000 DSP,在PWM中断中修改死区失败

TI原厂的技术支持们,你们好,我遇到以下问题,请帮助解决。

我采用TI的demo程序HVLLCl例程,在我修改死区后,如果更新死区的值在C1服务程序中,是可以修改死区的。

而我在PWM中断函数中更新死区,更新失败,请求帮助。详细程序如下:

void C1(void)  // Update Coefficients 
//------------------------------------------------------
{
 // Update PWM1
 PWM_ComplPairDB_UpdateDB(1, RED, FED);    //此处更新死区成功
.....
}
 
void PWM_ComplPairDB_UpdateDB(int16 n, int16 dbRED, int16 dbFED)
{
 (*ePWM[n]).DBRED=dbRED;
 (*ePWM[n]).DBFED=dbFED;
}
2.但是当我去掉C1中的[PWM_ComplPairDB_UpdateDB(1, RED, FED);],在PWM的中断中修改死区,修改失败。
_PWM_ISR:
  ; full context save - push any unprotected registers onto stack
  PUSH   AR1H:AR0H
  PUSH   XAR2
  PUSH   XAR3
  PUSH   XAR4
  PUSH   XAR5
  PUSH   XAR6
  PUSH   XAR7
  PUSH   XT
  SPM    0              ; set C28 mode
  CLRC   AMODE      
  CLRC   PAGE0,OVM
  SETC INTM     ; set interrupt global mask - comment if ISR is nestable
;-----------------------------------------------------------------------------------------
; call DP library modules
  ;---------------------------------------------------------
  .if(INCR_BUILD = 1)
   PWMDRV_LLC_ComplPairDB 1
   PWMDRV_LLC_ComplPairDB_UpdateDB 1  ;此处调用汇编函数修改死区失败。
  .endif
以上是我遇到的问题,请求TI的技术支持给予帮助,谢谢!