Dear All
I have refereed the post " CC2540 irregular PWM output on Timer 1"
and try to change the channel from 1 to 2 or 3
but after I changed the channel, the P0.4 (channel 2)and P0.5(channel 3) can't give the pwm output
if I use the channel1/4, it(channel1/4) is working perfectly.
PERCFG &= ~0x40; // Select Timer 1 Alternative 0 location
P2DIR = (P2DIR & ~0xC0) | 0x80; // Give priority to Timer 1
P0SEL |= 0x30; // Set P0.4(channal2),P0.5(channel3) to peripheral
T1CC0L = 0xFF; // PWM signal period
T1CC0H = 0x00;
T1CC2L = 0x7F; // PWM duty cycle
T1CC2H = 0x00;
T1CCTL2 = (T2CCTL2 & ~0x23) | 0x1C; // PWM output
T1CC3L = 0x7F; // PWM duty cycle
T1CC3H = 0x00;
T1CCTL3 = (T2CCTL3 & ~0x23) | 0x1C; // PWM output
T1CTL |= 0x0E; // divide with 128 and to do Modulo Mode
Any suggestions? Thanks