AnsweredAssumed Answered

Glitches on DAI and DPI pins when PWMDT (PWM deadtime) is programmed a value other zero.

Question asked by col on Jan 17, 2012
Latest reply on Jan 25, 2012 by Harshit.Gaharwar

I have an interesting problem.  I'm using the ADSP-21479, 100 pins LQFP.  I configured to run PWM1 and output it on DP11, DP12, DP13, and DP14.  Note, the ADSP21479 100 pins do not have data and address pins for multiplexing so I have to route the PWM outputs to DSP pins.  What interesting is if I configure the deadtime (i.e. PWMDT1) to any value other then 0 then I get glitches on the enabled DAI and DPI pins.  The glitch occur at the PWM frequency.  Any particular reason why I'm getting these glitches and only when the PWM deadtime is programmed to a value other than 0?

 

Here is my PWM initalizing code:

 

int initPWM(void)
{
// Duty cycle:  0.5*(1/fc) + (duty cycle count + dead time count)/PCLK
// % Duty  = Duty cycle/(1/fc);

*pSYSCTL |= (NODATA | PWM1EN | PWMONDPIEN);  // Enable PWM1, Enable PWM signals on the DPI Pins.

*pPWMPOL1 = PWM_POL1AL | PWM_POL1AH | PWM_POL1BL | PWM_POL1BH;
*pPWMSEG1 = 0;       // Enable PWM output signal, disable A & B crossover.
*pPWMCTL1 = PWM_PAIR;     // PWM left justified, non paired mode, duty cycle values are programmable only once per PWM period, PWM Interrupt not enable.

*pPWMPERIOD1 = 4008;     // f(PWM) = PCLK/2*PWMPERIODx; PCLK = CCLK/2 = 48MHz.  f(PWM) = 11976.0479 for PWMPERIOD1 = 4008; 
*pPWMA1 = 500;       // duty cycle for AH.  Ton = 0.5*Tperiod + (*pPWMPERIOD1+*pPWMDT1)/PCLK = 0.5*(1/11976) + (500 + 400)/48e6 = 60uS.  % Duty = 60e-6 / (1/11976) = 71.86%
*pPWMAL1 = 0;
*pPWMB1 = 500;
*pPWMBL1 = 0;
*pPWMDT1 = 500; //300;     // Dead time;

*pPWMGCTL |= (PWM_DIS0 | PWM_SYNCDIS0 | PWM_DIS3 | PWM_SYNCDIS3 | PWM_DIS2 | PWM_SYNCDIS2 | PWM_EN1 | PWM_SYNCEN1);  // Enable PWM1

  
return 1;
}

 

SRU routing for PWM1 output.

 

SRU2(PWM1_AH_O,DPI_PB11_I); // AHI
SRU2(HIGH,DPI_PBEN11_I);

SRU2(PWM1_AL_O,DPI_PB14_I); // ALO
SRU2(HIGH,DPI_PBEN14_I);

SRU2(PWM1_BH_O,DPI_PB12_I); // BHI
SRU2(HIGH,DPI_PBEN12_I);
 
SRU2(PWM1_BL_O,DPI_PB13_I); // BLO
SRU2(HIGH,DPI_PBEN13_I);

SRU2(LOW,DAI_PB16_I);

SRU2(HIGH,DAI_PBEN16_I);

 

A probe place on DAI_PB16 would show glitches occur at PWM1 frequency.

 

Thanks,

 

Loc

Outcomes