Other Parts Discussed in Thread: AM3359
Hi TI,
Another product, another unique configuration, another set of issues we've found with CC3120MOD parts during test.
We noticed during some testing that when accessing the WLAN Profiles and then stopping the SL, we get the dreaded SL_API_ABORTED, we log the event callback and we get a CMD_TIMEOUT error.
To start with we are using the latest service packs (EDIT: Using 3.10.00.04) and latest SDK. Our operating system is FreeRTOS and our CPU is MSP432P4111. This is a totally different configuration (hw / sw and use case) from my other posts on the topic of CC3120MOD.
To capture the fault, I've captured the following signals:
1. TP_4, this is a test point used in firmware to indicate when we are entering and exiting the sl_WlanProfileGet() call
2. INTR: This is the interrupt signal from the CC3120MOD
3. SPI: As normal
4. ISR_UNMASK: This signal indicates when the SL driver has unmasked the interrupt
5. ISR_FIRE: As we are using FreeRTOS we have our ISR handler wake up a task, when this signal toggles we call _SlDrvRxIrqHandler(NULL) in a thread safe manor
The image below shows the following
Point 1. Start call to sl_WlanProfileGet()
Point 2: Finished call to sl_WlanProfileGet(), starting call to sl_Stop()
Point 3: SL driver is locked up, note the interrupt fires, but driver does nothing. The task blocks until the timeout occurs.
However when I insert a one second delay between calls to sl_WlanProfileGet() and sl_Stop(), I get the following successful result:
The following notes are made:
1. After about 0.8 Seconds the CC3120MOD fires an interrupt and this seems to all the driver to continue and permit the sl_Stop();
2. Adding 1 second delay before sl_Stop() ensures this interrupt does not get missed.
The demo code to re-produce the error is pasted below.
Attached is also the logic captures if needed.
Any thoughts TI?
Thanks.
void vCC3X20__DemoFault(void) { Lint16 s16Return; Lint16 s16Status; SlWlanSecParams_t SecParams; SlWlanGetSecParamsExt_t SecExtParams; Lint8 s8ProfileName[SL_WLAN_SSID_MAX_LENGTH]; Lint16 s16ProfileNameLength; Luint8 u8MACAddx6[6]; Luint32 u32Priority; // Start the SL s16Return = sl_Start(0, 0, 0); if(s16Return < 0) { // Fault // SL_API_ABORTED = -2005 which is the bad one. } else { // Debug MAP_GPIO_setOutputHighOnPin(C_BSP__TP__4); // Get the profile s16Status = sl_WlanProfileGet(0, (signed char *)&s8ProfileName[0], &s16ProfileNameLength, &u8MACAddx6[0], &SecParams, &SecExtParams, (unsigned long *)&u32Priority); if(s16Status < 0) { // Error } else { // Remove this statement, causes the fault vTaskDelay(1000); // Indicate when stop is occurring MAP_GPIO_setOutputLowOnPin(C_BSP__TP__4); // Stop now s16Return = sl_Stop(200); if(s16Return < 0) { //Error } else { // success } } } }