Hi,
I am trying to interface Lis2de12 mems sensor with CC2650 MCU via SPI protocol.Currently, I am just trying to read the device ID register of the sensor and have not been successful yet.
Below are the SPI_params:
SPI_Params_init(&spiParams); spiParams.transferMode = SPI_MODE_CALLBACK; spiParams.transferCallbackFxn = &spiCallbackFxn; spiParams.frameFormat = SPI_POL1_PHA1; spiParams.mode = SPI_MASTER; spiParams.dataSize = 8;
Now, according to the datasheet, each read/write spi operation must be completed in 16 clock pulses and further 8 clock pulses to be added for multiple read/write bytes.
I am using following spi transaction params for spi_transfer()
uint8_t txBuffer=0X8FU; uint8_t rxBuffer; spiTransaction.count = 1; spiTransaction.txBuf = &txBuffer; spiTransaction.rxBuf = &rxBuffer;
Spi_transfer() works in full duplex mode and the whole transaction is getting completed in 8 clock pulses only as follows-
Ideally, the data received should be coming in further 8 clock pulses and it's value must be 0X33 (as per the datasheet).
How do I overcome this?