I want to implement periodic task check in separate supervisor task, which resets WDT counter after receiving tasks from all other tasks.
Code: Select all
msg_t Task1()
{
while(1)
{
chEvtSignal(hSupervisor, Event1);
...
}
}
msg_t Task2()
{
while(1)
{
chEvtSignal(hSupervisor, Event2);
...
}
}
msg_t Supervisor()
{
while(1)
{
chEvtWaitAll(Event1 | Event2);
resetWDT();
..
}
}But I receive both events very rarely, and MCU resets periodically. I send both events every 250ms, and WDT period is 2 sec. May be I do something wrong with events?