<?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>8-bit MicrocontrollersのトピックHandling Timer Overflow and a Method for loading the S08QD4 TPM2 Value Register using OC Mode</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183515#M13545</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a new project involving PDP and have questions in reference to the thread dealing with PDP. (Pulse Distance Protocol)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fcommunity.freescale.com%2Fmessage%2F103280%23103280" rel="nofollow" target="_blank"&gt;https://community.freescale.com/message/103280#103280&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Using the TPM2 in OC Mode, do I need to deal with Timer Overflow? (I do not see any code in the thread to handle overflow)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. In the TPM2 CH 0 ISR, the following code is used the load the value register:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM2C0V += SPULSE;&amp;nbsp;&amp;nbsp; // Start pulse (9000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this code effectively the same as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM2C0V = TPM2CNT + SPULSE;&amp;nbsp;&amp;nbsp; // Start pulse (9000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 26 Jul 2012 20:35:52 GMT</pubDate>
    <dc:creator>GaugeGuy</dc:creator>
    <dc:date>2012-07-26T20:35:52Z</dc:date>
    <item>
      <title>Handling Timer Overflow and a Method for loading the S08QD4 TPM2 Value Register using OC Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183515#M13545</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello all,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am working on a new project involving PDP and have questions in reference to the thread dealing with PDP. (Pulse Distance Protocol)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=https%3A%2F%2Fcommunity.freescale.com%2Fmessage%2F103280%23103280" rel="nofollow" target="_blank"&gt;https://community.freescale.com/message/103280#103280&lt;/A&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;1. Using the TPM2 in OC Mode, do I need to deal with Timer Overflow? (I do not see any code in the thread to handle overflow)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2. In the TPM2 CH 0 ISR, the following code is used the load the value register:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM2C0V += SPULSE;&amp;nbsp;&amp;nbsp; // Start pulse (9000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Is this code effectively the same as:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; TPM2C0V = TPM2CNT + SPULSE;&amp;nbsp;&amp;nbsp; // Start pulse (9000)&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 26 Jul 2012 20:35:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183515#M13545</guid>
      <dc:creator>GaugeGuy</dc:creator>
      <dc:date>2012-07-26T20:35:52Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Timer Overflow and a Method for loading the S08QD4 TPM2 Value Register using OC Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183516#M13546</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello David,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;You do not need to be concerned about timer overflow provided the following conditions are met -&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;The TPM module is free-running (TPM2MOD is 0 or 0xFFFF)&lt;/LI&gt;&lt;LI&gt;The maximum timed period does not exceed the overflow period, i.e. no more than one overfow occurs during the timed period.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TPM2C0V += SPULSE;&amp;nbsp;&amp;nbsp; // Start pulse (9000)&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;This is equivalent to -&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TPM2C0V = TPM2COV + SPULSE;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;The next timing interval must always be referenced from the time of the previous output compare event, when the output pin actually changed state.&amp;nbsp; Since there will always be some latency in the execution of the ISR, referencing the next compare event from the current counter value will cause timing errors.&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Regards,&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="arial,helvetica,sans-serif"&gt;Mac&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 27 Jul 2012 01:55:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183516#M13546</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-07-27T01:55:01Z</dc:date>
    </item>
    <item>
      <title>Re: Handling Timer Overflow and a Method for loading the S08QD4 TPM2 Value Register using OC Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183517#M13547</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks for your explanation!&lt;/P&gt;&lt;P&gt;The TPM code is working as needed.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks,&lt;BR /&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 31 Jul 2012 19:31:11 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Handling-Timer-Overflow-and-a-Method-for-loading-the-S08QD4-TPM2/m-p/183517#M13547</guid>
      <dc:creator>GaugeGuy</dc:creator>
      <dc:date>2012-07-31T19:31:11Z</dc:date>
    </item>
  </channel>
</rss>

