Page 1 of 1

Task wdt triggering while eventgroupwaitbits in task

Posted: Thu Feb 01, 2024 7:58 am
by Lavanya20
Hi,

I have created a task with xEventGroupWaitBits, to set the eventbit i using rtos timer callback function for every 10 sec. But I'm receiving task wdt trigger for every 5 sec.

xTaskCreate(Task, "Data Collector Task", 2048, NULL, configMAX_PRIORITIES, NULL) == pdTRUE;

dataTimer = xTimerCreate("Timer", 10*1000, pdTRUE, (void *)0,(TimerCallbackFunction_t)TimerCallBack);
xTimerStart(dataTimer, 0);
static void Task(void *pvParameters)
{
EventBits_t eventRecieved = 0;

while(1)
{
eventRecieved = xEventGroupWaitBits(dataEvent, Flag, pdTRUE, pdFALSE, portMAX_DELAY);

if((eventRecieved & Flag) == Flag)
{
...........
}
}
}
static void TimerCallBack(TimerHandle_t xTimer)
{
xEventGroupSetBits(dataEvent, Flag);
}

1.How should I avoid this task wdt ?
2. Any other way to handle wdt without deleting it?

Re: Task wdt triggering while eventgroupwaitbits in task

Posted: Thu Feb 01, 2024 8:28 am
by ESP_Sprite
Doesn't look like your issue is in the snippet that you posted.

Re: Task wdt triggering while eventgroupwaitbits in task

Posted: Thu Feb 01, 2024 9:38 am
by MicroController
using rtos timer callback function for every 10 sec
You sure about that?

Code: Select all

 xTimerCreate("Timer", 10*1000, ...
That's 10000 OS ticks, i.e. 10000/100=100 seconds with the default tick rate of 100Hz.