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!
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);
}
}