Task wdt triggering while eventgroupwaitbits in task

Lavanya20
Posts: 4
Joined: Thu Jan 11, 2024 6:06 am

Task wdt triggering while eventgroupwaitbits in task

Postby Lavanya20 » Thu Feb 01, 2024 7:58 am

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?

ESP_Sprite
Posts: 9766
Joined: Thu Nov 26, 2015 4:08 am

Re: Task wdt triggering while eventgroupwaitbits in task

Postby ESP_Sprite » Thu Feb 01, 2024 8:28 am

Doesn't look like your issue is in the snippet that you posted.

MicroController
Posts: 1735
Joined: Mon Oct 17, 2022 7:38 pm
Location: Europe, Germany

Re: Task wdt triggering while eventgroupwaitbits in task

Postby MicroController » Thu Feb 01, 2024 9:38 am

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.

Who is online

Users browsing this forum: No registered users and 67 guests