One possibility is to use the direct to task notification as a lightweight mailbox. The direct to task notifications can only hold a single 32-bit value. You can do anything you want with this value.
The code snippet below will wait forever for any write to the 0’th task notification (there is more than 1). When another task writes to the notification, this function will unblock and check the notification for non-zero. If it is non-zero the display can be refreshed. If it is zero, this can go back to sleep. This function will automatically clear the notification value to zero when it exits so it will always to to sleep with a zero in the notification.
void vAnEventProcessingTask( void *pvParameters )
for( ;; )
xTaskNotifyWaitIndexed( 0, /* Wait for 0th notification. */
0x00, /* Don't clear any notification bits on entry. */
ULONG_MAX, /* Reset the notification value to 0 on exit. */
&ulNotifiedValue, /* Notified value pass out in
portMAX_DELAY ); /* Block indefinitely. */
if( ( ulNotifiedValue ) != 0 )
// update the display
Sadly, this function will wake on ANY write to the notification and not simply writes of non-zero values. But the check for zero is very fast so you will spend most of your time blocked and doing other tasks.
For more information on task notifications follow this link: