Tool/software:
I am using FreeRTOS on CC2340R5.
I want to process at 60Hz as accurately as possible.
However, since the xTaskDelayUntil function can only be specified in milliseconds, there will be a slight deviation.
How can I process at 60Hz as accurately as possible?
#define WAIT_MS (16) void *mainThread(void *arg0) { MyInitialize(); TickType_t previousWakeTime; previousWakeTime = xTaskGetTickCount(); while (1) { if (xTaskDelayUntil(&previousWakeTime, WAIT_MS) != pdTRUE) { } MyProcess(); } }