<?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 Creating a 1-microsecond software timer for the HCS12 processor in S12 / MagniV Microcontrollers</title>
    <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Creating-a-1-microsecond-software-timer-for-the-HCS12-processor/m-p/146428#M3995</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the MC9S12DB12B proceesor for an application, and I need to create some type of software-based timer with a 1-microsecond granularity for measuring how much time my code spends executing each of the tasks over a 1-second interval (for processor usage purposes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a "TaskTimer" variable based on the RTI ISR which runs at a 1 millisecond rate (using an 8 MHz system clock).&amp;nbsp; I use this variable for determining when to execute each of my tasks in the main task control loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, 1 millisecond is too slow to capture how much time is spent within each individual task.&amp;nbsp; I'm assuming that a timer with a 1-microsecond granularity would be able to actually capture task execution time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was looking at the Enhanced Capture Timer (ECT), but that doesn't seem to be the right application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on what feature I could use, and on what the most effective way to set it up would be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 27 Jan 2009 01:48:24 GMT</pubDate>
    <dc:creator>aceshigh</dc:creator>
    <dc:date>2009-01-27T01:48:24Z</dc:date>
    <item>
      <title>Creating a 1-microsecond software timer for the HCS12 processor</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Creating-a-1-microsecond-software-timer-for-the-HCS12-processor/m-p/146428#M3995</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;Hello,&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm using the MC9S12DB12B proceesor for an application, and I need to create some type of software-based timer with a 1-microsecond granularity for measuring how much time my code spends executing each of the tasks over a 1-second interval (for processor usage purposes).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I have a "TaskTimer" variable based on the RTI ISR which runs at a 1 millisecond rate (using an 8 MHz system clock).&amp;nbsp; I use this variable for determining when to execute each of my tasks in the main task control loop.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;However, 1 millisecond is too slow to capture how much time is spent within each individual task.&amp;nbsp; I'm assuming that a timer with a 1-microsecond granularity would be able to actually capture task execution time.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;I was looking at the Enhanced Capture Timer (ECT), but that doesn't seem to be the right application.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Any suggestions on what feature I could use, and on what the most effective way to set it up would be?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks in advance.&lt;/SPAN&gt;&lt;BR /&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 27 Jan 2009 01:48:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Creating-a-1-microsecond-software-timer-for-the-HCS12-processor/m-p/146428#M3995</guid>
      <dc:creator>aceshigh</dc:creator>
      <dc:date>2009-01-27T01:48:24Z</dc:date>
    </item>
    <item>
      <title>Re: Creating a 1-microsecond software timer for the HCS12 processor</title>
      <link>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Creating-a-1-microsecond-software-timer-for-the-HCS12-processor/m-p/146429#M3996</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;P&gt;Assuming it is just a temporary development requirement, here is one approach that you could use:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If you have some output port pins available, you could assign one pin for each task you wish to monitor.&amp;nbsp; Then force the relevant output pin high at the beginning of the task, clear it at the end.&amp;nbsp; Use a 'scope on the pin to measure the duration of the pulse.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best regards,&lt;BR /&gt;Carl Barnes&lt;BR /&gt;&lt;A href="http://www.technologicalarts.com/"&gt;www.technologicalarts.com&lt;/A&gt;&lt;BR /&gt;A full line of HC11/HC12/HCS12 hardware.&lt;BR /&gt;Evaluate * Educate * Embed&lt;/P&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 07 Feb 2009 01:22:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/S12-MagniV-Microcontrollers/Creating-a-1-microsecond-software-timer-for-the-HCS12-processor/m-p/146429#M3996</guid>
      <dc:creator>mculater</dc:creator>
      <dc:date>2009-02-07T01:22:28Z</dc:date>
    </item>
  </channel>
</rss>

