<?xml version="1.0" encoding="UTF-8"?>
<rss xmlns:content="http://purl.org/rss/1.0/modules/content/" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:rdf="http://www.w3.org/1999/02/22-rdf-syntax-ns#" xmlns:taxo="http://purl.org/rss/1.0/modules/taxonomy/" version="2.0">
  <channel>
    <title>topic watchdog for roundrobin tasks in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186902#M3323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I wrote a sample code (please see the attachment) to use &amp;nbsp;watchdog timer for two roundrabin tasks.&amp;nbsp;when I have only one task (e.g. only simulated_ISR_task_1) it &amp;nbsp;works well but when I add the second task &amp;nbsp;(simulated_ISR_task_2) it stops work. I've check the MQX &amp;nbsp;plugin tool. it didn't show any error or something wrong! any&lt;BR /&gt;suggestion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;mqx.h&amp;gt;&lt;BR /&gt;#include &amp;lt;bsp.h&amp;gt;&lt;BR /&gt;#include &amp;lt;event.h&amp;gt;&lt;BR /&gt;#include &amp;lt;watchdog.h&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Task IDs */&lt;BR /&gt;#define MAIN_TASK 5&lt;BR /&gt;#define ISR_1_TASK 6&lt;BR /&gt;#define ISR_2_TASK 7&lt;/P&gt;&lt;P&gt;/* Function prototypes */&lt;BR /&gt;extern void simulated_ISR_task_1(uint_32);&lt;BR /&gt;extern void simulated_ISR_task_2(uint_32);&lt;BR /&gt;extern void main_task(uint_32);&lt;BR /&gt;extern void handle_watchdog_expiry_1(pointer);&lt;BR /&gt;extern void handle_watchdog_expiry_2(pointer);&lt;/P&gt;&lt;P&gt;const TASK_TEMPLATE_STRUCT MQX_template_list[] =&lt;BR /&gt;{&lt;BR /&gt;/* Task Index, Function, Stack, Priority, Name, Attributes, Param, Time Slice */&lt;BR /&gt;{ MAIN_TASK, main_task, 2000, 8, "service", MQX_AUTO_START_TASK, 0, 0 },&lt;BR /&gt;{ ISR_1_TASK, simulated_ISR_task_1, 2000, 9, "simulated_ISR1", MQX_TIME_SLICE_TASK, 0, 1 },&lt;BR /&gt;{ ISR_2_TASK, simulated_ISR_task_2, 2000, 9, "simulated_ISR2", MQX_TIME_SLICE_TASK, 0, 1 },&lt;BR /&gt;{ 0 } };&lt;/P&gt;&lt;P&gt;/*TASK*-----------------------------------------------------&lt;BR /&gt;*&lt;BR /&gt;* Task Name : simulated_ISR_task&lt;BR /&gt;* Comments :&lt;BR /&gt;* This task opens a connection to the event group. After&lt;BR /&gt;* delaying, it sets the event bits.&lt;BR /&gt;*END*-----------------------------------------------------*/&lt;/P&gt;&lt;P&gt;void handle_watchdog_expiry_1(pointer td_ptr)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;_mqx_uint event_bits;&lt;/P&gt;&lt;P&gt;printf("expire_1\n\r");&lt;BR /&gt;fflush(stdout);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void handle_watchdog_expiry_2(pointer td_ptr)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;_mqx_uint event_bits;&lt;/P&gt;&lt;P&gt;printf("expire_2\n\r");&lt;BR /&gt;fflush(stdout);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void simulated_ISR_task_1(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;MQX_TICK_STRUCT ticks;&lt;BR /&gt;_mqx_uint result;&lt;/P&gt;&lt;P&gt;_time_init_ticks(&amp;amp;ticks, 10);&lt;/P&gt;&lt;P&gt;result = _watchdog_create_component(BSP_TIMER_INTERRUPT_VECTOR,&lt;BR /&gt;handle_watchdog_expiry_1);&lt;/P&gt;&lt;P&gt;printf(" restart1 \n");&lt;/P&gt;&lt;P&gt;while (TRUE)&lt;BR /&gt;{&lt;BR /&gt;result = _watchdog_start_ticks(&amp;amp;ticks);&lt;BR /&gt;_time_delay(100);&lt;BR /&gt;_watchdog_stop();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void simulated_ISR_task_2(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;MQX_TICK_STRUCT ticks;&lt;BR /&gt;_mqx_uint result;&lt;/P&gt;&lt;P&gt;_time_init_ticks(&amp;amp;ticks, 10);&lt;/P&gt;&lt;P&gt;result = _watchdog_create_component(BSP_TIMER_INTERRUPT_VECTOR,&lt;BR /&gt;handle_watchdog_expiry_2);&lt;/P&gt;&lt;P&gt;printf(" restart2 \n");&lt;/P&gt;&lt;P&gt;while (TRUE)&lt;BR /&gt;{&lt;BR /&gt;result = _watchdog_start_ticks(&amp;amp;ticks);&lt;BR /&gt;_time_delay(100);&lt;BR /&gt;_watchdog_stop();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*TASK*-----------------------------------------------------&lt;BR /&gt;*&lt;BR /&gt;* Task Name : service_task&lt;BR /&gt;* Comments :&lt;BR /&gt;* This task creates an event group and the simulated_ISR_task&lt;BR /&gt;* task. It opens a connection to the event group and waits.&lt;BR /&gt;* After the appropriate event bit has been set, it clears&lt;BR /&gt;* the event bit and prints "Tick."&lt;BR /&gt;*END*-----------------------------------------------------*/&lt;/P&gt;&lt;P&gt;void main_task(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;_task_id task_id_1, task_id_2;&lt;BR /&gt;_mqx_uint event_bits;&lt;/P&gt;&lt;P&gt;/* Create the ISR task */&lt;BR /&gt;task_id_1 = _task_create(0, ISR_1_TASK, 0);&lt;BR /&gt;if (task_id_1 == MQX_NULL_TASK_ID)&lt;BR /&gt;{&lt;BR /&gt;printf("Could not create simulated_ISR1_task \n");&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Create the ISR task */&lt;BR /&gt;task_id_2 = _task_create(0, ISR_2_TASK, 0);&lt;BR /&gt;if (task_id_2 == MQX_NULL_TASK_ID)&lt;BR /&gt;{&lt;BR /&gt;printf("Could not create simulated_ISR2_task \n");&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;while (TRUE)&lt;BR /&gt;{&lt;BR /&gt;_time_delay(1000);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* EOF */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 08 Aug 2012 05:00:10 GMT</pubDate>
    <dc:creator>amleng</dc:creator>
    <dc:date>2012-08-08T05:00:10Z</dc:date>
    <item>
      <title>watchdog for roundrobin tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186902#M3323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi ,&lt;/P&gt;&lt;P&gt;I wrote a sample code (please see the attachment) to use &amp;nbsp;watchdog timer for two roundrabin tasks.&amp;nbsp;when I have only one task (e.g. only simulated_ISR_task_1) it &amp;nbsp;works well but when I add the second task &amp;nbsp;(simulated_ISR_task_2) it stops work. I've check the MQX &amp;nbsp;plugin tool. it didn't show any error or something wrong! any&lt;BR /&gt;suggestion?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;#include &amp;lt;mqx.h&amp;gt;&lt;BR /&gt;#include &amp;lt;bsp.h&amp;gt;&lt;BR /&gt;#include &amp;lt;event.h&amp;gt;&lt;BR /&gt;#include &amp;lt;watchdog.h&amp;gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;/* Task IDs */&lt;BR /&gt;#define MAIN_TASK 5&lt;BR /&gt;#define ISR_1_TASK 6&lt;BR /&gt;#define ISR_2_TASK 7&lt;/P&gt;&lt;P&gt;/* Function prototypes */&lt;BR /&gt;extern void simulated_ISR_task_1(uint_32);&lt;BR /&gt;extern void simulated_ISR_task_2(uint_32);&lt;BR /&gt;extern void main_task(uint_32);&lt;BR /&gt;extern void handle_watchdog_expiry_1(pointer);&lt;BR /&gt;extern void handle_watchdog_expiry_2(pointer);&lt;/P&gt;&lt;P&gt;const TASK_TEMPLATE_STRUCT MQX_template_list[] =&lt;BR /&gt;{&lt;BR /&gt;/* Task Index, Function, Stack, Priority, Name, Attributes, Param, Time Slice */&lt;BR /&gt;{ MAIN_TASK, main_task, 2000, 8, "service", MQX_AUTO_START_TASK, 0, 0 },&lt;BR /&gt;{ ISR_1_TASK, simulated_ISR_task_1, 2000, 9, "simulated_ISR1", MQX_TIME_SLICE_TASK, 0, 1 },&lt;BR /&gt;{ ISR_2_TASK, simulated_ISR_task_2, 2000, 9, "simulated_ISR2", MQX_TIME_SLICE_TASK, 0, 1 },&lt;BR /&gt;{ 0 } };&lt;/P&gt;&lt;P&gt;/*TASK*-----------------------------------------------------&lt;BR /&gt;*&lt;BR /&gt;* Task Name : simulated_ISR_task&lt;BR /&gt;* Comments :&lt;BR /&gt;* This task opens a connection to the event group. After&lt;BR /&gt;* delaying, it sets the event bits.&lt;BR /&gt;*END*-----------------------------------------------------*/&lt;/P&gt;&lt;P&gt;void handle_watchdog_expiry_1(pointer td_ptr)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;_mqx_uint event_bits;&lt;/P&gt;&lt;P&gt;printf("expire_1\n\r");&lt;BR /&gt;fflush(stdout);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void handle_watchdog_expiry_2(pointer td_ptr)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;_mqx_uint event_bits;&lt;/P&gt;&lt;P&gt;printf("expire_2\n\r");&lt;BR /&gt;fflush(stdout);&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void simulated_ISR_task_1(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;MQX_TICK_STRUCT ticks;&lt;BR /&gt;_mqx_uint result;&lt;/P&gt;&lt;P&gt;_time_init_ticks(&amp;amp;ticks, 10);&lt;/P&gt;&lt;P&gt;result = _watchdog_create_component(BSP_TIMER_INTERRUPT_VECTOR,&lt;BR /&gt;handle_watchdog_expiry_1);&lt;/P&gt;&lt;P&gt;printf(" restart1 \n");&lt;/P&gt;&lt;P&gt;while (TRUE)&lt;BR /&gt;{&lt;BR /&gt;result = _watchdog_start_ticks(&amp;amp;ticks);&lt;BR /&gt;_time_delay(100);&lt;BR /&gt;_watchdog_stop();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;void simulated_ISR_task_2(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;MQX_TICK_STRUCT ticks;&lt;BR /&gt;_mqx_uint result;&lt;/P&gt;&lt;P&gt;_time_init_ticks(&amp;amp;ticks, 10);&lt;/P&gt;&lt;P&gt;result = _watchdog_create_component(BSP_TIMER_INTERRUPT_VECTOR,&lt;BR /&gt;handle_watchdog_expiry_2);&lt;/P&gt;&lt;P&gt;printf(" restart2 \n");&lt;/P&gt;&lt;P&gt;while (TRUE)&lt;BR /&gt;{&lt;BR /&gt;result = _watchdog_start_ticks(&amp;amp;ticks);&lt;BR /&gt;_time_delay(100);&lt;BR /&gt;_watchdog_stop();&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/*TASK*-----------------------------------------------------&lt;BR /&gt;*&lt;BR /&gt;* Task Name : service_task&lt;BR /&gt;* Comments :&lt;BR /&gt;* This task creates an event group and the simulated_ISR_task&lt;BR /&gt;* task. It opens a connection to the event group and waits.&lt;BR /&gt;* After the appropriate event bit has been set, it clears&lt;BR /&gt;* the event bit and prints "Tick."&lt;BR /&gt;*END*-----------------------------------------------------*/&lt;/P&gt;&lt;P&gt;void main_task(uint_32 initial_data)&lt;BR /&gt;{&lt;BR /&gt;pointer event_ptr;&lt;BR /&gt;_task_id task_id_1, task_id_2;&lt;BR /&gt;_mqx_uint event_bits;&lt;/P&gt;&lt;P&gt;/* Create the ISR task */&lt;BR /&gt;task_id_1 = _task_create(0, ISR_1_TASK, 0);&lt;BR /&gt;if (task_id_1 == MQX_NULL_TASK_ID)&lt;BR /&gt;{&lt;BR /&gt;printf("Could not create simulated_ISR1_task \n");&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* Create the ISR task */&lt;BR /&gt;task_id_2 = _task_create(0, ISR_2_TASK, 0);&lt;BR /&gt;if (task_id_2 == MQX_NULL_TASK_ID)&lt;BR /&gt;{&lt;BR /&gt;printf("Could not create simulated_ISR2_task \n");&lt;BR /&gt;_task_block();&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;while (TRUE)&lt;BR /&gt;{&lt;BR /&gt;_time_delay(1000);&lt;BR /&gt;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;/* EOF */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 08 Aug 2012 05:00:10 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186902#M3323</guid>
      <dc:creator>amleng</dc:creator>
      <dc:date>2012-08-08T05:00:10Z</dc:date>
    </item>
    <item>
      <title>Re: watchdog for roundrobin tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186903#M3324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello amleng,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;watchdog component can register only one function to the interrupt vector,&amp;nbsp; the second time it fails because it was initialized already.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; _lwsem_wait((LWSEM_STRUCT_PTR)(&amp;amp;kernel_data-&amp;gt;COMPONENT_CREATE_LWSEM));&lt;BR /&gt;&amp;nbsp;&amp;nbsp; if (kernel_data-&amp;gt;KERNEL_COMPONENTS[KERNEL_WATCHDOG] != NULL) {&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _lwsem_post((LWSEM_STRUCT_PTR)(&amp;amp;kernel_data-&amp;gt;COMPONENT_CREATE_LWSEM));&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; _KLOGX2(KLOG_watchdog_create_component, MQX_OK);&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; return(MQX_OK);&lt;BR /&gt;&amp;nbsp;&amp;nbsp; } /* Endif */&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 20 Aug 2012 17:35:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186903#M3324</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-08-20T17:35:51Z</dc:date>
    </item>
    <item>
      <title>Re: watchdog for roundrobin tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186904#M3325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I know its not related to your problem but I'm curious why are you using fflush(stdio)?&lt;/P&gt;&lt;P&gt;Why flush?&lt;/P&gt;&lt;P&gt;What does it do?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 02:37:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186904#M3325</guid>
      <dc:creator>drummer</dc:creator>
      <dc:date>2012-08-21T02:37:27Z</dc:date>
    </item>
    <item>
      <title>Re: watchdog for roundrobin tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186905#M3326</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi drummer,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;fflush causes any buffered data in stream to be written to file. It returns 0 if it succeeded, otherwise EOF. You can check some reference webpages to find out more information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Its fflush(stdout), it shall not be used with stdin because this behavior is undefined.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;MartinK&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 14:35:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186905#M3326</guid>
      <dc:creator>c0170</dc:creator>
      <dc:date>2012-08-21T14:35:44Z</dc:date>
    </item>
    <item>
      <title>Is fflush defective in MQX 3.6  or am I?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186906#M3327</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;thanks for your response.&lt;/P&gt;&lt;P&gt;I have a task that looks after serial communications on one of three serial ports of the MCF52259.&lt;/P&gt;&lt;P&gt;Since the hardware interface is RS485 I control the direction through an I/O that is controlled by a timer.&lt;/P&gt;&lt;P&gt;All I have to do is turn on the I/O and timer isr turns it off. I used to wait until the timer was finished through 10 millisecond&lt;/P&gt;&lt;P&gt;time delays but thought that fflush would be faster since I don't need to time out anymore.&lt;/P&gt;&lt;P&gt;Like this...&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;ioctl(rsi_enable_fh, GPIO_IOCTL_WRITE_LOG1, NULL);&lt;BR /&gt;_time_delay(1);&lt;BR /&gt;rsi_timer = ((no_bytes + 1) * 44000/rsi_baud);&lt;BR /&gt;_io_write (rsi_fh, snd_buf,no_bytes );&lt;BR /&gt;fflush(rsi_fh);&lt;BR /&gt;// while(rsi_timer &amp;gt; 0)&lt;BR /&gt;// _time_delay(10);&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I let it run all last night and came back with the task in a "task queue blocked" and it never came back.&lt;/P&gt;&lt;P&gt;I am still using MQX version 3.6.&lt;/P&gt;&lt;P&gt;I suspect it was stuck in the fflush but can't be certain.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 21 Aug 2012 20:31:14 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186906#M3327</guid>
      <dc:creator>drummer</dc:creator>
      <dc:date>2012-08-21T20:31:14Z</dc:date>
    </item>
    <item>
      <title>Re: watchdog for roundrobin tasks</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186907#M3328</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Martin,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was trying to do the same thing.&amp;nbsp; In the MQX RTOS documentation you see the following:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;STRONG style="text-decoration: underline;"&gt;The MQX watchdog component provides a software watchdog for each task.&lt;/STRONG&gt; If a single&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; task starves or runs beyond certain timing constraints, the watchdog provides a way to&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; detect the problem. Initially, the task starts its watchdog with a specific time value, and if&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; the task fails to stop or restart the watchdog before that time expires, MQX calls a&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; processor-unique, application-supplied expiry function that can initiate error recovery.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Before a task can use the watchdog component, the application must explicitly create it&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; by calling _watchdog_create_component() &lt;STRONG style="text-decoration: underline;"&gt;with the interrupt vector of the periodic&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;SPAN style="text-decoration: underline;"&gt;&lt;STRONG&gt; t&lt;/STRONG&gt;&lt;STRONG&gt;imer device&lt;/STRONG&gt;&lt;/SPAN&gt; and a pointer to the function that MQX will call, if a watchdog expires.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The way it is written implies that you use the same interrupt vector each time (i.e. &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; font-size: 12.727272033691406px;"&gt;BSP_TIMER_INTERRUPT_VECTOR&lt;/SPAN&gt;).&amp;nbsp; &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So just for clarification for each task I have will need a separate timer interrupt vector associated with it.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is that correct?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Brent &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 28 Jan 2014 20:07:09 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186907#M3328</guid>
      <dc:creator>brentwilliams</dc:creator>
      <dc:date>2014-01-28T20:07:09Z</dc:date>
    </item>
    <item>
      <title>Re: Is fflush defective in MQX 3.6  or am I?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186908#M3329</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;i have also similar situation of &lt;SPAN style="color: #3d3d3d; font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif;"&gt;"Task Queue Blocked"&lt;/SPAN&gt;. how did you solve it?&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Sep 2014 19:44:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/watchdog-for-roundrobin-tasks/m-p/186908#M3329</guid>
      <dc:creator>VinGanZ</dc:creator>
      <dc:date>2014-09-24T19:44:40Z</dc:date>
    </item>
  </channel>
</rss>

