Other Parts Discussed in Thread: SYSBIOS
Tool/software: Code Composer Studio
Hello
I'm stuck with SPI receive issue. I've connected CC3220SF-LAUNCHXL as master and an image device as slave. I execute the following program. When time of Task_sleep is more than 1000 / Clock_tickPeriod, the program works well.
uint8_t i;
SPI_Transaction spiTransaction;
for (i=0;i < 50;i++)
{
Task_sleep(1000 / Clock_tickPeriod); //1 ms
spiTransaction.count = 4920;
spiTransaction.txBuf = NULL;
spiTransaction.rxBuf = gpCurrentBuffer->Lines.au8Data;
SPI_transfer(pObject->spiHandle, &spiTransaction);
}
However, when the time of Task_sleep is less than 1000 / Clock_tickPeriod or even delete the Task_sleep command, the program will enter an infinite loop.
ti_sysbios_family_arm_m3_Hwi_excHandlerAsm__I:
.asmfunc
tst lr, #4 ; context on PSP?
ite NE
mrsne r0, psp ; if yes, then use PSP
moveq r0, sp ; else use MSP
mov sp, r0 ; use this stack
stmfd sp!, {r4-r11} ; save r4-r11 while we're at it
mov r0, sp ; pass sp to exception handler
mov r1, lr ; pass lr too
mov r4, lr ; preserve LR in r4
ldr r2, excHandlerAddr
blx r2
mov r0, sp ; for ROV
mov r1, r4 ; for ROV
$1
b $1 ; spin here indefinitely
Does it need to delay time for periodical reading data of SPI ?
Could you please help me to fix the problem.
Thanks, Shyr-Long