Strange Assert on queue.c

ranco9 wrote on Monday, April 13, 2015:


I am getting the next Assert fail:
configASSERT( !( ( pvItemToQueue == NULL ) && ( pxQueue->uxItemSize != ( UBaseType_t ) 0U ) ) );

on function:
BaseType_t xQueueGenericSend( QueueHandle_t xQueue, const void * const pvItemToQueue, TickType_t xTicksToWait, const BaseType_t xCopyPosition )

when executing this line:
bPass &= xQueueSendToBack(f_xBtQueue,(void *)0,50 / portTICK_RATE_MS);

SW works well but it seems i can’t pass a zero to the queue without getting this assert, does it make sense?

Thank you &
Best Regards,

dumarjo wrote on Monday, April 13, 2015:


you should pass an address of variable in the xQueueSendToBack. The
xQueueSendToBack will copy the data from your variable to the internal
Queue buffer.


bPass &= xQueueSendToBack(f_xBtQueue,(void *)0,50 / portTICK_RATE_MS);

should lokk like this:

char value = 0;
bPass &= xQueueSendToBack(f_xBtQueue,&value,50 / portTICK_RATE_MS);



ranco9 wrote on Tuesday, April 14, 2015:

OK. Thanks!