<?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のトピックRe: overflow irq with TPM0 in Input Capture Mode</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126929#M1281</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi jah,&lt;/P&gt;&lt;P&gt;Didn't study setup in detail but...&lt;/P&gt;&lt;P&gt;If you enable overflow interrupts then you will get ints if the timer is running irrespective of the state of any pins (except RESET &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;)&lt;/P&gt;&lt;P&gt;If your just trying to make an IRQ pin just enable input cature, then in the&amp;nbsp;interrupt handler&amp;nbsp;do what you have to to clear the cause then do what you were going to do in your IRQ.&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 17 Aug 2006 06:20:55 GMT</pubDate>
    <dc:creator>peg</dc:creator>
    <dc:date>2006-08-17T06:20:55Z</dc:date>
    <item>
      <title>overflow irq with TPM0 in Input Capture Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126928#M1280</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;reference mc9s08rd32dwe&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if the following control registers are set:&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TPM1C0SC=x10010xx&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x, chan0 irq=enabled, input capture=enabled, edge = falling, x, x&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;and&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;TPM1C0SC=X1001000&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;x, overflow irq=enabled, pwm=off, clock=bus clock, prescale=1&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;if the ptd6/tpm0 is always high (a falling edge never occures)&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;will there be interrupts due to the overflow = enabled??????&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;thanks again&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 06:11:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126928#M1280</guid>
      <dc:creator>jah</dc:creator>
      <dc:date>2006-08-17T06:11:51Z</dc:date>
    </item>
    <item>
      <title>Re: overflow irq with TPM0 in Input Capture Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126929#M1281</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi jah,&lt;/P&gt;&lt;P&gt;Didn't study setup in detail but...&lt;/P&gt;&lt;P&gt;If you enable overflow interrupts then you will get ints if the timer is running irrespective of the state of any pins (except RESET &lt;IMG alt=":smileyvery-happy:" class="emoticon emoticon-smileyvery-happy" id="smileyvery-happy" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-very-happy.gif" title="Smiley Very Happy" /&gt;)&lt;/P&gt;&lt;P&gt;If your just trying to make an IRQ pin just enable input cature, then in the&amp;nbsp;interrupt handler&amp;nbsp;do what you have to to clear the cause then do what you were going to do in your IRQ.&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 06:20:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126929#M1281</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-08-17T06:20:55Z</dc:date>
    </item>
    <item>
      <title>Re: overflow irq with TPM0 in Input Capture Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126930#M1282</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;thanks everyone, David:&lt;BR /&gt;&lt;BR /&gt;yes i need an external irq pin.&lt;BR /&gt;&lt;BR /&gt;my concern is: do not know how the timer-0 and input capture works, is the timer-0 running continoous in this mode and measures the time between ptd6/tpm0 active edges?? &lt;BR /&gt;&lt;BR /&gt;if this is the case i may also expect timer overflow irq's?&lt;BR /&gt;&lt;BR /&gt;a previous firmware peep used timer-1 as a gerneral delay generator for his porgram and overflow is enabled. if overflow irq is an issue in the above discussion of input capture, is it worthy to study: is the overflow irq for timer-1 general time delay the only method to generate a general delay on timer-1???&lt;BR /&gt;&lt;BR /&gt;the overflow irq on/off enable is a global function and effects both timer-0 &amp;amp; timer-1.&lt;BR /&gt;&lt;BR /&gt;jah&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;Hi jah,&lt;BR /&gt;&lt;BR /&gt;Didn't study setup in detail but...&lt;BR /&gt;&lt;BR /&gt;If you enable overflow interrupts then you will get ints if the timer is running irrespective of the state of any pins (except RESET :smileyvery-happy&lt;BR /&gt;&lt;BR /&gt;If your just trying to make an IRQ pin just enable input cature, then in the interrupt handler do what you have to to clear the cause then do what you were going to do in your IRQ.&lt;BR /&gt;&lt;BR /&gt;Regards David&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 17 Aug 2006 19:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126930#M1282</guid>
      <dc:creator>jah</dc:creator>
      <dc:date>2006-08-17T19:51:44Z</dc:date>
    </item>
    <item>
      <title>Re: overflow irq with TPM0 in Input Capture Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126931#M1283</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, Jah:&lt;BLOCKQUOTE&gt;&lt;HR /&gt;do not know how the timer-0 and input capture works, is the timer-0 running continuous in this mode and measures the time between ptd6/tpm0 active edges??&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;Yes, the timer runs continuously.&lt;BLOCKQUOTE&gt;&lt;HR /&gt;if this is the case I may also expect timer overflow irq's?&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;Only if you have overflow-interrupts enabled. The interrupt-enables for the free-running timer and each timer-channel are independent.&lt;BLOCKQUOTE&gt;&lt;HR /&gt;is the overflow irq for timer-1 general time delay the only method to generate a general delay on timer-1???&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;There are many ways, but it is one of the easiest ways. If you have a TBM module in your micro, that is an easier way.&lt;BLOCKQUOTE&gt;&lt;HR /&gt;the overflow irq on/off enable is a global function and effects both timer-0 &amp;amp; timer-1.&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;Actually, there should be independent timer overflow interrupt enables for each timer. AFAIK, the two timers are completely independent.&lt;BR /&gt;&lt;BR /&gt;Hope that helps.&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 04:24:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126931#M1283</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-08-18T04:24:08Z</dc:date>
    </item>
    <item>
      <title>Re: overflow irq with TPM0 in Input Capture Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126932#M1284</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;OK, time for a correction. I misspoke.&lt;BR /&gt;&lt;BR /&gt;There is only ONE timer in the MC9s08RD32dwe, not two like on other HCS08s. The timer has two timer-channels. So the free-running timer IS common to both timer-channels.&lt;BR /&gt;&lt;BR /&gt;So there are three separate interrupt-enables: one for timer-overflow, and one for each of the two timer-channels.&lt;BR /&gt;&lt;BR /&gt;Now I better go back into the data-sheet and verify.&lt;P&gt;Message Edited by rocco on &lt;SPAN class="date_text"&gt;2006-08-17&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;03:03 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 05:02:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126932#M1284</guid>
      <dc:creator>rocco</dc:creator>
      <dc:date>2006-08-18T05:02:33Z</dc:date>
    </item>
    <item>
      <title>Re: overflow irq with TPM0 in Input Capture Mode</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126933#M1285</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;P&gt;Hi jah,&lt;/P&gt;&lt;P&gt;Your device only has 1 timer with two channels.&lt;/P&gt;&lt;P&gt;It doesn't have a TBM.&lt;/P&gt;&lt;P&gt;So there is only one counter to rollover, so 1 overflow bit/interrupt.&lt;/P&gt;&lt;P&gt;You will use 1 channel as your IRQ, in the interrupt handler read TPM1CxSC (x depends on channel you use) then clear bit 7 of it. Now you can do what you wanted.&lt;/P&gt;&lt;P&gt;This will still allow you to use the timer and the other channel for other purposes as you have not interfered with the timer at all.&lt;/P&gt;&lt;P&gt;Think of input capture as a very fast bundy clock (the clock used to check when emploees of a factory start/stop work in case this word is not universal).&lt;/P&gt;&lt;P&gt;You clock on at 11am (11am recorded on card)&lt;/P&gt;&lt;P&gt;Clock "rolls over" once at midday&lt;/P&gt;&lt;P&gt;Clock "rolls over" a second time at midnight.&lt;/P&gt;&lt;P&gt;You clock&amp;nbsp; off at 2am (then resign because hours are too long) (2am recorded on card)&lt;/P&gt;&lt;P&gt;So you have worked for 1 period - 12hours&lt;/P&gt;&lt;P&gt;plus 1 hour before and 2 hours after = 15hours&lt;/P&gt;&lt;P&gt;This is exactly how the timer works and how you have to interpret the results.&lt;/P&gt;&lt;P&gt;You can configure the spare channel to clock on/off accurately or just read the timer for rougher timing.&lt;/P&gt;&lt;P&gt;You can use an interrupt to count the rollovers or just poll the overflow bit.&lt;/P&gt;&lt;P&gt;If you just want the pseudo IRQ ignore rollovers.&lt;/P&gt;&lt;P&gt;Hope this helps&lt;/P&gt;&lt;P&gt;Regards David&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Aug 2006 05:07:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/overflow-irq-with-TPM0-in-Input-Capture-Mode/m-p/126933#M1285</guid>
      <dc:creator>peg</dc:creator>
      <dc:date>2006-08-18T05:07:24Z</dc:date>
    </item>
  </channel>
</rss>

