<?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: MCF5213 Pulse accumulator interrupt problems in ColdFire/68K Microcontrollers and Processors</title>
    <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-Pulse-accumulator-interrupt-problems/m-p/201786#M9333</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;FONT size="2"&gt;I figured out what the problem was. It turns out that i needed to enable the Interrupt mask register, more specifically IMRH. On boot up IMRH is set default to disable all registers it controlls. After setting the specific bits to "0" for the specific vector source I attempted to run in again but still had no response from the interrupt. So then i had to set the interrupt control registers for the specific iterrupts like this:&lt;BR /&gt;&lt;BR /&gt;MCF_INTC_INCR42 | MCF_INTC_INCR_IL(0x04) | MCF_INTC_INCR_IP(0x00)&lt;BR /&gt;&lt;/FONT&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;FONT size="2"&gt;MCF_INTC_INCR43 | MCF_INTC_INCR_IL(0x04) | MCF_INTC_INCR_IP(0x08)&lt;BR /&gt;&lt;BR /&gt;After setting these registers my interrupts started working fine. I was wondering if anyone could answer the following questions.&lt;BR /&gt;1) Is there a default setting written somewhere for the Interrupt control module?&lt;BR /&gt;2) Does the software not set the ICR when an interrupt is used?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any help provided.&lt;BR /&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Mar 2008 00:06:19 GMT</pubDate>
    <dc:creator>jrowland</dc:creator>
    <dc:date>2008-03-18T00:06:19Z</dc:date>
    <item>
      <title>MCF5213 Pulse accumulator interrupt problems</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-Pulse-accumulator-interrupt-problems/m-p/201785#M9332</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;SPAN style="font-size: 2;"&gt;Hello,&lt;BR /&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I cam currently working on a MCF5213 coldfire microcontroller. I was wondering if anyone can link me an example code to set up a pulse accumulator interrupt for both over flow and event driven rising edge detection.&lt;BR /&gt;&lt;BR /&gt;currently I have the following registers set at.&lt;BR /&gt;&lt;BR /&gt;GPTSCR1 = 0x90;&lt;BR /&gt;GPTPACTL = 0x5B;&lt;BR /&gt;&lt;BR /&gt;my handlers are defined as&lt;BR /&gt;&lt;BR /&gt;mcf5xxx_set_handler(64+42, pulse_handler);&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 2;"&gt;mcf5xxx_set_handler(64+43, overflow_handler);&lt;BR /&gt;&lt;BR /&gt;then i set&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;SPAN style="font-size: 2;"&gt;mcf5xxx_irq_enable();&lt;BR /&gt;&lt;BR /&gt;on my main function i have an infinite while loop that constantly reads the pulse accumulator counter. I have a line that outputs the pulse accumulator counter, the GPTPAFLG, and I also have two variables that are in the pulse_handler function ad the overflow_handler function that are set to a specific number if those functions are called. To test my code I set a high signal to the input and watch the output values. The counter seems to be working fine and so does the GPTPAFLG. Everytime I set a high signal&amp;nbsp; the PAIF flag gets set in the GPTPAFLG register. However what's not happenging is that the variables&amp;nbsp; for the pulse_handler or the overflow_handler are not being set. This tells me that an interrupt never happened. What I don't understand is why the PAIF flag gets set in the GPTPAFLG register and an interrrupt service request never gets called. Thank you all in advance fo any advice you can give me.&lt;BR /&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;DIV&gt; &lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 12 Mar 2008 01:08:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-Pulse-accumulator-interrupt-problems/m-p/201785#M9332</guid>
      <dc:creator>jrowland</dc:creator>
      <dc:date>2008-03-12T01:08:21Z</dc:date>
    </item>
    <item>
      <title>Re: MCF5213 Pulse accumulator interrupt problems</title>
      <link>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-Pulse-accumulator-interrupt-problems/m-p/201786#M9333</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;FONT size="2"&gt;I figured out what the problem was. It turns out that i needed to enable the Interrupt mask register, more specifically IMRH. On boot up IMRH is set default to disable all registers it controlls. After setting the specific bits to "0" for the specific vector source I attempted to run in again but still had no response from the interrupt. So then i had to set the interrupt control registers for the specific iterrupts like this:&lt;BR /&gt;&lt;BR /&gt;MCF_INTC_INCR42 | MCF_INTC_INCR_IL(0x04) | MCF_INTC_INCR_IP(0x00)&lt;BR /&gt;&lt;/FONT&gt;&lt;DIV&gt;&lt;/DIV&gt;&lt;FONT size="2"&gt;MCF_INTC_INCR43 | MCF_INTC_INCR_IL(0x04) | MCF_INTC_INCR_IP(0x08)&lt;BR /&gt;&lt;BR /&gt;After setting these registers my interrupts started working fine. I was wondering if anyone could answer the following questions.&lt;BR /&gt;1) Is there a default setting written somewhere for the Interrupt control module?&lt;BR /&gt;2) Does the software not set the ICR when an interrupt is used?&lt;BR /&gt;&lt;BR /&gt;Thanks in advance for any help provided.&lt;BR /&gt;&lt;/FONT&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Mar 2008 00:06:19 GMT</pubDate>
      <guid>https://community.nxp.com/t5/ColdFire-68K-Microcontrollers/MCF5213-Pulse-accumulator-interrupt-problems/m-p/201786#M9333</guid>
      <dc:creator>jrowland</dc:creator>
      <dc:date>2008-03-18T00:06:19Z</dc:date>
    </item>
  </channel>
</rss>

