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.

CC2511: CC2511 wireless transceiver always fails to receive data at the receiving end

Part Number: CC2511

There are two CC2511 modules on hand, one serving as the sending end and the other as the receiving end. The sending end sends a data packet after receiving the data sent by the serial port. Now both the sending end's (RFTXRXIF) and (IRQ-DONE) can be set normally, and it should be sending data normally, but the receiving end still cannot receive data. The receiving flag has been unresponsive. The receiving end has written a loop that always detects data. The first part below is the sending code, and the second part is the receiving (receiving did not perform data processing, only wrote the receiving flag detection). Could you please help me take a look? Thank you very much.

In addition, when the interrupt is enabled, the sending flag will not be set, and only when the interrupt is not enabled can the setting be sent normally.

void RF_Send_Init(void)
{
   
    RFST=0x04;
    IOCFG2=0X2E;
    IOCFG0=0X06;
    PKTCTRL0=0X05;
    FSCTRL1=0X0A;
    FREQ2=0X65;
    FREQ1=0X60;
    FREQ0=0X00;
    MDMCFG4=0X76;
    MDMCFG3=0XA3;
    MDMCFG2=0X13;
    MDMCFG1=0X23;
    MDMCFG0=0X11;
    DEVIATN=0X45;
    MCSM0=0X14;
    FOCCFG=0X16;
    FSCAL1=0X00;
    FSCAL0=0X11;
    TEST1=0X31;
    TEST0=0X09;
    PA_TABLE0=0XFE;
    RFST=0x04;
    RFST=0x01;
    while(MARCSTATE != 0x01);
    RFTXRXIF=0;
}
void RF_Send(void)
{
    unsigned char i=0;
    RFST=0x04;
    RFST=0x01;
    while(MARCSTATE!=0x01);
    RFTXRXIF=0;
    RFTXRXIE=0;
    RFIF &= ~0x10;
    RFST=0x03;
    while(!RFTXRXIF);
    RFTXRXIF=0;
    RFD=3;
    for(i=0;i<3;i++)
    {
        while(!RFTXRXIF);
        RFTXRXIF=0;
        RFD=0x66;
    }
    while(!(RFIF & 0x10));
    RFIF &= ~0x10;
}
    
void RF_Receive_Init(void)
{
   
    RFST=0x04;
    IOCFG2=0X2E;
    PKTCTRL0=0X05;
    FSCTRL1=0X0A;
    FREQ2=0X65;
    FREQ1=0X60;
    FREQ0=0X00;
    MDMCFG4=0X76;
    MDMCFG3=0XA3;
    MDMCFG2=0X13;
    MDMCFG1=0X23;
    MDMCFG0=0X11;
    DEVIATN=0X45;
    MCSM0=0X14;
    FOCCFG=0X16;
    FSCAL1=0X00;
    FSCAL0=0X11;
    TEST1=0X31;
    TEST0=0X09;
    PA_TABLE0=0XFE;
 
    RFST=0x04;
    RFST=0x01;
    while(MARCSTATE != 0x01);
    RFTXRXIF=0;
}
void RF_receive(void)
{
    RFTXRXIF=0;
    RFTXRXIE=0;
    EA=1;

    RFIF=RFIF& ~0x10;
    RFST=0x02;
    Usart0_Send_Onebyte(0x02);
    while(!RFTXRXIF);
    Usart0_Send_Onebyte(0x88);
}

After testing the RFIF flag, (IRQ_CS) will be set to 1 (automatically set to 1 in the next cycle after resetting). May I know when this flag bit will be generated?

  • Hi,

    At first glance I don't see any specific issue with the code you published, but unfortunately I don't have a complete system using this device to be able to evaluate this myself.

    One idea: is it possible to try to validate the link using SmartRF on one side of the RF link? That can help obtain additional insights about the root cause of the lack of communications (either on the transmitter or receiver side).

    May I know when this flag bit will be generated?

    The Carrier sense operation is described in section 13.10.4 of the device's datasheet. A few configuration details will influence when this flag will be asserted. 

    Hope this helps,

    Rafael