Can I use an idle hook function in FreeRTOS to perform low-priority tasks?

@Middleware & OS
Hello, can I use an idle hook function in FreeRTOS to perform low-priority tasks? My idle hook isn't being executed. Here's my configuration:
      void vApplicationIdleHook(void) {
          // Perform low-priority task
      }

What should I check?
Solution
@Boss lady If your idle hook isn't being executed, check that the idle hook is enabled in your FreeRTOSConfig.h file by setting configUSE_IDLE_HOOK to 1.
#define configUSE_IDLE_HOOK 1
,
check that your idle hook function is correctly implemented and matches the expected function signature.
void vApplicationIdleHook(void) {
    // Perform low-priority task
}
,
make sure that there are periods when no other tasks are ready to run so the idle task can execute.
Was this page helpful?