<?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 MQX task is blocking in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1465586#M63181</link>
    <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am using K22, 1M flash microcontroller&lt;/P&gt;&lt;P&gt;MQX 4.2&lt;/P&gt;&lt;P&gt;I am getting a strange error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sending data on SPI bus. I need to send it 84 packets (2 byte each), one after another, without delay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everytime after 10-100 loops, my task is getting hanged. After debugging MQX tad, it says&amp;nbsp;LWSEM_BLOCKED.&lt;/P&gt;&lt;P&gt;If I give 5 ms delay in between SPI calls then it is working good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My task is MQX_TIME_SLICE_TASK.&lt;/P&gt;&lt;P&gt;I am using SPI0 port. no other task is using SPI0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 other task is using SPI 1. I tried blocking that task but no impact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each of the 84 time, I send use instruction&lt;/P&gt;&lt;P&gt;numberOfBytesSent_pwm = fwrite (Data_toSend_PWM, 1, 2, SPI0_FD);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sudhanshumehta_0-1653656279215.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/181527iC34100D3B440D80C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sudhanshumehta_0-1653656279215.png" alt="sudhanshumehta_0-1653656279215.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Fri, 27 May 2022 12:58:38 GMT</pubDate>
    <dc:creator>sudhanshumehta</dc:creator>
    <dc:date>2022-05-27T12:58:38Z</dc:date>
    <item>
      <title>MQX task is blocking</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1465586#M63181</link>
      <description>&lt;P&gt;Hello&lt;/P&gt;&lt;P&gt;I am using K22, 1M flash microcontroller&lt;/P&gt;&lt;P&gt;MQX 4.2&lt;/P&gt;&lt;P&gt;I am getting a strange error.&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am sending data on SPI bus. I need to send it 84 packets (2 byte each), one after another, without delay.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Everytime after 10-100 loops, my task is getting hanged. After debugging MQX tad, it says&amp;nbsp;LWSEM_BLOCKED.&lt;/P&gt;&lt;P&gt;If I give 5 ms delay in between SPI calls then it is working good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;My task is MQX_TIME_SLICE_TASK.&lt;/P&gt;&lt;P&gt;I am using SPI0 port. no other task is using SPI0.&amp;nbsp;&lt;/P&gt;&lt;P&gt;1 other task is using SPI 1. I tried blocking that task but no impact.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;each of the 84 time, I send use instruction&lt;/P&gt;&lt;P&gt;numberOfBytesSent_pwm = fwrite (Data_toSend_PWM, 1, 2, SPI0_FD);&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sudhanshumehta_0-1653656279215.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/181527iC34100D3B440D80C/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sudhanshumehta_0-1653656279215.png" alt="sudhanshumehta_0-1653656279215.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 27 May 2022 12:58:38 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1465586#M63181</guid>
      <dc:creator>sudhanshumehta</dc:creator>
      <dc:date>2022-05-27T12:58:38Z</dc:date>
    </item>
    <item>
      <title>Re: MQX task is blocking</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1466983#M63204</link>
      <description>&lt;P&gt;any suggestion team?&lt;/P&gt;</description>
      <pubDate>Tue, 31 May 2022 19:23:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1466983#M63204</guid>
      <dc:creator>sudhanshumehta</dc:creator>
      <dc:date>2022-05-31T19:23:32Z</dc:date>
    </item>
    <item>
      <title>Re: MQX task is blocking</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1474488#M63343</link>
      <description>&lt;P&gt;Hi&lt;/P&gt;
&lt;P&gt;Not sure about your issue. But&amp;nbsp;I know there is a MQX patch 4.2.0.2, it fixed one issue about SPI.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="danielchen_0-1655299621141.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183480iAE24BCB3F615F9C2/image-size/medium?v=v2&amp;amp;px=400" role="button" title="danielchen_0-1655299621141.png" alt="danielchen_0-1655299621141.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Did you apply this patch?&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regards&lt;/P&gt;
&lt;P&gt;Daniel&lt;/P&gt;</description>
      <pubDate>Wed, 15 Jun 2022 13:28:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1474488#M63343</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2022-06-15T13:28:44Z</dc:date>
    </item>
    <item>
      <title>Re: MQX task is blocking</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1474512#M63344</link>
      <description>&lt;P&gt;my finding was i was exceeding allocated time for this task. if i give delay after every SPI command, i am good.&amp;nbsp;&lt;/P&gt;&lt;P&gt;what is good way yo increase allocated time to task, do we have any example.&amp;nbsp;&lt;/P&gt;&lt;P&gt;i have read from Forum, they are saying to change this number. i did but not able to increase task allocated time.&lt;/P&gt;&lt;P&gt;1) i want to set 100ms time to this task. there are so many things in this task. what is the way&lt;/P&gt;&lt;P&gt;2) if we give time_delay in 1 task my task is switching to other task. is there is way that we give delay and task do not switch to other task. this i am asking in general as i am working ion MQX&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="sudhanshumehta_0-1655301299732.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/183487i207DD2971997A7BC/image-size/medium?v=v2&amp;amp;px=400" role="button" title="sudhanshumehta_0-1655301299732.png" alt="sudhanshumehta_0-1655301299732.png" /&gt;&lt;/span&gt;&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;</description>
      <pubDate>Wed, 15 Jun 2022 14:28:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/MQX-task-is-blocking/m-p/1474512#M63344</guid>
      <dc:creator>sudhanshumehta</dc:creator>
      <dc:date>2022-06-15T14:28:58Z</dc:date>
    </item>
  </channel>
</rss>

