<?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: Using HCS08 TPM Timer Module to generate 1 second interrupt in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200190#M16342</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it! Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Mon, 17 May 2010 19:50:33 GMT</pubDate>
    <dc:creator>Coderunner</dc:creator>
    <dc:date>2010-05-17T19:50:33Z</dc:date>
    <item>
      <title>Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200184#M16336</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I am trying to use TPM1 Module on MC9S08JM60 to generate an interrupt every second.&lt;/P&gt;&lt;P&gt;I am operating in PEE mode using 12MHz external crystal and bus frequency of 24MHz.&lt;/P&gt;&lt;P&gt;But since 24MHz seems too high to get 1 second interrupt usint TPM I'm using "Fixed system clock" source for TPM which runs at 1.5MHz since RDIV value is 8.&lt;/P&gt;&lt;P&gt;So, I figured, if I set TPM prescaler to divide by 32: 1.5MHz/32=46,875 or 0xB71B, all I need is to set Modulo value to 0xB71B and that should give me one overflow (TOF) per second?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;No matter what value I set TPM1MOD to it seems to have no effect on terminal count. I mean, looking at TPM1CNT in emulator it counts up from 0 to about 32767 then counts from -32767 to 0 and repeats???&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //*** SET-UP TIMER - TPM1 MODULE&lt;BR /&gt;&amp;nbsp; TPM1SC_TOF = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //timer has not overflowed&lt;BR /&gt;&amp;nbsp; TPM1SC_CLKSA = 0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //select fixed system clock (1.5MHz)&lt;BR /&gt;&amp;nbsp; TPM1SC_CLKSB = 1;&lt;BR /&gt;&amp;nbsp; TPM1SC_CPWMS =0;&lt;BR /&gt;&amp;nbsp; TPM1SC_PS = 0b100;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //clock source divided 16&lt;BR /&gt;&amp;nbsp; TPM1MOD = 0x0FFF;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //set counter modulus (terminal count)&lt;BR /&gt;&amp;nbsp; TPM1SC_TOIE = 1;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; //enable TPM1 timer overflow interrupts&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; //*** Configure Multi-purpose Clock Generator (MCG) for 24MHz bus frequency&lt;BR /&gt;&amp;nbsp; //Switching from FEI Mode to PEE Mode&lt;BR /&gt;&amp;nbsp; //FEI --&amp;gt; FBE&lt;BR /&gt;&amp;nbsp; MCGC2 = 0x36;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&lt;BR /&gt;&amp;nbsp; while(!MCGSC_OSCINIT);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //loop until crystal has been initialized, OSCINIT = 1&lt;BR /&gt;&amp;nbsp; DisableInterrupts;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //disable interrupts so no extra steps occur in 1.5MHz range&lt;BR /&gt;&amp;nbsp; MCGC1 = 0x98;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; //CLKS=10 (Ext. ref); RDIV=011 (12MHz/8=1.5MHz)&lt;BR /&gt;&amp;nbsp; while(MCGSC_IREFST == 1);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //loop until IREFST = 0; Ext. reference is source&lt;BR /&gt;&amp;nbsp; while(MCGSC_CLKST != 0b10);&amp;nbsp;&amp;nbsp; //loop until external ref. clock is selected to feed MCGOUT&lt;BR /&gt;&amp;nbsp; //FBE --&amp;gt; BLPE&lt;BR /&gt;&amp;nbsp; MCGC2 = 0x3E;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; //LP = 1; BLPE MODE ON&lt;BR /&gt;&amp;nbsp; EnableInterrupts;&lt;BR /&gt;&amp;nbsp; MCGC3 = 0x48;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //1.5MHz*32=48MHz; PLL is selected (prepared for PBE)&lt;BR /&gt;&amp;nbsp; while(!MCGSC_PLLST);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; //loop until current source for PLLS clock is PLL; PLLST=1&lt;BR /&gt;&amp;nbsp; //BLPE --&amp;gt; PBE&lt;BR /&gt;&amp;nbsp; MCGC2 = 0x36;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; //LP = 0; BLPE MODE OFF, PBE MODE ENTERED&lt;BR /&gt;&amp;nbsp; while(!MCGSC_LOCK);&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp; //loop until PLL acquired lock; LOCK=1&lt;BR /&gt;&amp;nbsp; //PBE --&amp;gt; PEE&lt;BR /&gt;&amp;nbsp; MCGC1 = 0x18;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; //CLKS = 00; output of PLL or FLL is selected&lt;BR /&gt;&amp;nbsp; while(MCGSC_CLKST != 0b11);&amp;nbsp;&amp;nbsp; //loop until PLL output is selected to feed MCGOUT&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 02:34:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200184#M16336</guid>
      <dc:creator>Coderunner</dc:creator>
      <dc:date>2010-05-14T02:34:05Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200185#M16337</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello, and welcome to the forum.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;What you are observing is correct, but with TPM1CNT shown as a &lt;U&gt;signed&lt;/U&gt; value within the emulator.&amp;nbsp; If you were to observe TPM1CNT as an unsigned value, you would see the value go from&amp;nbsp;zero to 65535, and then back to zero (for a free running counter).&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have some further comments about your coding:&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;Perhaps the bus clock should be initialised prior to initialising your timing processes.&lt;/LI&gt;&lt;LI&gt;When writing to the TPM1SC register, write all bits simultaneously, rather than individual bit values in succession.&amp;nbsp; The one exception is the clearing process for the overflow flag, which might be done after the other bits are initialised.&lt;/LI&gt;&lt;LI&gt;The prescale value that you have selected is 16, rather than the intended 32.&lt;/LI&gt;&lt;LI&gt;The new TPM1MOD value perhaps should be set prior to starting the timer.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;Maybe the following code:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TPM1MOD = 46874;&amp;nbsp;// For a terminal count of 46875&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TPM1SC = 0x55;&amp;nbsp;&amp;nbsp; // Fixed sys clock, prescale 32&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;TPM1SC_TOF = 0;&amp;nbsp; // Ensure flag is cleared&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Personally, I might choose to generate an interrupt at a much faster rate, say 10 to 100 milliseconds period, and use a static variable within the ISR as a counter for the one second interval.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;static byte count = 100;&lt;BR /&gt;&lt;BR /&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;count--;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;if (!count) {&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; count = 100;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="Courier New"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;&amp;nbsp;&amp;nbsp; // Other code here&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&lt;FONT face="courier new,courier"&gt;}&lt;/FONT&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 08:43:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200185#M16337</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-05-14T08:43:53Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200186#M16338</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello and thank you bigmac. I appreciate your help. Now its clear to me and thanks for structural tips.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 19:42:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200186#M16338</guid>
      <dc:creator>Coderunner</dc:creator>
      <dc:date>2010-05-14T19:42:19Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200187#M16339</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;bigmac,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whats the difference generating a faster interrupt and counting up to a second vs 1 second interrupt?&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 20:01:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200187#M16339</guid>
      <dc:creator>Coderunner</dc:creator>
      <dc:date>2010-05-14T20:01:28Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200188#M16340</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I also realized that fixed system clock is not 1.5MHz but 750kHz since its divided by 2 after being synchronized to bus clock.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 14 May 2010 21:42:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200188#M16340</guid>
      <dc:creator>Coderunner</dc:creator>
      <dc:date>2010-05-14T21:42:02Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200189#M16341</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;Coderunner wrote:&lt;BR /&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Whats the difference generating a faster interrupt and counting up to a second vs 1 second interrupt?&lt;/P&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It really depends on the specific requirements of a project, but making use of shorter tick period for the timer overflow interrupt means that it is potentially feasible to use a single timer for multiple timing periods that may be required,&amp;nbsp;where each period would correspond to an integral multiple of the chosen tick period.&amp;nbsp; With a faster TPM clock rate, this may also be more convenient for making use of the TPM channels for other timing purposes, in addition to the overflow interrupt.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;An alternative approach may be to use a TPM channel (software&amp;nbsp;only output compare interrupt) to generate the tick period, instead of&amp;nbsp;the TPM&amp;nbsp;overflow, and leave the TPM modulo value&amp;nbsp;in free running mode.&amp;nbsp; This would simplify the use of other TPM channels for different timing purposes, including input capture events.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 15 May 2010 15:15:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200189#M16341</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2010-05-15T15:15:58Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200190#M16342</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Got it! Thank you very much.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 17 May 2010 19:50:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200190#M16342</guid>
      <dc:creator>Coderunner</dc:creator>
      <dc:date>2010-05-17T19:50:33Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200191#M16343</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Hi, I have a similar problem for generate with a 1sec interrupt whit 9S08GT32 whit 4MHz internal clock. I set TPM2SC = 0x4F TPM2SC_TOIE = 1 TPM2MODH and L at 0xFF and dont work. Is the first time that I use TPM Interrupt in C language, where is my error? Best regards fuma&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 11:13:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200191#M16343</guid>
      <dc:creator>fuma</dc:creator>
      <dc:date>2012-07-06T11:13:08Z</dc:date>
    </item>
    <item>
      <title>Re: Using HCS08 TPM Timer Module to generate 1 second interrupt</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200192#M16344</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Using the register values that you indicate would give a timer overflow period of approximately 2 seconds.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Period = prescale * 65536 / BUSCLK = 128 * 65536 / 4000000 = 2.097 seconds&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, TPM2SC_TOIE = 1; is unnecessary because this bit is already becomes set with TPM2SC = 0x4F;&lt;/P&gt;&lt;P&gt;The correct operation of the timer will also depend on the contents of the ISR function.&amp;nbsp; You will need to explicitly clear the overflow flag within the ISR.&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;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 06 Jul 2012 20:19:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Using-HCS08-TPM-Timer-Module-to-generate-1-second-interrupt/m-p/200192#M16344</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2012-07-06T20:19:45Z</dc:date>
    </item>
  </channel>
</rss>

