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.

LP-CC2652RB: CC2652RB idle mode

Part Number: LP-CC2652RB
Other Parts Discussed in Thread: CC2652RB

Dear Team

Good day!

Our customer  using SPI blocking mode and this function is the most time-consuming one in his case. Is it possible to set the CC2652RB main controller into idle mode (to save power) after a SPI_transfer() is called? If so, any relevant examples (or functions) can be helpful.

The attached txt file is the code. Thanks!

BLE_Question3_Code.txt
static void SPIslave_taskFxn(UArg a0, UArg a1)
{
    SPI_init();
    SPI_Handle      slaveSpi;
    SPI_Params      spiParams;
    SPI_Transaction transaction;
    SPI_Params_init(&spiParams);
    spiParams.frameFormat = SPI_POL1_PHA1; // Rising edge
    spiParams.mode = SPI_SLAVE;
    spiParams.transferMode = SPI_MODE_BLOCKING;

    slaveSpi = SPI_open(CONFIG_SPI_SLAVE, &spiParams);

    while(1)
    {
        memset((void *) rxBuf, 0, SPI_MSG_LENGTH);
        transaction.count = SPI_MSG_LENGTH;
        transaction.txBuf = NULL;
        transaction.rxBuf = (void *) rxBuf;   

        SPI_transfer(slaveSpi, &transaction);
        ICall_free(rxBuf);
    }
}

  • Hi Guangyan,

    The purpose of blocking mode is to block a task's code execution until either the SPI transaction has completed or a timeout has occurred.  This ensures that only one SPI transfer operates at a given time.  The customer could consider using SPI_MODE_CALLBACK or set a spiParams.transferTimeout to limit the delay and see whether this improves behavior.  They could refer to the TI Drivers Runtime APIs for more information.  The idle task is lowest priority and some peripheral functions (like adding buffers) could require active mode operation.  Other communication protocols like UART are less power-intensive.

    Regards,
    Ryan