How to get timer task handle

jcolebaker
Posts: 64
Joined: Thu Mar 18, 2021 12:23 am

How to get timer task handle

Postby jcolebaker » Sun Aug 27, 2023 9:55 pm

I want to get the task handle for the timer daemon task.

There is a FreeRTOS function: xTimerGetTimerDaemonTaskHandle

However, it is disabled in FreeRTOSConfig.h (INCLUDE_xTimerGetTimerDaemonTaskHandle is 0) with the comment:

"Currently there is no need for this API"

Is there another API or easy way to get the timer task handle? I'd prefer not to hack/patch the ESP-IDF source to enable this function.

abellofiore
Posts: 10
Joined: Tue May 16, 2023 7:02 pm

Re: How to get timer task handle

Postby abellofiore » Tue Aug 29, 2023 6:49 pm

The task name is "Tmr Svc". Just use the following API in "task.h":

Code: Select all

TaskHandle_t xTaskGetHandle( const char * pcNameToQuery )

jcolebaker
Posts: 64
Joined: Thu Mar 18, 2021 12:23 am

Re: How to get timer task handle

Postby jcolebaker » Fri Sep 01, 2023 3:47 am

Thanks - That works well.

Who is online

Users browsing this forum: Baidu [Spider] and 133 guests