…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.