This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

PWM generation in CC2530 on P1.3 port for buzzer,



HI Sir, 

i have generated PWM signal for buzzer and the configuration is as below-

int InitPWM()

{

P1SEL |= BV(3); // Set P1_0 to peripheral, Timer 3,channel 0
P1DIR |= BV(3); // make port 1 3rd pin as optput.
P2SEL |= 0x20;      //timer 3 has highest priority
P2SEL &= ~(0x40); //USART 0 priority which makes to select Timer 3
PERCFG &= (~(0x20)); // Select Timer 3 Alternative 1 location
T3CCTL0 = 0x24;  //Clear output on compare-up, set on 0 , compare mode
T3CTL = 0x04; // clearing the counter
T3CTL |= 0xC0;  //prescalar devider value = tick frequency / 128

T3CC0 = 128;  //Timer 3 Channel 0 Capture or Compare Value

//T3CTL |= 0x10; //Start the timer.

}

I am able to make generate the sound in the buzzer by making the timer start (T3CTL |= 0x10 ), stopping the buzzer by making timer stop (T3CTL &= ~(0x10) ).

inside the application Whenever i call osal_start_timerEx a lite sound is coming from the buzzer.  

Other peripherals also connected to PORT 1 like interrupts on P1.4, P1.5, P1.6  and P1.0 = LNA_EN , P1.1 = PA_EN.

I am not understanding why this lite sound is coming continuously, and this lite sound is not always, whenever there is any interrupt comes or osal_start_timerEx  called at this time this sound is coming from the buzzer. 

can i know wht is happening, why this timer3 is getting start automatically. ??