I am a novice for this field and I am studying the official example cc1120_vchip_easy_link_rx.c. Can anyone please tells me where do I set the RXOFF_MODE to IDLE in the following codes? I have been study it for long, but I cannot find that particular code to do so. Is it done implicitly?
while(TRUE){ // Wait for packet received interrupt if(packetSemaphore == ISR_ACTION_REQUIRED){ // Read number of bytes in rx fifo cc112xSpiReadReg(CC112X_NUM_RXBYTES, &rxBytes, 1); // Check that we have bytes in fifo if(rxBytes != 0){ // Read marcstate to check for RX FIFO error cc112xSpiReadReg(CC112X_MARCSTATE, &marcStatus, 1); // Mask out marcstate bits and check if we have a RX FIFO error if((marcStatus & 0x1F) == RX_FIFO_ERROR){ // Flush RX Fifo trxSpiCmdStrobe(CC112X_SFRX); } else{ // Read n bytes from rx fifo cc112xSpiReadRxFifo(rxBuffer, rxBytes); // Check CRC ok (CRC_OK: bit7 in second status byte) // This assumes status bytes are appended in RX_FIFO // (PKT_CFG1.APPEND_STATUS = 1.) // If CRC is disabled the CRC_OK field will read 1 if(rxBuffer[rxBytes-1] & 0x80){ // Update packet counter packetCounter++; halLedToggle(LED1); } } } // Reset packet semaphore packetSemaphore = ISR_IDLE; // Set radio back in RX trxSpiCmdStrobe(CC112X_SRX); } }