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 RF interrupt issue

Other Parts Discussed in Thread: CC2530

Hi,

I am trying to interrupt on a received radio packet (RXPKTDONE) using a CC2530. I know that a frame is being received because an acknowledgement is sent back to the other node. However, my interrupt service routine is never being entered. The following is how I set up the registers along with the interrupt routine. Am I missing something? Thank you for any help,
Katie

   

void main(){

//set up interrupts for receiving data
    S1CON = 0x00;//clear RF interrupt flag
    IEN2 = 0x01;//enable RF interrupts
    //clear all the individual RF core flags
    RFIRQF0 = 0x00;
    RFIRQF1 = 0x00;
  //  RFERRF = 0x00;
    //enable the one interrupt I am checking for, mask the rest
    RFIRQM0 = 0x040; //only enable RXPKTDONE
    RFIRQM1 = 0x00; //disable all of RF core interrupts in this register

    EA = 1; //Enable all interurpts

   while(1);//wait until have received something

}

#pragma vector = RF_VECTOR
__interrupt void rf_packet_rx_isr(void){

  basicRfReceive(pRxData, 1, NULL);//read the packet that was received
  if(pRxData[0] == START_SYMBOL){
      //ready for sensors - go ahead and start
       readSensors();
  }else if(pRxData[0] == SYNC_SYMBOL){
      //start timer 2
      initTimer2();
  }
  S1CON = 0x00;//clear RF interrupt flag
  RFIRQF0 = 0x00;//clear individual RF core interrupt flags

}

  • In case anyone else is having a similar problem. I solved this by flushing the FIFO and making sure the receiver is turned on. I added the following lines before the code in the previous main function and it works now.

        FRMCTRL0 = 0x60;
        //clear bits in RXENABLE so receiver is on
        RXMASKCLR = 0xFF;
        // turn receiver on

        basicRfReceiveOn();
        RFST=0XED;     //ISFLUSHRX - flush the FIFO