<?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: Pending Interrupts</title>
    <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182196#M13373</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes, CAN interrupt won't disappear just because you had I-bit or CAN interrupt enable bits cleared. Module interrupt flags is that memory that "remembers" about interrupts.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 25 Jan 2008 18:04:18 GMT</pubDate>
    <dc:creator>kef</dc:creator>
    <dc:date>2008-01-25T18:04:18Z</dc:date>
    <item>
      <title>Pending Interrupts</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182193#M13370</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hello,&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I had one basic question regarding the way pending interrupts are handled.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Assuming while performing RAM test I disable all&amp;nbsp;interrupts. If any interrupt comes during this time, will it be stored as a pending interrupt?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I am seeing a behaviour where a interrupt that is occuring (or supposed to occur) when the interrupts are disabled, is being stored as a pending interrupt.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Is this behavior correct or am I seeing things?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;I always thought interrupts are stored as pending, if&lt;/DIV&gt;&lt;DIV&gt;The interrupts are enabled&lt;/DIV&gt;&lt;DIV&gt;A interrupt occurs when a interrupt is being serviced.&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 16:25:16 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182193#M13370</guid>
      <dc:creator>pammu</dc:creator>
      <dc:date>2008-01-24T16:25:16Z</dc:date>
    </item>
    <item>
      <title>Re: Pending Interrupts</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182194#M13371</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Hi,&lt;/DIV&gt;&lt;DIV&gt;I assume that you are talking about the HC08/S08 CPUs.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If the I bit in the CCR is set, no interrupts will be executed (except the RESET or the SWI). This is done with the SEI instruction. To enable the interrupts use the CLI instuction.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;When the I bit is cleared, the interrupts in the interupt table is scanned once for every instruction executed.&lt;/DIV&gt;&lt;DIV&gt;If one or more than one interrupt is pending, the interrupt with the highest priority, will be executed.&lt;/DIV&gt;&lt;DIV&gt;This means that eg if a high priority interrupt, gets a new interrupt before it has finished the current interrupt, the new interrupt will follow immediatly after.&lt;/DIV&gt;&lt;DIV&gt;Lower interrupts will then never get executed.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;If an interrupt has been set, it can only be reset by the interrupt routine with the clearing of the specific I/O bit.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The HC08/S08 family were designed with limited amount of RAM space. That is the interrupt return table should be of limited size. To do it, it is not recommended to enable interrupts to interrupt other interrupts.&lt;/DIV&gt;&lt;DIV&gt;This makes it possible to have low priority interrupts to interrupt higher priority interrupts.&lt;/DIV&gt;&lt;DIV&gt;If you still want to do it, use the CLI instruction inside the interrupts.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;The answer to your question is, if you enable an interrupt from a peripheral, but you don't enable the interrupt handler, an interrupt can be waiting for an CLI instruction and immediatly be executed after it has been executed.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Regards,&lt;/DIV&gt;&lt;DIV&gt;Ake&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 24 Jan 2008 17:54:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182194#M13371</guid>
      <dc:creator>Ake</dc:creator>
      <dc:date>2008-01-24T17:54:33Z</dc:date>
    </item>
    <item>
      <title>Re: Pending Interrupts</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182195#M13372</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;I agree with the Interrupt execution part. My doubt is a bit different.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Assume I disable interrupts while checking the RAM. When I am performing the RAM test, I am supposed to get a CAN Interrupt (obviously I wont get the interrupt as they are disabled).&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;Now my questions:&lt;/DIV&gt;&lt;DIV&gt;Will this interrupt be stored as a pending interrupt?&lt;/DIV&gt;&lt;DIV&gt;When I enable the interrupts after the RAM test, will I get the previously occured (supposed to occur) CAN interrupt ?&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 14:12:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182195#M13372</guid>
      <dc:creator>pammu</dc:creator>
      <dc:date>2008-01-25T14:12:37Z</dc:date>
    </item>
    <item>
      <title>Re: Pending Interrupts</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182196#M13373</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;Yes, CAN interrupt won't disappear just because you had I-bit or CAN interrupt enable bits cleared. Module interrupt flags is that memory that "remembers" about interrupts.&lt;/DIV&gt;&lt;DIV&gt;&amp;nbsp;&lt;/DIV&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 25 Jan 2008 18:04:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182196#M13373</guid>
      <dc:creator>kef</dc:creator>
      <dc:date>2008-01-25T18:04:18Z</dc:date>
    </item>
    <item>
      <title>Re: Pending Interrupts</title>
      <link>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182197#M13374</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;DIV&gt;&lt;FONT size="2"&gt;Hello,&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;A further brief comment -&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;The various status flags associated with a peripheral are set quite independently of whether interrupts are enabled, or not, either locally or globally.&amp;nbsp; This is so that&amp;nbsp;polling operation is possible.&amp;nbsp; Mostly, each flag must be cleared by means of a specific flag clearing sequence, and will remain set until this process is completed, or reset occurs.&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;Onlly two instances come to mind, where the flag is automatically cleared upon commencement of the ISR code, i.e. external interrupt, and the keyboard interrupts.&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 Jan 2008 23:22:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/8-bit-Microcontrollers/Pending-Interrupts/m-p/182197#M13374</guid>
      <dc:creator>bigmac</dc:creator>
      <dc:date>2008-01-25T23:22:59Z</dc:date>
    </item>
  </channel>
</rss>

