Part Number: CC2640R2F
Other Parts Discussed in Thread: CC2640,
Tool/software: WEBENCH® Design Tools
char wb[2];
wb[0] = 0x0B;
wb[1] = addr;
char rb[2];
masterTransaction.count = 2;
masterTransaction.txBuf = wb;
masterTransaction.arg = NULL;
masterTransaction.rxBuf = rb;
bool r = SPI_transfer(s_spiHandle, &masterTransaction);
I am reading sensor data from spi, above code works but only have 2 bytes send from CC2640 to sensor, shouldn't it have the third cycle of clk (from CC2640) to let sensor send data?
I checked the CS signal, it is the same, only 2 cycles.
see picture attached.
also I am very confusing, how CC2640 knows how many bytes will the sensor sending out? there is no length parameter in the SPI_transfer API. (the masterTransaction.count is for sending by CC2640)







