Hi,
We found issue when SimpleLink driver stuck in high “bandwidth” application with TCP sockets. This is same problem as was discussed at this thread: https://e2e.ti.com/support/wireless_connectivity/simplelink_wifi_cc31xx_cc32xx/f/968/t/432080. Only difference is that reported issue was with UDP sockets, our problem is with TCP communication. According our investigation it looks that problem is in SimpleLink driver or NWP firmware itself.
Information about application:
We started developing own web server in CC3200 application processor. We have main listening task which accept incoming TCP connection and two tasks for client connections. Main task accept connection and sets client socket handle. This unblock client task. Client task read incoming data (http header sent from browser), open file from flash memory and sent data back. Simplelink task have higher priority than listening and client task.
- We use production version of CC3200-LAUNCHXL or CC3200MODLAUNCHXL
- TI-RTOS
- Latest service pack v1.0.1.5.0 and SDK v1.1.0
- Issue reproduced with multiple types of AP from different vendors
Example of client socket sending code:
while(1) {
// wait for valid handle set from listening task and read http header
// …
while(fileLen > 0) {
// read data from flash file into sendBuff with length in toSend
// …
retVal = SL_EAGAIN;
while(retVal == SL_EAGAIN) {
//if(g_pCB->FlowContCB.TxPoolCnt < 5) osi_Sleep(10);
retVal=sl_Send(sock, sendBuff, toSend, 0);
//retVal2=_SlDrvMsgRead();
osi_Sleep(1);
}
if (retVal < 0) break;
}
// close socket, etc.
}
Test conditions:
We have connected CC3200 connected to AP. Web browser Firefox have open 5 tabs. Each tab have set refresh interval 2 sec and ask for jpeg file from CC3200 device. Size of file is about 150kB and is loaded in ~600ms.
Communication with browsers works for some time correctly. But when I load WiFi network by another devices (e.g. HD streaming video) is start network communication with CC3200 slowing. Global g_pCB->FlowContCB.TxPoolCnt starts fluctuating and when decreased to 1 SimpleLink driver stuck. It stuck at line 777 in file driver.c (_SlDrvDataWriteOp()). Code at this line is VERIFY_PROTOCOL(g_pCB->FlowContCB.TxPoolCnt > FLOW_CONT_MIN + 1 ); This code is nothing else then forever loop when is TxPoolCnt lower than 2. When driver stuck there is all communication using SimpleLink driver not possible. Only restart of application MCU can recover this state.
I tried this points:
1. Add line retVal2=_SlDrvMsgRead(); behind sl_Send() – suggestion from UDP forum thread – this decrease fluctuation of TxPoolCnt but problem was not fixed, only is decreased probability
2. Add variable sleep according TxPoolCnt size – similar result as point 1
3. Add long sleep (e.g. osi_Sleep(10);) – not acceptable because is dramatically decrease “bandwidth”
My questions:
1. It is available any fix for this issue? I expect that this is known issue because it was already reported with UDP sockets.
2. It is any way how recover SimpleLink driver when stuck without reset of application processor?
3. Any other suggestion will be welcome.
This is serious issue for us. If any clarification or sent confidential information will be required, you can contact me at my email address. We have signed NDA with TI regarding to Wireless connectivity.
Thank you for answer
Jan
