<?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>MQX Software SolutionsのトピックHow do you keep a task that is normally on a 10ms interval from timing out?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-do-you-keep-a-task-that-is-normally-on-a-10ms-interval-from/m-p/203678#M4721</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tasks that are on a 10 ms time slice.&lt;/P&gt;&lt;P&gt;My understanding is that after 10ms each task will defer to the highest priority task.&lt;/P&gt;&lt;P&gt;Here is my template:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;const TASK_TEMPLATE_STRUCT MQX_template_list[] ={    /* Task Index, Function,   Stack,  Priority,    Name,  Attributes, Param,  Time Slice */{TELNET_TASK_ID, uTelnet_task,   1500, 10, "nc500_Telnet" , 0,   0,      0 },{HTTP_TASK_ID,   uhttp_task,   2500, 7,   "http" , 0,  0,      0 },{ARCNET_TASK_ID, uArcnet_task,   512, 9,   "Arcnet" , 0,  0,      0 },{SOCKET_TASK_ID,   uSocket_task,   1000, 7,   "Socket" , 0,   0,      0 },{LIF_TASK_ID, uLif_task,   700, 10,   "Lif" , 0,  0,      0 },{FLASH_UP_TASK_ID, uFlash_Up_task, 1000, 10,  "Flash_up" , MQX_AUTO_START_TASK,  0,      0 },{VNC_TASK_ID, uVNC_task, 3000, 10,   "VNC",   0,  0, 10},{A2D_TASK_ID, uA2D_task, 1000, 10, "A2D",   0,  0, 10},    {0,     0,    0,  0,   0,   0,      0,  0 }};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;My "VNC" and "A2D" tasks use a time slice of 10ms. My "Arcnet" task has a priority of 9 and "VNC&amp;nbsp; has a priority of 10.&lt;/P&gt;&lt;P&gt;During a memory write operation that takes longer than 10 ms to complete while in my VNC task the "Arcnet " task switches on and&amp;nbsp;changes the chip select on my hardware and when I return to the VNC task I am no longer selecting the correct memory chip.&lt;/P&gt;&lt;P&gt;I have tried disabling interrupts during big memory operations but didnt acheive good results.&lt;/P&gt;&lt;P&gt;I have also tried _sched_set_rr_interval(_task_get_id(),0);&lt;/P&gt;&lt;P&gt;but it didnt work also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 05 May 2011 23:37:51 GMT</pubDate>
    <dc:creator>boogy</dc:creator>
    <dc:date>2011-05-05T23:37:51Z</dc:date>
    <item>
      <title>How do you keep a task that is normally on a 10ms interval from timing out?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-do-you-keep-a-task-that-is-normally-on-a-10ms-interval-from/m-p/203678#M4721</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have two tasks that are on a 10 ms time slice.&lt;/P&gt;&lt;P&gt;My understanding is that after 10ms each task will defer to the highest priority task.&lt;/P&gt;&lt;P&gt;Here is my template:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;PRE&gt;const TASK_TEMPLATE_STRUCT MQX_template_list[] ={    /* Task Index, Function,   Stack,  Priority,    Name,  Attributes, Param,  Time Slice */{TELNET_TASK_ID, uTelnet_task,   1500, 10, "nc500_Telnet" , 0,   0,      0 },{HTTP_TASK_ID,   uhttp_task,   2500, 7,   "http" , 0,  0,      0 },{ARCNET_TASK_ID, uArcnet_task,   512, 9,   "Arcnet" , 0,  0,      0 },{SOCKET_TASK_ID,   uSocket_task,   1000, 7,   "Socket" , 0,   0,      0 },{LIF_TASK_ID, uLif_task,   700, 10,   "Lif" , 0,  0,      0 },{FLASH_UP_TASK_ID, uFlash_Up_task, 1000, 10,  "Flash_up" , MQX_AUTO_START_TASK,  0,      0 },{VNC_TASK_ID, uVNC_task, 3000, 10,   "VNC",   0,  0, 10},{A2D_TASK_ID, uA2D_task, 1000, 10, "A2D",   0,  0, 10},    {0,     0,    0,  0,   0,   0,      0,  0 }};&lt;/PRE&gt;&lt;P&gt;&amp;nbsp;My "VNC" and "A2D" tasks use a time slice of 10ms. My "Arcnet" task has a priority of 9 and "VNC&amp;nbsp; has a priority of 10.&lt;/P&gt;&lt;P&gt;During a memory write operation that takes longer than 10 ms to complete while in my VNC task the "Arcnet " task switches on and&amp;nbsp;changes the chip select on my hardware and when I return to the VNC task I am no longer selecting the correct memory chip.&lt;/P&gt;&lt;P&gt;I have tried disabling interrupts during big memory operations but didnt acheive good results.&lt;/P&gt;&lt;P&gt;I have also tried _sched_set_rr_interval(_task_get_id(),0);&lt;/P&gt;&lt;P&gt;but it didnt work also.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 May 2011 23:37:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-do-you-keep-a-task-that-is-normally-on-a-10ms-interval-from/m-p/203678#M4721</guid>
      <dc:creator>boogy</dc:creator>
      <dc:date>2011-05-05T23:37:51Z</dc:date>
    </item>
    <item>
      <title>Re: How do you keep a task that is normally on a 10ms interval from timing out?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/How-do-you-keep-a-task-that-is-normally-on-a-10ms-interval-from/m-p/203679#M4722</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;The functions;&amp;nbsp; _task_start_preemption() and &amp;nbsp;_task_stop_preemption() might work for you. . . assuming that none of your interrupt handlers cause the chip selects to change.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In your VNC task, follow these steps:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1) Call _task_stop_preemption()&lt;/P&gt;&lt;P&gt;2) perform the memory write&lt;/P&gt;&lt;P&gt;3) Call _task_start_preemption()&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;See MQX Reference Manual, Sect 2.1.287&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Disclaimer: I don't know what your software does, nor the implications of preventing other threads (tasks)&amp;nbsp;from running while you perform the memory write. . . Your original problem could be handled multiple ways, but the alternatives would likely involve significant changes to your app.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 May 2011 20:24:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/How-do-you-keep-a-task-that-is-normally-on-a-10ms-interval-from/m-p/203679#M4722</guid>
      <dc:creator>tr9</dc:creator>
      <dc:date>2011-05-10T20:24:53Z</dc:date>
    </item>
  </channel>
</rss>

