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.

cc2530 RX control

Other Parts Discussed in Thread: CC2530

Hello,

      I am writing a bootloader that will handle OTA as well. I am in the process of trying to receive a packet. I can send a packet and receive it on another chip i have. so i know that works.  I then set up another cc2530 to be a receiver.  If I run the transmitter to the receiver on a different chip then somehow the receiver on the cc2530 sees it. However if i use just the transmitter and just the receiver on the cc2530 i do not get anything from RX. If i also use the 1 cc2530 aas a transmitter and the other as a transmitter it will recieve but never with just one other device.

this is my code...

static int
init(void)
{
RXCTRL = 0x3F;
FSCTRL = 0x55;

CCACTRL0 = CC2530_RF_CCA_THRES;

/*
* According to the user guide, these registers must be updated from their
* defaults for optimal performance
*
* Table 23-6, Sec. 23.15.1, p. 259
*/
TXFILTCFG = 0x09; /* TX anti-aliasing filter */
AGCCTRL1 = 0x15; /* AGC target value */
FSCAL1 = 0x00; /* Reduce the VCO leakage */

/* Auto ACKs and CRC calculation, default RX and TX modes with FIFOs */
FRMCTRL0 = FRMCTRL0_AUTOCRC;
//#if CC2530_RF_AUTOACK
FRMCTRL0 |= FRMCTRL0_AUTOACK;
//#endif

/* Disable source address matching and autopend */
SRCMATCH = 0; /* investigate */

/* MAX FIFOP threshold */
FIFOPCTRL = CC2530_RF_MAX_PACKET_LEN;

cc2530_rf_power_set(0xff);
cc2530_rf_channel_set(13);

rf_flags |= RF_ON;

}

on(void)
{
if(!(rf_flags & RX_ACTIVE)) {
//CC2530_CSP_ISFLUSHRX();
RFST=0XED;
//CC2530_CSP_ISRXON();
RFST=0xE3;

rf_flags |= RX_ACTIVE;
}

return 1;
}

main(){

/* Hardware initialization */
clock_init();
soc_init();
rtimer_arch_init();
leds_arch_init();

cc2530_rf_set_addr(0xabcd);

dma_init();

init();

on();

while( 1) {

//pending
if((FSMSTAT1 & FSMSTAT1_FIFOP)) {    *******************this is where it will not get passed unless i have both the                                                                                                            transmitter and other receiver on


len = RFD;//read(packetbuf_dataptr(), PACKETBUF_SIZE);
if(len > 0) {

    P0_1 ^= 1;
    for(i = 0;i<RXFIFOCNT;i++){
          buf2[i] = RFD;
      }

cc253x_flash_write(121, 0, buf2, RXFIFOCNT);

}


}

}

any help would be appreciated, Thanks.

  • I have figured out what is actually being received is the ACK that comes back from my Transmission. So somehow i am able to receive the ACK back but can not just transmit a new frame and have it received.