Hi,
I am trying to interface the KX134 to the CC3235MODSF Launchpad. I am able to send and receive one byte of data successfully.
I am getting incorrect data while reading 7 bytes. I am getting the incorrect value FF in the 3rd and 5th bytes.
SPI Code
SPI_Handle masterSpi;
SPI_Params spiParams;
SPI_Params_init(&spiParams);
spiParams.frameFormat = SPI_POL0_PHA0;
spiParams.bitRate = 250000;
spiParams.dataSize = 8;
spiParams.transferCallbackFxn = NULL;
spiParams.transferMode = SPI_MODE_BLOCKING;
masterSpi = SPI_open(CONFIG_SPI_MASTER, &spiParams);
transmitBuffer[0] = 0x88;
transmitBuffer[1] = 0x00;
transmitBuffer[2] = 0x00;
transmitBuffer[3] = 0x00;
transmitBuffer[4] = 0x00;
transmitBuffer[5] = 0x00;
transmitBuffer[6] = 0x00;
transaction.txBuf =(void *)transmitBuffer;
transaction.rxBuf = (void *)receiveBuffer;
transaction.count = 7;
SPI_transfer(masterSpi, &transaction);
I have compare data packets between Arduino and CC3235
SPI Read Working one (Arduino):
SPI not working one (CC3235)
I see MOSI pin send 0x00 values and never go to a high state between zeros like Arduino.
Could you please help me to fix this issue.
Regards,
Robert