I want to generate a pwm signal on p0_3 with timer1 without interrupt. but it does not work. I don't kown why. the following is the program i used:
CLKCON = (CLKCON & ~CLKCON_TICKSPD) | TICKSPD_DIV_2; //13M
//
PERCFG = 0x01; //==01TEST spi: alt2, t1: alt1
P2DIR |= 0x80; //set the peripheral priority: Timer 1 channel 1 has priority on Port 0
//
P0SEL |= 0x0a;
P0 = 0x00;
P0DIR |= 0x7F; //
//
P1SEL |= 0xEA; //E8==TEST
P1 = 0x70;
P1DIR |= 0xBE;
//
P2SEL = 0x01; //00=TEST
P2 = 0x0f;
P2DIR |= 0x01;
//
T1CTL &= ~T1CTL_OVFIF;
T1CNTL = 0x00;
//
T1CC0L = 0x03;
T1CC0H = 0x00;
T1CC1L = 0x00;
T1CC1H = 0x00;
//
T1CCTL1= 0x14; //Interrupt disabled, Toggle output mode,Compare mode
T1CTL = 0x00; //Tick frequency/1, Operation is suspended/Modulo mode
//
TIMER1_RUN(TRUE); //#define TIMER1_RUN(value) (T1CTL = (value) ? T1CTL|0x03 : T1CTL&~0x03)
I hope TI 's engineer or someone give me some advice , thanks!