I am new to freeRTOS and i am trying to learn synchronization, i have 2 tasks that i am trying to synchronize with queues. Both tasks have the same priority, one to send 100 values and the other to receive the 100 values, i am trying to send every 50ms and receive every 20ms for example. This the code i have done for now :
The output is not what i really desire, it receives only 13 values so it display from 0 to 12. i don’t really know why. Any help would be appreciated. Thanks in advance
You are right it is a global variable. but i just tried it with different variables and still the same thing i can not recover the whole values in the queue.
/* Send an unsigned long. Wait for 10 ticks for space to become
available if necessary. */
if( xQueueSend( xQueue1,
( void * ) &ulVar,
( TickType_t ) 10 ) != pdPASS )
{
/* Failed to post the message, even after 10 ticks. */
}