<?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 Re: Time based kernel in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151867#M8323</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roberto, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the "sticky" links at the top of the page for this forum, there are two references to RTOS/kernels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;thread.id=476" target="_self"&gt;FreeRTOS on HCS08&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;thread.id=4284&amp;amp;page=1" target="_self"&gt;EBS08 the Simple Basic System for HC(S)08 MCU's&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact the second link does closely correspond with the time-based kernel of AN1262. As it happens, I am currently working on a project (absolute assembly) for the HCS08SE device, using a simplified, scaled down version of a time-based kernel, with a total of 16 timeslots generated using a TPM channel.&amp;nbsp; I have attached the preliminary assembly code.&amp;nbsp; This could easily be adapted to relocatable assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From time to time I recall that there have been other simple task schedulers described within this forum.&amp;nbsp; I suggest that you use the forum search engine to find the other references.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/8BITCOMM/15257_EBSs08se.zip" rel="nofollow" target="_self"&gt;EBSs08se.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-11-10&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:06 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 10 Nov 2009 11:15:17 GMT</pubDate>
    <dc:creator>bigmac</dc:creator>
    <dc:date>2009-11-10T11:15:17Z</dc:date>
    <item>
      <title>Time based kernel</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151865#M8321</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hi. I'm&amp;nbsp;a newbie on programming MCU. I've find on this site an intresting application note: AN 1262. In this AN is explained how to realize a time based kernel. Is there&amp;nbsp;anything&amp;nbsp;similar&amp;nbsp;for HCS08 MCU family (maybe in C)?&lt;/SPAN&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by roberto.m on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-11-05&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;12:56 PM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 05 Nov 2009 20:53:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151865#M8321</guid>
      <dc:creator>roberto_m</dc:creator>
      <dc:date>2009-11-05T20:53:22Z</dc:date>
    </item>
    <item>
      <title>Re: Time based kernel</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151866#M8322</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;not even an hint?&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 09 Nov 2009 18:23:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151866#M8322</guid>
      <dc:creator>roberto_m</dc:creator>
      <dc:date>2009-11-09T18:23:22Z</dc:date>
    </item>
    <item>
      <title>Re: Time based kernel</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151867#M8323</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roberto, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Within the "sticky" links at the top of the page for this forum, there are two references to RTOS/kernels.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;thread.id=476" target="_self"&gt;FreeRTOS on HCS08&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://forums.freescale.com/freescale/board/message?board.id=8BITCOMM&amp;amp;thread.id=4284&amp;amp;page=1" target="_self"&gt;EBS08 the Simple Basic System for HC(S)08 MCU's&amp;nbsp;&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In fact the second link does closely correspond with the time-based kernel of AN1262. As it happens, I am currently working on a project (absolute assembly) for the HCS08SE device, using a simplified, scaled down version of a time-based kernel, with a total of 16 timeslots generated using a TPM channel.&amp;nbsp; I have attached the preliminary assembly code.&amp;nbsp; This could easily be adapted to relocatable assembly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;From time to time I recall that there have been other simple task schedulers described within this forum.&amp;nbsp; I suggest that you use the forum search engine to find the other references.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.freescale.com/files/community_files/8BITCOMM/15257_EBSs08se.zip" rel="nofollow" target="_self"&gt;EBSs08se.zip&lt;/A&gt;&lt;/P&gt;&lt;DIV class="message-edit-history"&gt;&lt;SPAN class="edit-author"&gt;Message Edited by t.dowe on&lt;/SPAN&gt; &lt;SPAN class="local-date"&gt;2009-11-10&lt;/SPAN&gt; &lt;SPAN class="local-time"&gt;09:06 AM&lt;/SPAN&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 11:15:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151867#M8323</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-11-10T11:15:17Z</dc:date>
    </item>
    <item>
      <title>Re: Time based kernel</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151868#M8324</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Thank ypu for helping me. Thank you for the file and the links too.&lt;BR /&gt;I've alredy started searching on the forum and it is very useful&lt;/P&gt;&lt;P&gt;In the meantime I've try to realize a kernel like an1262, using&lt;BR /&gt;the Real Time Counter on my uC (I'm vorking with MC9S08QE64) and interrupts&lt;BR /&gt;genrated by it.I need a task -time about 50 microseconds, it is&lt;BR /&gt;correct to use RTC or I have to use a TPM module?&lt;/P&gt;&lt;P&gt;I'm facing off with a lot of trouble using interrupt of RTC,&lt;BR /&gt;now I'll have a look on HCS08 Peripheral Module&lt;BR /&gt;Quick Reference examples, because the CodeWarrior Help lacks on good&lt;BR /&gt;explanation on interrupt. I'm also waiting the book of Pereria on HSc08.&lt;/P&gt;&lt;P&gt;Are there any other source of documentation (or code) on Interrupts and their handling?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 10 Nov 2009 21:37:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151868#M8324</guid>
      <dc:creator>roberto_m</dc:creator>
      <dc:date>2009-11-10T21:37:33Z</dc:date>
    </item>
    <item>
      <title>Re: Time based kernel</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151869#M8325</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello Roberto,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Use whichever timer is most suited to your project requirements.&amp;nbsp; However, for a time-based kernel, a timeslot period of 50 microseconds (say 500 bus cycles) is really too short unless your tasks are extremely simple.&amp;nbsp; My normal expectation would be a timeslot period in the milliseconds region, so useful work can be done without overflow of the timeslots.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;If you have operations that must be processed every 50 microseconds, this code should be directly incorporated within the timer interrupt service routine (ISR), and the code would need to be kept very short (the ISR should be completed within significantly less than 500 bus cycles).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;In this case, you would probably need to use an output compare interrupt associated with a TPM channel.&amp;nbsp; This is the method that the previously posted sample assembly code uses.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Application note AN2616 may also be of interest to you.&amp;nbsp; Look in the FAQ section for the various methods available for implementing ISRs in C, using CW.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Mac&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 11 Nov 2009 00:47:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Time-based-kernel/m-p/151869#M8325</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2009-11-11T00:47:53Z</dc:date>
    </item>
  </channel>
</rss>

