Setup: FreeRTOS version is V9.0.0 (comes from here, download link at file menu), port TMS570.
My current implementation uses wait on notification and timeout value on this notification to be able to react on different events along have a periodic execution in case of no event.
BaseType_t xResult = xTaskNotifyWait( pdFALSE, // Don’t clear bits on entry.
ULONG_MAX, // Clear all bits on exit.
&ulNotifiedValue, // Stores the notified value.
The problem is that this design don’t take into accompt the time to execute the thread itself. For instance, if it takes 200us to run my periodic thread of 1Khz, the resulting frequency will be around 800Hz instead of 1Khz.
A solution could be to use auto-reload timer to notify the task to run, which is in fact to use default timer task to notify my thread.
Is there another solution to make the thread more stand alone than using timer ?