<?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>Wireless MCUのトピックKW38 FreeRTOS task preemptive</title>
    <link>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1519169#M13656</link>
    <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am confuse in FreeRTOS task,&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to my using experience task do not need&amp;nbsp; yield if task will auto preemptive.&lt;/P&gt;&lt;P&gt;I saw&amp;nbsp;taskYIELD() in sample project "freertos_mutex",&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I want task will auto preemptive without yield, how should I config?&lt;/P&gt;&lt;P&gt;Is it possible scheduler task like below?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Ho_0-1662627551432.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/192961iD035F6A21DADDC2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Adam_Ho_0-1662627551432.png" alt="Adam_Ho_0-1662627551432.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
    <pubDate>Thu, 08 Sep 2022 09:00:06 GMT</pubDate>
    <dc:creator>Adam_Ho</dc:creator>
    <dc:date>2022-09-08T09:00:06Z</dc:date>
    <item>
      <title>KW38 FreeRTOS task preemptive</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1519169#M13656</link>
      <description>&lt;P&gt;Hi all,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am confuse in FreeRTOS task,&amp;nbsp;&lt;/P&gt;&lt;P&gt;According to my using experience task do not need&amp;nbsp; yield if task will auto preemptive.&lt;/P&gt;&lt;P&gt;I saw&amp;nbsp;taskYIELD() in sample project "freertos_mutex",&amp;nbsp;&lt;/P&gt;&lt;P&gt;If I want task will auto preemptive without yield, how should I config?&lt;/P&gt;&lt;P&gt;Is it possible scheduler task like below?&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Ho_0-1662627551432.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/192961iD035F6A21DADDC2A/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Adam_Ho_0-1662627551432.png" alt="Adam_Ho_0-1662627551432.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 08 Sep 2022 09:00:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1519169#M13656</guid>
      <dc:creator>Adam_Ho</dc:creator>
      <dc:date>2022-09-08T09:00:06Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 FreeRTOS task preemptive</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1520727#M13678</link>
      <description>&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/205916"&gt;@Adam_Ho&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your time and contacting NXP support.&lt;/P&gt;
&lt;P&gt;In this case if the preemption is active (in code &lt;STRONG&gt;configUSE_PREEMPTION&lt;/STRONG&gt; value 1), in the example is 0 for default that is the reason why the task yield() is being used.&lt;/P&gt;
&lt;P&gt;So if the &lt;STRONG&gt;configUSE_PREEMPTION&lt;/STRONG&gt; is active (==1) a yield should not be performed just because a higher priority task has been woke.&lt;/P&gt;
&lt;P&gt;Please let me know if you find this information useful, or if you have any other question I will be happy to assist you.&lt;/P&gt;
&lt;P&gt;Also as additional please find on the official freeRTOS site some extra details regarding the yield task.&lt;/P&gt;
&lt;P&gt;&lt;A title="freeRTOS Task Yield" href="https://www.freertos.org/a00020.html#taskYIELD" target="_blank" rel="noopener"&gt;freeRTOS Task Yield&lt;/A&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Mon, 12 Sep 2022 21:00:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1520727#M13678</guid>
      <dc:creator>nxf77486</dc:creator>
      <dc:date>2022-09-12T21:00:32Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 FreeRTOS task preemptive</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1521066#M13681</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/190340"&gt;@nxf77486&lt;/a&gt;&amp;nbsp;,&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for reply,&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have compared two project&amp;nbsp; "&lt;EM&gt;frdmkw38_freertos_mutex&lt;/EM&gt;" and "&lt;EM&gt;frdmkw38_adv_ext_peripheral_freertos&lt;/EM&gt;".&lt;/P&gt;&lt;P&gt;1. In "&lt;EM&gt;frdmkw38_freertos_mutex&lt;/EM&gt;" I config&amp;nbsp;&lt;STRONG&gt;configUSE_PREEMPTION&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;== 1, and create same priority task like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Ho_0-1663056851688.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/193418iF63C86AB2F72E1F4/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Adam_Ho_0-1663056851688.png" alt="Adam_Ho_0-1663056851688.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The uart log looks like work well&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Ho_1-1663056923596.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/193419iC0971E27ECC50152/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Adam_Ho_1-1663056923596.png" alt="Adam_Ho_1-1663056923596.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;2. In "&lt;EM&gt;frdmkw38_adv_ext_peripheral_freertos&lt;/EM&gt;" I config&amp;nbsp;&lt;STRONG&gt;configUSE_PREEMPTION&lt;/STRONG&gt;&lt;SPAN&gt;&amp;nbsp;== 1, and create same priority task like below:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="Adam_Ho_2-1663057192753.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/193420i9B579619FA5C34C3/image-size/medium?v=v2&amp;amp;px=400" role="button" title="Adam_Ho_2-1663057192753.png" alt="Adam_Ho_2-1663057192753.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;These two project I use the same method to create task but I got defferent result, where is the different?&lt;/P&gt;&lt;P&gt;It seems not useful to config "&lt;EM&gt;FreeRTOSConfig.h&lt;/EM&gt;", isn't it?&lt;/P&gt;</description>
      <pubDate>Tue, 13 Sep 2022 08:23:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1521066#M13681</guid>
      <dc:creator>Adam_Ho</dc:creator>
      <dc:date>2022-09-13T08:23:56Z</dc:date>
    </item>
    <item>
      <title>Re: KW38 FreeRTOS task preemptive</title>
      <link>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1527503#M13738</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Hello &lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/205916"&gt;@Adam_Ho&lt;/a&gt;&amp;nbsp;,&lt;/P&gt;
&lt;P&gt;In example frdmkw38_adv_ext_peripheral_freertos the&amp;nbsp; configUSE_PREEMPTION for this example project is configured as 1 for default, it is necessary for the configuration to use the FreeRTOOSConfig.h to determine the preemption. Can you please share your task configuration.&lt;/P&gt;</description>
      <pubDate>Fri, 23 Sep 2022 17:33:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Wireless-MCU/KW38-FreeRTOS-task-preemptive/m-p/1527503#M13738</guid>
      <dc:creator>nxf77486</dc:creator>
      <dc:date>2022-09-23T17:33:41Z</dc:date>
    </item>
  </channel>
</rss>

