I want to connect to the network, use Hifive1 and TI’s CC3100 SimpleLink Wi-Fi.
I port CC3100 driver and referenced the example tcp_socket.
My question is that the program is in an endless loop at _SlNonOsMainLoopTask(), and I don’t know what caused it.
The follow is the code:
static long ConfigureSimpleLinkToDefaultState()
{
SlVersionFull ver = {0};
_WlanRxFilterOperationCommandBuff_t RxFilterIdMask = {0};
unsigned char ucVal = 1;
unsigned char ucConfigOpt = 0;
unsigned char ucConfigLen = 0;
unsigned char ucPower = 0;
long lRetVal = -1;
long lMode = -1;
lMode = sl_Start(0, 0, 0);
printf(" sl_Start Value : %d \r\n", lMode);
ASSERT_ON_ERROR(lMode);
if (ROLE_STA != lMode)
{
if (ROLE_AP == lMode)
{
while(!IS_IP_ACQUIRED(g_ulStatus))
{
#ifndef SL_PLATFORM_MULTI_THREADED
_SlNonOsMainLoopTask();
#endif
}
}
lRetVal = sl_WlanSetMode(ROLE_STA);
ASSERT_ON_ERROR(lRetVal);
…
…
…
return lRetVal;
}