Ok i have 2 CC1120 and i can make them talk all day long. Iv got rx sniff mode working great. But I am having a problem with variable packet length and address filtering. It seems that when i transmit it sends the first byte (the packet length byte) twice making it impossible to do address filtering unless i want the address to always be the same as packet lengths.... iv changed my transmit function around a lot but ill post what I am using now.
int i = 0;
TXByteCtr = 0x10; //TXDATA[0]+1;
RF_PORT_OUT &= ~RF_SPI_CS;
while (UCB0STAT & UCBUSY);
UCB0TXBUF = 0x7F;
while (UCB0STAT & UCBUSY);
CheckStatus = UCB0RXBUF; // get check status byte
while (UCB0STAT & UCBUSY);
UCB0TXBUF = 0x10; // i set ten to be the first byte
while(UCB0STAT & UCBUSY);
while(TXByteCtr != 0)
{
while(UCB0STAT & UCBUSY);
UCB0TXBUF = TXDATA[i]; // Load TX buffer
TXByteCtr--;
i++;
}
RF_PORT_OUT |= RF_SPI_CS;
__delay_cycles(100);
this works good except it sends the first byte (0x10) twice any advice?
Also if it helps what I do to make it transmit is i run the tx function that i posted to wright to the tx FIFO
then I wright to the extended register TXFIRST and set it to zero and strobe the command strobe STX.
this transmits fine except seems to duplicate the first byte.