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.

CC1310 SPI communication in Slave mode not working

Other Parts Discussed in Thread: CC1310

Hi all,

I'm trying to implement an SPI communication between the CC1310 and another microcontroller, and using the CS pin in the CC1310 the communication doesn't work, but if do not use the CS pin it works fine. 

The CC1310 is configured with the following settings:

static void fnSPITask(UArg arg0, UArg arg1)
{
	uint16_t txBuf[6], rxBuf[6];

	SPI_Params params;

	// Init SPI and specify non-default parameters
	SPI_Params_init(&params);
	params.bitRate     	        = 100000;
	params.dataSize 		        = 16;
	params.frameFormat 		= SPI_POL0_PHA1;
	params.mode        		= SPI_SLAVE;
	params.transferMode        	= SPI_MODE_CALLBACK;
	params.transferCallbackFxn 	= cbfnSPI;

	// Configure the transaction
	spiTransaction.count = 6;
	spiTransaction.txBuf = txBuf;
	spiTransaction.rxBuf = rxBuf;

	// Open the SPI and initiate the first transfer
	spiHandle = SPI_open(Board_SPI0, &params);
	while(1);
}

 This is a screen shot of what happens when the master send out the clock.

The SPI transfer in the cc1310 is being done before generate the interrupt pulse( is the INT signal showed in the screen shot)

SPI_transfer(spiHandle, &spiTransaction);

// Send Interrupt to the Host
fnStartIntPulse();

The PIN settings are:

#define P_868_SPI0_MISO                     IOID_8			// P1.20
#define P_868_SPI0_MOSI                     IOID_9			// P1.18
#define P_868_SPI0_CLK                      IOID_10			// P1.16
#define P_868_SPI0_CSN                      IOID_14			// P1.14  


/* SPI Board */
#define Board_SPI0_MISO                     P_868_SPI0_MISO
#define Board_SPI0_MOSI                     P_868_SPI0_MOSI
#define Board_SPI0_CLK                      P_868_SPI0_CLK
#define Board_SPI0_CSN                      P_868_SPI0_CSN


const SPICC26XXDMA_HWAttrsV1 spiCC26XXDMAHWAttrs[CC1310DK_7XD_SPICOUNT] = {
    {
        .baseAddr           = SSI0_BASE,
        .intNum             = INT_SSI0_COMB,
        .intPriority        = ~0,
        .swiPriority        = 0,
        .defaultTxBufValue  = 0,
        .powerMngrId        = PowerCC26XX_PERIPH_SSI0,
        .rxChannelBitMask   = 1<<UDMA_CHAN_SSI0_RX,
        .txChannelBitMask   = 1<<UDMA_CHAN_SSI0_TX,
        .mosiPin            = Board_SPI0_MOSI,
        .misoPin            = Board_SPI0_MISO,
        .clkPin             = Board_SPI0_CLK,
        .csnPin             = Board_SPI0_CSN
    },
    {
        .baseAddr           = SSI1_BASE,
        .intNum             = INT_SSI1_COMB,
        .intPriority        = ~0,
        .swiPriority        = 0,
        .defaultTxBufValue  = 0,
        .powerMngrId        = PowerCC26XX_PERIPH_SSI1,
        .rxChannelBitMask   = 1<<UDMA_CHAN_SSI1_RX,
        .txChannelBitMask   = 1<<UDMA_CHAN_SSI1_TX,
        .mosiPin            = Board_SPI1_MOSI,
        .misoPin            = Board_SPI1_MISO,
        .clkPin             = Board_SPI1_CLK,
        .csnPin             = Board_SPI1_CSN
    }
};

The TI-RTOS version is 2.20.06 

Any idea about where is the problem?

Thanks,

José Araujo