My hardware has TI CC3135 wifi module and STM32L496 as the host controller. I have successfully integrated the CC3135 wifi SDK and AWS SDK (201906.00 Major 06/17/2019).
While running the OTA update demo, i am getting the below error.
…then looking at the definition of that function I see that it can fail in two ways - first it does not manage to obtain the semaphore and then from the log appears to retry (which would not be a fatal error), or it has exhausted the maximum number of available buffers set by otaconfigMAX_NUM_OTA_DATA_BUFFERS. In any case this does not seem to be a fatal error.
i have debugged and found that prvOTAPubMessageGet() is called from the Subscription callback when buffer is being used by prvIngestDataBlock() [xPublishBuffers[ulIndex].pxPubData.bBufferUsed is true.]
My understanding is while the processing of current received data block is in progress, next data block is received immediately. I think this is the cause, this problem is not appearing with the STM32 iot kit( B-L475E-IOT01A),
It seems the data blocks are received at much faster rate than they are written on the flash and not enough buffers are available. Can you please share what is the value of otaconfigMAX_NUM_BLOCKS_REQUEST ? You can try running by reducing this to number of buffers available i.e otaconfigMAX_NUM_OTA_DATA_BUFFERS .
Do you have any plan to move to the 202007.00 release ? We can use the flow control feature by configuring otaconfigMAX_NUM_BLOCKS_REQUEST. On release 201906.00 this feature is not available so otaconfigMAX_NUM_OTA_DATA_BUFFERS have to be increased.
I have fixed the buffer issue, TI driver uses a internal task to get the data which has a higher priority than _networkReceiveTask() present in AWS SDK,
After lowering the priority of TI driver task , code works correctly without any hiccups.
Thanks for the support, but still the issue with latest version is not solved i will try to provide the call stack as you asked