This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

CC2652R: CC2652R1F

Part Number: CC2652R

Hello Sir,

Iam woking on spi configuration in CC2652R1F eval board. I have configured spi as master in cc2652r1f evalboard and using tc233 as a slave. 


const char* MASTER_MSG = "AbcD";

The abv is the message sent from master. But I want a array of integer of size 30 to be passed.

I tried doing it but could not achieve the desired result. (If array of int is sent, iam not getting the same value at the slave side, instead some junk value is being printed).

Could you please guide on how to pass an array in the master message?

Below is the code for master message transmission.


GPIO_write(CONFIG_SPI_MASTER_READY, 0);
strncpy((char *) transmitBuffer, MASTER_MSG, MSGSIZE);


while(1){

GPIO_write(CONFIG_SPI_SLAVE_READY, 1);

memset((void *) receiveBuffer, 0, MSGSIZE);

spiTransaction.count = MSGSIZE;
spiTransaction.txBuf = (void *)transmitBuffer;
spiTransaction.rxBuf = (void *)receiveBuffer;
transferOK = SPI_transfer(spi, &spiTransaction);
if (!transferOK) {
while (1);
}
else
{
Display_printf(dispHandle, SP_ROW_SEPARATOR_1+i, 0, "master sent %s",spiTransaction.txBuf);
i++;
}
}