Other Parts Discussed in Thread: LAUNCHXL-CC2640R2, TXB0104
Hi,
We are attempting to use SDSPI with a CC2640R2 chip but with a different default SPI CS line (IOID_21):
#define CC2640R2_LAUNCHXL_SPI0_MISO IOID_8 /* RF1.20 */ #define CC2640R2_LAUNCHXL_SPI0_MOSI IOID_9 /* RF1.18 */ #define CC2640R2_LAUNCHXL_SPI0_CLK IOID_10 /* RF1.16 */ #define CC2640R2_LAUNCHXL_SPI0_CSN IOID_21
The SDK we're using is `SimpleLink CC2640R2 SDK (4.40.00.10)` through the CCS Cloud.
We use the default `sdraw.c` example in the CCS Cloud, but add the header line:
`#include <ti/drivers/sd/SDSPI.h>`
The code fails on the `SD_initialize` command and I think I know why: after probing the SPI lines with an oscilloscope, it looks like the 6 byte command packet and the 1 byte reponse are on the the *same* MOSI line. The 1 byte response should be on the MISO line, but no data ever appears on this line.
I think this means that the SD driver is still in SD mode and not going into SPI mode.
How can I make it use SPI mode instead?
Thanks!