<?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: Switching from Input capture to overflow on 9S08AW60 timer problem in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Switching-from-Input-capture-to-overflow-on-9S08AW60-timer/m-p/144074#M6735</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I think I found it.&amp;nbsp; For those interested, the problem was in the differences in the steps needed to reset the timer between the QT and AW.&amp;nbsp; I added a clear to the TPM1CNT register.&amp;nbsp; This took out the extra time.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Basically, when the timer switched for the input capture it retained the value in the TPM1CNT registers from the counting during the input capture procedure.&amp;nbsp; This added a lot of time to the overflow process.&amp;nbsp; By resetting the TPM1CNT register to 0x0000, it allowed the setting in TPM1MOD of 0x07D0 to be the correct time frame - from 0x0000 to 0x7D0; not 0x4BEE to 0x7D0.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 31 Aug 2007 02:03:24 GMT</pubDate>
    <dc:creator>shellpry</dc:creator>
    <dc:date>2007-08-31T02:03:24Z</dc:date>
    <item>
      <title>Switching from Input capture to overflow on 9S08AW60 timer problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Switching-from-Input-capture-to-overflow-on-9S08AW60-timer/m-p/144073#M6734</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello!&lt;/DIV&gt;&lt;DIV&gt;I'm currently using the AW60 demo board.&amp;nbsp; I'm configuring this for LIN.&amp;nbsp; Currently running at 2400 for troubleshooting purposes.&amp;nbsp; Eventually to be run at 19.2k.&amp;nbsp; I have ported the example code from AN2503/D Slave LIN Driver for the QT/QY Family to the AW60.&amp;nbsp;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have connected my transceiver up to a master node simulator I have used in the past.&amp;nbsp; The code makes it through the SYNCH correctly.&amp;nbsp; But at this point it will not read the ID correctly.&amp;nbsp; I'm using TPM1CH0.&amp;nbsp; It is switched between input capture mode and overflow mode.&amp;nbsp; Both are set to interrupt.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;For Break recognition, it is set to input capture and then switched to overflow mode to count the bit times.&amp;nbsp; Then the timer is set back to input capture for the synch process.&amp;nbsp; Once the start bit of the ID is captured, the timer is then set back to overflow.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;And here is where my problem is.&amp;nbsp; During the switching between input capture and overflow previous to this in the code, the transition has happened quickly and appropriately.&amp;nbsp; However, when the switch to overflow for reading the ID occurs, it takes about 7ms or more for the FIRST overflow to actually occur.&amp;nbsp; Which of course means I have lost my ID and only read 0xFF.&amp;nbsp; The bit times for overflow are the same from the break recognition.&amp;nbsp; And after that first overflow, the overflow timing stays correct for the baud rate.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have not been able to find anything that is holding my code up.&amp;nbsp; If I use the P&amp;amp;E Multilink emulator, the code simply steps back to my main function (which only moves one buffer to another) after setting the timing correctly for the overflow.&amp;nbsp; It just doesn't happen for a long, long time.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any suggestions?&amp;nbsp; I'm stuck.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;thanks,&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 30 Aug 2007 23:43:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Switching-from-Input-capture-to-overflow-on-9S08AW60-timer/m-p/144073#M6734</guid>
      <dc:creator>shellpry</dc:creator>
      <dc:date>2007-08-30T23:43:17Z</dc:date>
    </item>
    <item>
      <title>Re: Switching from Input capture to overflow on 9S08AW60 timer problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Switching-from-Input-capture-to-overflow-on-9S08AW60-timer/m-p/144074#M6735</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I think I found it.&amp;nbsp; For those interested, the problem was in the differences in the steps needed to reset the timer between the QT and AW.&amp;nbsp; I added a clear to the TPM1CNT register.&amp;nbsp; This took out the extra time.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Basically, when the timer switched for the input capture it retained the value in the TPM1CNT registers from the counting during the input capture procedure.&amp;nbsp; This added a lot of time to the overflow process.&amp;nbsp; By resetting the TPM1CNT register to 0x0000, it allowed the setting in TPM1MOD of 0x07D0 to be the correct time frame - from 0x0000 to 0x7D0; not 0x4BEE to 0x7D0.&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 31 Aug 2007 02:03:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Switching-from-Input-capture-to-overflow-on-9S08AW60-timer/m-p/144074#M6735</guid>
      <dc:creator>shellpry</dc:creator>
      <dc:date>2007-08-31T02:03:24Z</dc:date>
    </item>
  </channel>
</rss>

