<?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: MCS908QGx simple timer problem</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MCS908QGx-simple-timer-problem/m-p/124463#M320</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Oops, I found it. Needed another watchdog timer reset here:&lt;BR /&gt;&lt;BR /&gt; &lt;FONT face="Courier New"&gt;while (!TPMSC_TOF) // output timer compare loop&lt;BR /&gt; {&lt;BR /&gt; __RESET_WATCHDOG(); // Kicks the dog&lt;BR /&gt; if (!SW1)&lt;BR /&gt;...&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 19 Jul 2006 07:20:28 GMT</pubDate>
    <dc:creator>irob</dc:creator>
    <dc:date>2006-07-19T07:20:28Z</dc:date>
    <item>
      <title>MCS908QGx simple timer problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MCS908QGx-simple-timer-problem/m-p/124462#M319</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;SPAN&gt;One of those days. I can't seem to get the free-rolling timer to start. Actually, I can get it to run sometimes in background debug mode, but it's sporadic. Sometimes, the timer runs, other times it gets lost in the weeds. When I step through code, I can definitely see the TMPCNT register incrementing.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Here's my code:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN style="font-family: 'Courier New';"&gt;EnableInterrupts;&lt;BR /&gt;TPMSC_CPWMS = 0;&lt;BR /&gt; TPMSC_PS = 0b100;&lt;BR /&gt; TPMMOD = TIMEOUT;&lt;BR /&gt; TPMC0SC_MS0x = 0b01;&lt;BR /&gt; TPMC0SC_ELS0x = 0b00;&lt;BR /&gt;TPMCNT = 0; // reset counter&lt;BR /&gt;TPMSC_CLKSx = 0b01;&lt;BR /&gt;&lt;BR /&gt; for (;&lt;A href="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif"&gt;&lt;IMG alt=":smileywink:" class="emoticon emoticon-smileywink" src="http://freescale.i.lithium.com/i/smilies/16x16_smiley-wink.gif" title="Smiley Wink" /&gt;&lt;/A&gt;&lt;BR /&gt;{&lt;BR /&gt; __RESET_WATCHDOG();&lt;BR /&gt;&lt;BR /&gt; while (!TPMSC_TOF)&lt;BR /&gt; {&lt;BR /&gt; if (!SW1)&lt;BR /&gt; {&lt;BR /&gt; LED2 = OFF;&lt;BR /&gt; LED1 = ON;&lt;BR /&gt; TPMCNT = 0; // reset counter&lt;BR /&gt; }&lt;BR /&gt; else LED1 = OFF;&lt;BR /&gt; }&lt;BR /&gt;&lt;BR /&gt; LED2 = ON;&lt;BR /&gt;&lt;BR /&gt; if (TPMSC)&lt;BR /&gt; { // dummy read&lt;BR /&gt; }&lt;BR /&gt; TPMSC_TOF = 0; // reset counter flag&lt;BR /&gt;&lt;BR /&gt;} // Loop forever&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Anyone see where I strayed? I &lt;/SPAN&gt;&lt;A _jive_internal="true" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Fforums.freescale.com%2Ffreescale%2Fboard%2Fmessage%3Fboard.id%3D8BITCOMM%26message.id%3D1893%26query.id%3D241%23M1893" rel="nofollow" target="_blank"&gt;checked out this thread&lt;/A&gt;&lt;SPAN&gt; about the order of configuring the timer and set my clock source last. Still no go.&lt;/SPAN&gt;&lt;P&gt;Message Edited by irob on &lt;SPAN class="date_text"&gt;2006-07-18&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;06:00 PM&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 06:59:05 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MCS908QGx-simple-timer-problem/m-p/124462#M319</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2006-07-19T06:59:05Z</dc:date>
    </item>
    <item>
      <title>Re: MCS908QGx simple timer problem</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/MCS908QGx-simple-timer-problem/m-p/124463#M320</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;Oops, I found it. Needed another watchdog timer reset here:&lt;BR /&gt;&lt;BR /&gt; &lt;FONT face="Courier New"&gt;while (!TPMSC_TOF) // output timer compare loop&lt;BR /&gt; {&lt;BR /&gt; __RESET_WATCHDOG(); // Kicks the dog&lt;BR /&gt; if (!SW1)&lt;BR /&gt;...&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Jul 2006 07:20:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/MCS908QGx-simple-timer-problem/m-p/124463#M320</guid>
      <dc:creator>irob</dc:creator>
      <dc:date>2006-07-19T07:20:28Z</dc:date>
    </item>
  </channel>
</rss>

