How do event groups utilize timers?

I’m trying to understand more about how event groups interact with timers. It seems that enabling timers is necessary to use event groups and that they use a global task called Tmr. I’m having trouble finding any mention of how exactly an event group interacts with the timer system in FreeRTOS. There’s no mention of it in the API or book that I’ve been able to find, though I feel like I may just be missing something obvious.

I recently started using event groups for the first time as previously direct to task notifications were sufficient for most projects. I found that after enabling them we started getting occasional failures due to a stack overflow in the Tmr task when it was using the default stack size of 40. Simply increasing the stack size seems to have fixed the problem but I would be more comfortable with the fix if I understood how the timer task interacts with event groups and particularly what influences its stack size.

Only the event group functions that are called from interrupts (those that end in FromISR) use the timer task (which is also called the RTOS daemon task). See https://www.freertos.org/xEventGroupSetBitsFromISR.html for more info. Are you using event groups from interrupts?

Yes I am. Basically I need to have multiple sets of flags because they are in different modules and are checked / cleared at different times, even though they may exist in the same task, hence why I am not simply using direct-to-task notifications in this case. The flags are set from a variety of different interrupts but then cleared in the task.

Ok, that xEventGroupSetBitsFromISR documentation is very useful. I must have missed that paragraph when originally going through the docs. Though it still doesn’t shed light on the stack overflow I was seeing.