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.

CC1312R: CMD_FS_OFF, CMD_FS_POWERUP and CMD_FS_POWERDOWN

Part Number: CC1312R
Other Parts Discussed in Thread: CC1310

I am a little confused about the different ways of Power-Up/-Down the FS.

Is it usefull to save energy to power-down the FS with CMD_FS_POWERDOWN after each radio operation, if the next operation will start a long time (~1s) later? Or will this handled by the power-manager?

In my application i will send once a second a short unmodulated signal with CMD_TX_TEST. My current Cmd-Chain is:

  • CMD_FS : set frequency and start the synthesizer
  • CMD_TX_TEST : send unmodulated carrier for 50ms

Does it saves energy if i append a CMD_FS_POWERDOWN to the cmd-chain? Is it enough the use CMD_FS to reactivate everything, or is it necessary to prepend a CMD_FS_POWERUP?

How does this relates to Rf_yield() and RF_Params.nInactivityTimeout?

  • Hi Jan Ingwer,

    Assigning an expert to comment. 

    Thanks, 
    Elin

  • You do not have to turn the synth on an off in your application unless you are changing frequency all the time. Every time the RF Core has been powered down, the power driver will make sure that the setup command and the CMD_FS is executed the next time you want to use the radio.

    The nInactivityTimeout can be used for automatic power down. The RF core will then start a timer after the last command in the queue has completed.

    The default timeout is "forever" and this feature is disabled.

    A more used approach, at least in the proprietary RF examples is to use Manual power-down by calling RF_yield(). The client should do this whenever it knows that no further radio operation will be executed for a couple of milliseconds.

    Example:

    /* Request access to the radio */
    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
    /* Set the frequency */
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
    while(1)
    {
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
    
        /* Power down the radio */
        RF_yield(rfHandle);
    
        /* Sleep for 1 s */
        sleep(1);
    }
    

    In the example above, the RF_yield, will power down the radio and the sleep will make the device enter standby for 1 s. When the TX command is issues again, the drivers know that it must first perform a setup command and then a CMD_FS before the radio can be used. Since the device is told to sleep for 1 s, the interval for when the radio transmits a carrier, is slightly above 1 s.

    If you want the interval for entering TX to be exactly 1 s, you can use absolute trigger for the start trigger of the TX command:

    #define PACKET_INTERVAL (uint32_t)(4000000*1.0f) /* Set packet interval to 1 s */
    
    RF_cmdTxTest.startTrigger.triggerType = TRIG_ABSTIME;
    
    /* Request access to the radio */
    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
    /* Set the frequency */
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
    /* Get current time */
    time = RF_getCurrentTime();
    while(1)
    {
        /* Set absolute TX time to utilize automatic power management */
        time += PACKET_INTERVAL;
        RF_cmdTxTest.startTime = time;
    
        RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
    }
    

    In the case above, the drivers will know that you are not going to enter TX again in almost one second, so it will automatically power down the RF Core and power it up again in time to do a setup command and a CMD_FS before the next time it should enter TX.

    In both of the example, endTriggers should be used for the TX command, to make it stop transmitting after 50 ms (or whatever time you want).

    Siri

  • Hello Siri,

    thank you for your description. To be sure that i get it right, i have another question:

    In the desciption of RF_yield() i have read that the execution of RF_yield() will be postponed until all pending commands are done. With this in mind i want to do the following sequence:

    /* Set the frequency */
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
    /* send the ping */
    RF_postCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
    /* shut down RF core after work is done */ 
    RF_yield(rfHandle);

    Will this work as expected?

    Is there any penalty if i run RF_open() very early and do no RF_close() after each finishd command ?

    Will RF_open() start the RF core at instant and i have to call RF_yield() to stop it , or will it wait until i run/post the first RF command?

  • Hi Siri,

    in my first tests (with CC1310, not CC1312R) i have found an issue with repeted RF_cmdTxTest:

    I have to do a RF_cmdFs before every RF_cmdTxTest otherwise i got a usable signal only for the first RF_cmdTxTest. I did not tested it again with CC1312 because to do the additional RF_cmdFs is no big thing.

    Can you check whether this issue exist in the current Software/Firmware versions?

    Jan

  • What do you mean when you say that you only get usable signals for the first TX. What do you get for the other ones? No signal, a signal on the wrong freq?

    I tested it with the newest SDK (4.10) and did not see any problems:

    void *mainThread(void *arg0)
    {
        RF_Params rfParams;
        RF_Params_init(&rfParams);
    
        /* Open LED pins */
        ledPinHandle = PIN_open(&ledPinState, pinTable);
        if (ledPinHandle == NULL)
        {
            while(1);
        }
    
        RF_cmdTxTest.startTrigger.triggerType = TRIG_NOW;
        RF_cmdTxTest.endTrigger.triggerType = TRIG_REL_SUBMIT;
        RF_cmdTxTest.endTime = (uint32_t)(4000000*0.5f); // Transmit for 500 ms
    
        /* Request access to the radio */
        rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    
        /* Set the frequency */
        RF_postCmd(rfHandle, (RF_Op*)&RF_cmdFs, RF_PriorityNormal, NULL, 0);
    
        while(1)
        {
            RF_runCmd(rfHandle, (RF_Op*)&RF_cmdTxTest, RF_PriorityNormal, NULL, 0);
    
            /* Power down the radio */
            RF_yield(rfHandle);
    
            /* Sleep for 2 s */
            sleep(2);
        }
    }

    The code above transmit a carrier for 500 ms and then sleep for 2 s, and then it repeats. The application only issue the cmdFS once, but the rf driver runs the command every time it wakes up from sleep.

    BR

    Siri

  • I my application i send a fast sequence of short signals. I have used multiple commands chained together via the pNextOp-field and used the RF_yield()

    Simplified source:

    typedef struct {
      rfc_CMD_FS  fs1;
      rfc_CMD_TX_TEST tx1;
      rfc_CMD_FS  fs2;
      rfc_CMD_TX_TEST tx2;
      rfc_CMD_FS  fs3;
      rfc_CMD_TX_TEST tx3;
    } cmdMultiPing_t;
    
    rfHandle = RF_open(&rfObject, &RF_prop, (RF_RadioSetup*)&RF_cmdPropRadioDivSetup, &rfParams);
    ...
    cmdMultiPing_t mp;
    mp.fs1 = RF_cmFs;
    mp.fs1.startTrigger = TRIG_NOW
    mp.fs1.pNextOp = &mp.tx1
    mp.tx1 = RF_cmdTxTest
    mp.tx1.startTrigger = TRIG_NOW
    mp.tx1.endTrigger = TRIG_REL_START, 20ms
    mp.tx1.pNextOp = &mp.fs2
    mp.fs2 = RF_cmFs;
    mp.fs2.startTrigger = TRIG_REL_PREVEND, 100ms 
    mp.fs2.pNextOp = &mp.tx2 
    mp.tx2 = RF_cmdTxTest
    mp.tx2.startTrigger = TRIG_NOW 
    mp.tx2.endTrigger = TRIG_REL_START, 20ms 
    mp.tx2.pNextOp = &mp.fs3 
    mp.fs3 = RF_cmFs;
    mp.fs3.startTrigger = TRIG_REL_PREVEND, 100ms
    mp.fs3.pNextOp = &mp.tx3 
    mp.tx3 = RF_cmdTxTest
    mp.tx3.startTrigger = TRIG_NOW 
    mp.tx3.endTrigger = TRIG_REL_START, 20ms 
    mp.tx3.pNextOp = NULL 
    ... 
    RF_runCmd(rfHandle, (RF_Op*)&mp, RF_PriorityNormal, NULL, 0)

    This worked. But if i remove fs2 and fs3 from the chain, i only got a signal from the first CMD_TX_TEST.

    I only have tested the frequency set with CMD_FS because i do not have the equipment to find a very short signal at unknown frequency.

    BR

    Jan

  • Hi Jan

    Just wanted to let you know that I have seen the same behavior and are working on this.

    I will keep you updated.

    BR

    Siri

  • There seems to be an issue with the CC13x0 devices when chaining the TX_TEST commands. This is fixed on CC13x2, and I have verified that it works as expected there. You just need to make sure that .config.bFsOff = 0x0 when you are not doing the CMD_FS between the commands.

    BR

    Siri

  • Thank you for your work to investigate the problem.

    BR

    Jan