Will xQueueReceive with a portMAX_DELAY unblock as soon as there is one item in the queue buffer?

Will xQueueReceive with a portMAX_DELAY unblock as soon as there is one item in the queue buffer or does it wait until all data items have been added and the queue is full? i.e

Push onto queue:

		for(k = 0; k < nResult; k++)
		{
			if(xQueueSendToBack(txCircBuffTxHandle, &tempBuff[k], 0) != pdPASS)
			{
				circBufferOverunFlag = true;
				break;
			}
		}

Pop data from queue

		while(xQueueReceive(txCircBuffTxHandle, (char*)&chr, portMAX_DELAY) != errQUEUE_EMPTY && kItr < DMA_BUFF_TX_SIZE )
		{
				uart1DMABuffTx[kItr] = *chr;
				kItr++;
		}

As documented queues are item based and a xQueueReceive gets unblocked as soon as the queue gets non-empty.

Hi Hartmut,

Thanks for that.

It is what I thought. I did read all the documentation, but it didn’t put it like you have. I found it to be ambiguous as it doesn’t spell it out.

It turns out that I had a silly loop in my default task that was using 95+ percent of the cpu so the task using the queue wasn’t getting much time to run. It’s fixed now although I ended up using a circular buffer I wrote a few months ago which has a few more features than the FreeRTOS queue although it doesn’t provide for putting items at the head of the queue.

Best regards