CC2510 Help

I got a CC2510 USB Mini Dev kit.

I am trying to write a very simple(non-simpliciti) TX/RX program. One board for tx and other for rx.

Tx begins when a button is pressed. It transmits one packet with 5 bytes. Address checking is enabled on the receiver.

The tx board seems to be transmitting. I can see it transmit when I use smartRF studio in continuous RX mode. But can’t see any RF when I check packet RX mode.

Can anyone help me with the tx code -

while(1) 
{
if (!P1_2) //button pressed(active low)
{
bcount+=1;                 //button press counter
RFST=0X03;              //Strobe TX
RFD=rx1_addr;         // Pkt 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?)

}

RF register config (using smartRF studio)

PKTLEN    = 0x05; // packet length  
PKTCTRL0  = 0x44; // packet automation control 
CHANNR    = 0x03; // channel number 
FSCTRL1   = 0x0A; // frequency synthesizer control 
FREQ2     = 0x5D; // frequency control word, high byte 
FREQ1     = 0x93; // frequency control word, middle byte 
FREQ0     = 0xB1; // frequency control word, low byte 
MDMCFG4   = 0x86; // modem configuration 
MDMCFG3   = 0x83; // modem configuration 
MDMCFG2   = 0x03; // modem configuration 
DEVIATN   = 0x44; // modem deviation setting 
MCSM0     = 0x14; // main radio control state machine configuration 
FOCCFG    = 0x16; // frequency offset compensation configuration 
FSCAL1    = 0x00; // frequency synthesizer calibration 
FSCAL0    = 0x11; // frequency synthesizer calibration 
TEST1     = 0x31; // various test settings 
TEST0     = 0x09; // various test settings 
PA_TABLE0 = 0xFE; // pa power setting 
IOCFG2    = 0x2E; // radio test signal configuration (p1_7) 
IOCFG0    = 0x06; // radio test signal configuration (p1_5)

Anyone?

You might take a look at how Pololu engineers configure the Wixel, which uses essentially the same chip. The source code is available for various preprogrammed applications and in it, the authors comment on the occasional strange and/or unexpected behavior of the radio. http://www.pololu.com/catalog/product/1336

I don’t like the restricted IAR development system that TI provides and suggest that you consider experimenting with Wixels and the unrestricted, free Eclipse/SDCC package instead. It is a lot cheaper to go that way than TI’s dev kits, and you get the USB version of the CC2510 as well. Finally, Pololu engineers are happy to help developers work with their products!

Hi

while(RFTXRXIF==1);

that is wrong. RFTXRXIF flag is set when radio is ready to transmit RFD. (or in RX when data is waiting to be read.)

so bottom line it should look like this.

while(RFTXRXIF == 0);

also it is wise to make debounce function for button read.