Other Parts Discussed in Thread: CC1310, EK-TM4C1294XL, EK-TM4C129EXL
I am using TI-RTOS (2_21_00_06) SPI drivers for using 1310 in the slave configuration.
void appLanTaskFunction (UArg arg0, UArg arg1)
{
SPI_Handle handle;
SPI_Params params;
SPI_Transaction transaction;
uint8_t buf[6];
// Init SPI and specify non-default parameters
SPI_Params_init(¶ms);
params.bitRate = 1000000;
params.frameFormat = SPI_POL0_PHA1;
params.mode = SPI_SLAVE;
params.transferMode = SPI_MODE_BLOCKING;
params.transferTimeout = SPI_WAIT_FOREVER;
handle = SPI_open(Board_SPI0, ¶ms);
SPI_control(handle, SPICC26XXDMA_RETURN_PARTIAL_ENABLE, NULL);
while (1)
{
memset(buf, 0, sizeof(buf));
transaction.count = sizeof(buf);
transaction.txBuf = 0;
transaction.rxBuf = buf;
SPI_transfer(handle, &transaction);
asm("nop");
}
}
When spi master send more then sizeof(buf) bytes, CC1310 hangs.
Hang occurs only if RETURN_PARTIAL is enabled (this option is necessary for me).
If configured transferMode=SPI_MODE_CALLBACK, hang occurs too.
I set breakpoint to asm("nop") and when master send less then 6 bytes, program gets into the breakpoint.
If master send more then 6 bytes, SPI_transfer function never unblock my task, and program never gets into the breakpoint, even if master do next transaction with size less then 6 bytes.
Please help organize the protection from this hang.