Hello all,
I am using the following setup:
CC3100BOOST connected to my custom motherboard via SPI interface.
SPI bitrate = 1 Mbps. CC3100BOOST is flashed with latest firmware.
I have the following observations:
1. Only sl_Send called periodically every 100 or 200 millisec, works fine.
2. Only sl_Recv called periodically every 100 or 200 millisec in non-blocking mode, works fine. In this case the other end sends data to CC3100 every 5 or 8 secs.
3. sl_Send and sl_Recv are interleaved every 200 millisec: The execution hangs in sl_Recv -> _SlNonOsSemGet -> _SlNonOsMainLoopTask after random time, but generally less than 5 mins.
My code for data reception is:
RecvData()
{
RMSRecvData_EntryCnt++;
SlFdSet_t ReadFds;
SlTimeval_t timeout;
sl_Recv_mark = 0xaa;
/* check if data is present */
len = sl_Recv(RmsInfo_t.sockID, RmsInfo_t.recvData, 5, SL_MSG_DONTWAIT);
sl_Recv_mark = 0xbb;
/* if we have data */
if(len > 0)
{
RMSRecvData_HaveDataCnt++;
/* check if the data contains our serial number */
if(CMP_MACH_SERNUM(RmsInfo_t.recvData))
{
sl_Recv_mark = 0x11;
/* read the remaining data */
len += sl_Recv(RmsInfo_t.sockID, &RmsInfo_t.recvData[5], 66, SL_MSG_DONTWAIT);
sl_Recv_mark = 0x22;
RmsInfo_t.recvDataSz = len;
}
}
RMSRecvData_ExitCnt++;
return len;
}
The hang as mentioned in 3 occurs consistently. Every time the hang occurs,
sl_Recv_mark shows 0xaa, indicating that sl_Recv has not returned.
for sl_Recv to hang when working simultaneously with sl_Send ?