This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

why these codes can't work?

I want to get a 1000HZ PWM.
@15MHz VPB Clock
codes like this

void ini_pwm()
{

   PINSEL0 =0x02<<14;  /* Enable P0.7 as PWM output */
   PWMPR=0x00;
   PWMMCR=0x02;
   PWMPCR=0x0400;
   PWMMR0=0x16E360;
   PWMMR2=PWMMR0/2;
   PWMLER=0x05;
   PWMTCR=0x02;
   PWMTCR=0x09;
}