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
}

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
#define configUSE_IDLE_HOOK 1
, check that your idle hook function is correctly implemented and matches the expected function signature....
Jump to solution
2 Replies
Solution
Renuel Roberts
Renuel Roberts5mo ago
@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
#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
}
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.
Boss lady
Boss lady5mo ago
Thanks @Enthernet Code I applied this changes and it now runs smoothly
Want results from more Discord servers?
Add your server