AnsweredAssumed Answered

Deadtime in lpc1768

Question asked by gavi Prakash on Oct 10, 2016
Latest reply on Oct 26, 2016 by Carlos_Mendoza

Hi,

Iam generating MCPWM with deadtime in LPC1768.but iam not able to generate dead time I read datasheet but it is not generating can anyone please help.below is my code

main()

{

SystemInit();                    //Clock and PLL configuration 
 
  LPC_SC->PCONP |= (1<<17); /* Power ON Timer0,1 */
  LPC_SC->PCLKSEL1 |=(1<<30)|(1<<31);
  LPC_PINCON->PINSEL3 |= (1<<12)|(1<<6);
  LPC_PINCON->PINMODE3 |= (1<<6)|(1<<7)|(1<<12)|(1<<13);
      LPC_GPIO1->FIODIR |= (1<<19)|(1<<22);
   LPC_MCPWM->MCCCP = (1<<0)|(1<<1)|(1<<2)|(1<<3);
   LPC_MCPWM->MCCON_SET |=(1<<3)|(1<<31)|(1<<29);//|(1<<1)|(1<<9) ;
  LPC_MCPWM->MCTIM0 = 0;
    LPC_MCPWM->MCPER0 = 1000;
  LPC_MCPWM->MCPW0 = 600;
  LPC_MCPWM->MCDEADTIME = 0x100 ;
  for(i=0;i<10000;i++)
  for(j=0;j<1000;j++);
  LPC_MCPWM->MCCON_SET |= (1<<0);
     while(1)
     { 
    
     }
 }

 

Thanks

Outcomes