Hi, I'm trying to use a Sensor in Simple BLE Peripheral Example using SPI. I can use it perfectly in TI-RTOS without BLE Stack on CC2650.
I use the launchXL-CC2650
The SPI configuration is:
SPI_Params_init(&spiParams); spiParams.mode = SPI_MASTER; spiParams.transferMode = SPI_MODE_BLOCKING; spiParams.bitRate = 1000000; spiParams.dataSize = 8; spiParams.transferTimeout = 3000;//SPI_WAIT_FOREVER; spiParams.frameFormat = SPI_POL0_PHA0; // Initialize SPI handle as default master spiHandle = SPI_open(Board_SPI0, &spiParams);
and the transfer function:
uint8_t FPCreset(){
uint8_t bufferTx[4];
SPI_Transaction spiTransaction;
PIN_setOutputValue(pinHandle, Board_DIO0, 0);
PIN_setOutputValue(pinHandle, Board_DIO11, 0);
bufferTx[0] = 0;
bufferTx[1] = 0;
bufferTx[2] = 0;
bufferTx[3] = 0;
spiTransaction.count = 4;
spiTransaction.txBuf = bufferTx;
spiTransaction.rxBuf = NULL;
int ret = SPI_transfer(spiHandle,&spiTransaction);
PIN_setOutputValue(pinHandle, Board_DIO0, 1);
//Task_sleep(1000 / Clock_tickPeriod);
return ret;
}
When I use "spiParams.transferTimeout = SPI_WAIT_FOREVER;" CC2650 send the data but never finish.
When I use "spiParams.transferTimeout = 3000;" CC2650 send de data correctly the first time, but the second time never finish.
And when I use "Task_sleep(1000 / Clock_tickPeriod);" CC2650 is blocked when try to executte de command.
