Other Parts Discussed in Thread: CC3120MOD
Hi,
I have run into a major problem in the port of the WiFi SDK for an MSP432 + CC3120MOD project. I'm trying to set up a simple listening TCP server:
sl_Start appears to run fine, and a short time later my start callback function receives notification of startup in ROLE_AP as expected. Subsequent calls to sl_Socket, sl_SetSockOpt (to set it to non-blocking), sl_Bind, and sl_Listen all appear to return the expected results.
But the subsequent call to sl_Accept fails. The call appears to block in a semaphore Pend call until the Pend timeout value is hit, at which point it returns with -2005 (Internal Error). I also get a Fatal Error callback at that point, with an ID of 5 (Command Timeout) and Code 4099, Value 0 (no idea what that means).
I've done some further debugging with a 'scope to try to understand the sequence of events in more depth (all timing approximate):
- About 60us after sl_Accept is called, a semaphore Pend is entered;
- About 200us later, the module IRQ line goes high; My interrupt dispatcher runs the registered SDK interrupt routine, a semaphore Post is generated, the Pend is released, and the module IRQ line returns to low; The interrupt routine returns.... so far so good.....
- About 150us later, a semaphore Pend is again entered - this is the one that eventually times out;
- About 100us later, the module IRQ line goes high, and my interrupt dispatcher runs the registered SDK interrupt routine again; But the interrupt routine returns, the module IRQ line is left at high state (?), and no semaphore Post is generated..... so the Pend continues to block until eventual timeout and failure....
Development setup is a CC3120MOD Boosterpack mounted on an MSP432 Boosterpack, programmed with IAR development environment V8.11. Software is running on bare metal, no RTOS.
I'd be very grateful for any thoughts or suggestions from anyone with more detailed knowledge of the workings of the SDK.... I'm at a dead end and can't really allocate too much more time to trying to debug this, so I think I'm going to have to abandon using this module, which would be a shame.... it seems so close to working....
(Just to clarify: I've also tried this without setting the socket to non-blocking, and I get exactly the same failure at sl_Accept).
Thanks and Best wishes,
John