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.

CC2510 Tx code help

Other Parts Discussed in Thread: CC2510

I wrote a really simple Pkt Transmit code on one of the CC2510 mini dev kit. How do I check if it's working?

I hooked up another CC2510 to smartRF studio and put it in continuous Rx mode. RF settings in this board were same as Tx.

But I still don't see any RF. Just a flat graph.

Here's my Tx code -

It transmits a 1 packet (length=5) when a button is pressed. The data is the number of times switch is pressed.

The first byte is pkt address, remaining bytes are just the same data(number of button presses).

One weird thing is the timer contents and T1IF does not clear even if I clear them.

I am running the timer in free running mode. Timer clock is main clock/128

CLKCON = 0x80;        //Main clk = OSC(26MHz)

//***************TIMER CONFIG***************//
//16 BIT TIMER, TIMER1, PRESCALER=10(DIV 32)
//PRELOAD =0000
T1CTL=0X0D; //Prescaler= 11(div128)
T1CNTH=0X00;
T1CNTL=0X00;
//**************END TIMER CONFIG**************//

void delay()
{
while(!T1IF);
T1IF=0;
T1CNTL=0X00;
T1CNTH=0X00;
}


RF Part -

//**************RADIO CONFIG***************//

RFTXRXIE=1; //RF INTERRUPT ENABLE 

            while(1) 

                   {

                       if (!P1_2) //button pressed(active low)

{

bcount+=1; //button press counter
RFST=0X03; //STX
RFD=rx1_addr;         //ADDRESS


while(RFTXRXIF==1); //wait for clear interrupt
RFTXRXIF=0; // reset and write data
RFD=bcount;


//repeat with same or dummy data, bcoz pktlen is 05
while(RFTXRXIF==1); //wait for clear interrupt
RFTXRXIF=0; // reset and write data
RFD=bcount;


while(RFTXRXIF==1); //wait for clear interrupt
RFTXRXIF=0; // reset and write data
RFD=bcount;


while(RFTXRXIF==1); //wait for clear interrupt
RFTXRXIF=0; // reset and write data
RFD=bcount;

P1_0 =1;
delay(); //LED stays ON for a while
P1_0 =0;


}
//else enter low power mode with periodic wake up(1ms?)

}