Re: MQX Watchdogs for Multiple Tasks V2

cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 

Re: MQX Watchdogs for Multiple Tasks V2

865 Views
rageshskutty
Contributor I

How to detect task starves using MQX watchdog

In the MQX users Guide its said that using MQX watchdog component we can detect task starvation.

"The MQX watchdog component provides a software watchdog for each task. If a single

task starves or runs beyond certain timing constraints, the watchdog provides a way to detect the problem."

Examples in the user guide and reference manual demonstrate dead line monitoring. How can i make MQX watchdog component to monitor task starvation.

2 Replies

429 Views
DavidS
NXP Employee
NXP Employee

Hi Ragesh,

Attached is MQX4.0.2+TWR-K60D100M ~mqx/examples/watchdog project.

I have a main task that initializes two other tasks that run round robin (i.e. same task priority level).

The main task will start the on-chip WDOG module as well.  This is used to reset the MCU after a MQX watchdog has expired.

It is a simple example that alternates which TEST_TASKx times out first.  In the MQX watchdog isr we printout information about the task that timed out.  After this we notify the main task.  The main task shuts down and blocks to allow the on-chip WDOG module to reset the MCU.

Being simple example there is plenty of room to change it to try to re-initialization of a task that expired, or do logging or other.  We could even issue a software reset rather than use the WDOG.  But every system is different and difficult to have example software for every scenario.

Hopefully this helps you.

Regards,

David

429 Views
rageshskutty
Contributor I

Dear David,

Thanks for the reply,

In the example provided in the user guide there is only one main task which creates a watchdog and invoke a function which consumes time, the confusion comes when you see that the watchdog module has no handle and is created in the same task.

If the example was for at least two tasks it would have been more self explanatory and we would not have to look at watchdog module implementation to have a clear idea.

Regards

Ragesh S. Kutty

0 Kudos