<?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: HC908GR16A -- Timer problem w/ Cyclone in 8-bit Microcontrollers</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134782#M3838</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Jarin,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I know it doesn't fire because the LED doesn't blink, and the debounced button presses are no longer detected (I added code to report a fault condition out the serial line when a button is pressed).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not sure it is the interrupt routine itself because it works 100% as long as the Cyclone is connected.&amp;nbsp; Once the Cyclone is reset or disconnected, it no longer works....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not trying to blame the Cyclone.&amp;nbsp; It could easily be a hardware issue, or maybe a firmware setting, or something like that ... It just seems really weird.....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rich B.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 May 2007 00:43:20 GMT</pubDate>
    <dc:creator>rbeaudry</dc:creator>
    <dc:date>2007-05-25T00:43:20Z</dc:date>
    <item>
      <title>HC908GR16A -- Timer problem w/ Cyclone</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134780#M3836</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;DIV&gt;Hello all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have a weird problem, and I hope someone has seen this before, and can help me &lt;SPAN aria-label="Happy" class="emoticon_happy emoticon-inline" style="height:16px;width:16px;"&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Some background information:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm using a 68HC908GR16A, with CodeWarrior "C", and a Cyclone Pro programmer/debugger.&amp;nbsp; We have the Cyclone hooked up via the standard MON08 16-pin header.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I have a 50ms timer interrupt (TIM2 Overflow), that currently just blinks a light, and checks for a debounced button press.&amp;nbsp; The light does not blink every 50ms, but I use a counter in the interrupt to blink every 500ms.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I also have a serial receive interrupt, and my device responds to serial polls from an external device.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now, the problem:&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When the Cyclone is hooked up, the serial receive interrupt fires, and the TIM2 Overflow interrupt fires.&amp;nbsp; When the Cyclone is NOT hooked up, the serial receive interrupt fires, but the TIM2 Overflow interrupt DOES NOT FIRE.&amp;nbsp; This is the same flash code, but for some reason, TIM2 Overflow does not fire unless the Cyclone is hooked up....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Any ideas??&amp;nbsp; I'm a bit stuck &lt;SPAN aria-label="Sad" class="emoticon_sad emoticon-inline" style="height:16px;width:16px;"&gt;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rich B.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by rbeaudry on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-05-24&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;03:42 PM&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Message Edited by rbeaudry on &lt;/SPAN&gt;&lt;SPAN class="date_text"&gt;2007-05-24&lt;/SPAN&gt;&lt;SPAN&gt; &lt;/SPAN&gt;&lt;SPAN class="time_text"&gt;04:10 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 May 2007 21:41:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134780#M3836</guid>
      <dc:creator>rbeaudry</dc:creator>
      <dc:date>2007-05-24T21:41:07Z</dc:date>
    </item>
    <item>
      <title>Re: HC908GR16A -- Timer problem w/ Cyclone</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134781#M3837</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;How do you know that TIM2 OVF interrupt is not generated? LED just doesn't blink? There may be problems with your interrupt routines.&lt;BR /&gt;We may start helping you when you could show source code for your interrupt routines.&lt;BR /&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 00:19:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134781#M3837</guid>
      <dc:creator>jarin</dc:creator>
      <dc:date>2007-05-25T00:19:29Z</dc:date>
    </item>
    <item>
      <title>Re: HC908GR16A -- Timer problem w/ Cyclone</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134782#M3838</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Jarin,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I know it doesn't fire because the LED doesn't blink, and the debounced button presses are no longer detected (I added code to report a fault condition out the serial line when a button is pressed).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not sure it is the interrupt routine itself because it works 100% as long as the Cyclone is connected.&amp;nbsp; Once the Cyclone is reset or disconnected, it no longer works....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I'm not trying to blame the Cyclone.&amp;nbsp; It could easily be a hardware issue, or maybe a firmware setting, or something like that ... It just seems really weird.....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rich B.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 00:43:20 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134782#M3838</guid>
      <dc:creator>rbeaudry</dc:creator>
      <dc:date>2007-05-25T00:43:20Z</dc:date>
    </item>
    <item>
      <title>Re: HC908GR16A -- Timer problem w/ Cyclone</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134783#M3839</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;BLOCKQUOTE&gt;&lt;HR /&gt;rbeaudry wrote:&lt;BR /&gt;&lt;DIV&gt;...it could easily be a hardware issue, or maybe a firmware setting, or something like that ...&lt;BR /&gt;&lt;/DIV&gt;&lt;HR /&gt;&lt;/BLOCKQUOTE&gt;&lt;BR /&gt;&lt;BR /&gt;Yes, that's right. And that's why I want to see your code first - to decide if it's firmware problem or not. Then we may look closer to your hardware.&lt;BR /&gt;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 03:19:03 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134783#M3839</guid>
      <dc:creator>jarin</dc:creator>
      <dc:date>2007-05-25T03:19:03Z</dc:date>
    </item>
    <item>
      <title>Re: HC908GR16A -- Timer problem w/ Cyclone</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134784#M3840</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello Rich,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;It is possible that, depending on the MON08 connection you have used, the Cyclone will inject a clock frequency of 9.8304 MHz for use during monitor mode, and this would over-ride the crystal you may have connected.&amp;nbsp; In this case the PLL would not be utilised.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;In normal user mode, if you are using a low frequency crystal in conjunction with the&amp;nbsp;PLL,&amp;nbsp;if the CGM is incorrectly set up it also may be possible that your bus frequency is very low, and this might give the appearance that the TIM interrupt is not working.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;I think you need to confirm that you have the expected bus frequency.&amp;nbsp; A possible approach is to set up one of the TIM channels for&amp;nbsp;PWM output (unbuffered with arbitary duty cycle) and monitor the output waveform.&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Regards,&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Mac&lt;/FONT&gt;&lt;/DIV&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;&lt;/FONT&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 08:45:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134784#M3840</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2007-05-25T08:45:04Z</dc:date>
    </item>
    <item>
      <title>Re: HC908GR16A -- Timer problem w/ Cyclone -- fixed</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134785#M3841</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;DIV&gt;Hello all,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Thanks for the replies ....&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Jarin was indeed correct .. partly :-)&amp;nbsp; My ISR code was fine, but the main loop does a WAIT, and the COP fired off a reset.&amp;nbsp; The serial transmissions were processed before the WAIT, but since no other interupts happened in time, the COP fired off...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I should note that my LED/Button interrupt was every 50ms, but the COP, because of the 8MHz crystal, was 32ms.&amp;nbsp; The Cyclone, when connected, holds the IRQ and RST pins, which tells the micro to disable the COP for debugging ..... *sigh*...&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;*goes off to eat some crow*&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Rich B.&lt;/DIV&gt;&lt;BR /&gt;&lt;BR /&gt;Message Edited by rbeaudry on &lt;SPAN class="date_text"&gt;2007-05-25&lt;/SPAN&gt; &lt;SPAN class="time_text"&gt;02:39 PM&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 May 2007 20:16:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/HC908GR16A-Timer-problem-w-Cyclone/m-p/134785#M3841</guid>
      <dc:creator>rbeaudry</dc:creator>
      <dc:date>2007-05-25T20:16:37Z</dc:date>
    </item>
  </channel>
</rss>

