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.

LAUNCHXL-CC1310: Operating as CC1310 transceiver (WOR)

Part Number: LAUNCHXL-CC1310
Other Parts Discussed in Thread: CC1310

Hi,

I want to use two CC1310 modules in my project to work as transceivers. One of them will work as "Master" and the other as "Slave" I want the master to wake up a slave device every 5 minutes and receive information from the sensor and send it to the master device. 

In another project, I communicated two CC1310 modules with each other, but there I ran a module TX as a module RX and woke up the module with KBI and sent the data. 

Now I want to wake up the modules over RF, get the information and put them back to sleep in order to improve the project I did before.
Can you guide me on this?

I want to set up a structure like the one below.

The point I do not understand here is how I will run rxThread and txThread on the same project.

Regards

Ali

  • No sure I fully understand what you are asking/what the problem is.

    On the Slave side you can use the WOR RX example as a starting point. The wakeup interval will depend on how long preamble you want to send from the master when you want to wake the slave. Assume you use the default preamble length (0.5 s). The sniff command can then stay the way it is in the example, and the only thing you oneed to add is that everytime you have received a wakeup packet from the master, you read the sensor via SPI, call the TX function, and then go back to sleep:

        /* Enter main loop */
    
       while(1)
    
       {
    
           /* Set next wakeup time in the future */
    
           RF_cmdPropRxSniff.startTime += WOR_WAKE_UP_INTERVAL_RAT_TICKS(WOR_WAKEUPS_PER_SECOND);
    
     
    
           /* Schedule RX */
    
           RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropRxSniff, RF_PriorityNormal, &callback, RF_EventRxEntryDone);
    
     
    
           /* Log RX_SNIFF status */
    
           switch(RF_cmdPropRxSniff.status) {
    
               case PROP_DONE_IDLE:
    
                   /* Idle based on RSSI */
    
                   worStatistics.doneIdle++;
    
                   break;
    
               case PROP_DONE_IDLETIMEOUT:
    
                   /* Idle based on PQT */
    
                   worStatistics.doneIdleTimeout++;
    
                   break;
    
               case PROP_DONE_RXTIMEOUT:
    
                   /* Got valid preamble on the air, but did not find sync word */
    
                   worStatistics.doneRxTimeout++;
    
                   break;
    
               case PROP_DONE_OK:
    
                   /* Received packet */
    
                   worStatistics.doneOk++;
    
                  
    
                   // Read sensor over SPI
    
                  
    
                    // Create data packet with sensor data
    
                  
    
                   // Transmit the packet
    
                   RF_runCmd(rfHandle, (RF_Op*)&RF_cmdPropTxAdv, RF_PriorityNormal, NULL, 0);
    
                  
    
                  
    
                   break;
    
               default:
    
                   /* Unhandled status */
    
                   break;
    
           };
    
       }

    There are SPI examples in the SDK you can take a look at for figuring out how to read your sensor

    On the Master side, you can for example use the WOR TX example as a starting point. Instead of transmitting a packet every time the button is pushed, you can transmit it every 5 minutes using TRIG_REL_START for the TX command (same way as is done for the sniff command on the slave side).

    The TX command can be changed to an RX command so that the radio always enters RX after TX, and wait for the sensor data.

    Once data is received, you can output the data on UART

    BR

    Siri

  • Hi Siri,

    Thank you for the answer.

    Regards

    Ali