<?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 K60 Multithreading in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652537#M39740</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using TWR-K60N512, with PK60DN512Z VMD10 chip and Codewarrior 10.5. Can the K60 do multithreading in baremetal project? If so how do I accomplish that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I'm not too sure if multithreading is the right term for this, I'm not a software/computer science/engineering major... Anyway, my desired application is to designate a thread to run a control loop at an&amp;nbsp;interval 'x'&amp;nbsp;ms, another thread to perform heavy duty calculations every 'y' ms, and another thread to listen for user input at a much slower rate. They all run simultaneously.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 26 Sep 2016 19:03:23 GMT</pubDate>
    <dc:creator>broccolee</dc:creator>
    <dc:date>2016-09-26T19:03:23Z</dc:date>
    <item>
      <title>K60 Multithreading</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652537#M39740</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I am using TWR-K60N512, with PK60DN512Z VMD10 chip and Codewarrior 10.5. Can the K60 do multithreading in baremetal project? If so how do I accomplish that?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;I'm not too sure if multithreading is the right term for this, I'm not a software/computer science/engineering major... Anyway, my desired application is to designate a thread to run a control loop at an&amp;nbsp;interval 'x'&amp;nbsp;ms, another thread to perform heavy duty calculations every 'y' ms, and another thread to listen for user input at a much slower rate. They all run simultaneously.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;Thanks.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 19:03:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652537#M39740</guid>
      <dc:creator>broccolee</dc:creator>
      <dc:date>2016-09-26T19:03:23Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Multithreading</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652538#M39741</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It all depends on your needs. So certainly you could do this, and you could write a mini scheduler based on one or more timers. Or do your three 'tasks' in three timer interrupts with the correct nesting (see for example the series starting with&amp;nbsp;&lt;A class="link-titled" href="https://mcuoneclipse.com/2016/08/14/arm-cortex-m-interrupts-and-freertos-part-1/" title="https://mcuoneclipse.com/2016/08/14/arm-cortex-m-interrupts-and-freertos-part-1/"&gt;https://mcuoneclipse.com/2016/08/14/arm-cortex-m-interrupts-and-freertos-part-1/&lt;/A&gt;&amp;nbsp; about the NVIC nesting).&lt;/P&gt;&lt;P&gt;Using a small RTOS like FreeRTOS would be my preferred option for this as it simplies things a lot and costs your nearly no execution time. But again, it is up to your needs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I hope this helps,&lt;/P&gt;&lt;P&gt;Erich&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 19:12:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652538#M39741</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2016-09-26T19:12:46Z</dc:date>
    </item>
    <item>
      <title>Re: K60 Multithreading</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652539#M39742</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Erich,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your suggestions! I think I have exhausted all the commonly used timers: PIT, FTM, LPTMR on the K60. Can I use the remaining timers: Programmable Delay Block (PDB), Carrier Modular Transmitter (CMT), and Real-Time Clock (RTC) to create three timer interrupts?&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since I have no experience with scheduler, my next questions is: how do I create a mini scheduler based on one timer?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'll definitely look into using FreeRTOS in my future research!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 28 Sep 2016 17:56:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/K60-Multithreading/m-p/652539#M39742</guid>
      <dc:creator>broccolee</dc:creator>
      <dc:date>2016-09-28T17:56:45Z</dc:date>
    </item>
  </channel>
</rss>

