<?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>Kinetis MicrocontrollersのトピックRe: What happens when an interrupt occurs?  (KV10 - Thumb Processor)</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648301#M39395</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look for:&lt;/P&gt;&lt;P&gt;DUI0662B_cortex_m0p_r0p1_dgug.pdf&lt;/P&gt;&lt;P&gt;Section 2.3.6 has this automatic-stacking info:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5636iF57FB1531F2F9374/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The 'interrupts which are disabled' by the start-of-service of one interrupt are 'those at this or lower priority', enforced by the NVIC.&amp;nbsp; Higher priority are still 'fully able' to interrupt an ISR unless the global-interrupt-enable is cleared [__disable_interrupts()].&amp;nbsp; Note that such manual over-ride of the automatic interrupt-hardware is NOT recommended in ISRs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interrupt generating devices generally have specific 'acknowledge' processes to follow, but the NVIC and following ARM hardware are 'self acknowledging'.&amp;nbsp; Indeed, there isn't even a special 'interrupt return', so interrupt handles don't need 'special keywords', as a 'special code' is loaded into the Link Register (LR) to indicate the exception-processing, and recognized by hardware as part of the 'normal' return operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 23 Sep 2016 19:09:46 GMT</pubDate>
    <dc:creator>egoodii</dc:creator>
    <dc:date>2016-09-23T19:09:46Z</dc:date>
    <item>
      <title>What happens when an interrupt occurs?  (KV10 - Thumb Processor)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648300#M39394</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;More specifically where do I go to learn about what the processor does when it recognizes an enabled interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using a FRDM-KV10Z so my first choice reference is the KV10 Sub-Family Reference Manual.&amp;nbsp; But there's not much in there that I see about interrupts.&amp;nbsp; It refers one to the ARM Cortex-M0+ Technical Reference Manual for a "full description" of the NVIC.&amp;nbsp; But the full description turns out to be a few mostly blank pages with a reference to the ARMv6-M Architecture&lt;BR /&gt;Reference Manual.&amp;nbsp; The problem here is that this document seems to be describing ARM architecture rather than Thumb architecture.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My understanding is that the KV10 is Thumb only.&amp;nbsp; Assuming this to be true I'd like to know how this Thumb processor reacts when it acknowledges an interrupt. What gets saved where?&amp;nbsp; Are further interrupts disabled and if they are, how can I re-enable within the interrupt handler?&amp;nbsp; What does the processor do when it returns from an interrupt?&amp;nbsp; Why don't I have to somehow acknowledge an interrupt?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Also please consider this disassembly of the entry point of some 'C' code I have written to process a UART interrupt:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UART0_IRQHandler:&lt;BR /&gt;00000648:&amp;nbsp;&amp;nbsp; push {r3, r4, r7, lr}&lt;BR /&gt;0000064a:&amp;nbsp;&amp;nbsp; add r7, sp, #0&lt;BR /&gt;&amp;nbsp;165&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;s1 = *UART0_S1&amp;amp;0xaf;&lt;BR /&gt;0000064c:&amp;nbsp;&amp;nbsp; ldr r3, [pc, #96]&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; ; (0x6b0 &amp;lt;UART0_IRQHandler+104&amp;gt;)&lt;BR /&gt;0000064e:&amp;nbsp;&amp;nbsp; ldr r3, [r3, #0]&lt;BR /&gt;00000650:&amp;nbsp;&amp;nbsp; ldrb r3, [r3, #0]&lt;BR /&gt;00000652:&amp;nbsp;&amp;nbsp; movs r2, #80&amp;nbsp;&amp;nbsp;&amp;nbsp; ; 0x50&lt;BR /&gt;00000654:&amp;nbsp;&amp;nbsp; bics r3, r2&lt;BR /&gt;00000656:&amp;nbsp;&amp;nbsp; uxtb r4, r3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;What I see here is that four registers are being saved, but r2 is not one of them; and r2 is being modified.&amp;nbsp; What is going on here?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance for any replies.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 18:34:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648300#M39394</guid>
      <dc:creator>mlnj</dc:creator>
      <dc:date>2016-09-23T18:34:50Z</dc:date>
    </item>
    <item>
      <title>Re: What happens when an interrupt occurs?  (KV10 - Thumb Processor)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648301#M39395</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Look for:&lt;/P&gt;&lt;P&gt;DUI0662B_cortex_m0p_r0p1_dgug.pdf&lt;/P&gt;&lt;P&gt;Section 2.3.6 has this automatic-stacking info:&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5636iF57FB1531F2F9374/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_1.png" alt="pastedImage_1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;The 'interrupts which are disabled' by the start-of-service of one interrupt are 'those at this or lower priority', enforced by the NVIC.&amp;nbsp; Higher priority are still 'fully able' to interrupt an ISR unless the global-interrupt-enable is cleared [__disable_interrupts()].&amp;nbsp; Note that such manual over-ride of the automatic interrupt-hardware is NOT recommended in ISRs.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interrupt generating devices generally have specific 'acknowledge' processes to follow, but the NVIC and following ARM hardware are 'self acknowledging'.&amp;nbsp; Indeed, there isn't even a special 'interrupt return', so interrupt handles don't need 'special keywords', as a 'special code' is loaded into the Link Register (LR) to indicate the exception-processing, and recognized by hardware as part of the 'normal' return operation.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 23 Sep 2016 19:09:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648301#M39395</guid>
      <dc:creator>egoodii</dc:creator>
      <dc:date>2016-09-23T19:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: What happens when an interrupt occurs?  (KV10 - Thumb Processor)</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648302#M39396</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi, Michael,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is another documentation which address the Cortex-M4, pls refer to chapter 7,8,9 for the interrupt mechanism.&lt;/P&gt;&lt;P&gt;BR&lt;/P&gt;&lt;P&gt;Xiangjun Rong&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 26 Sep 2016 06:06:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/What-happens-when-an-interrupt-occurs-KV10-Thumb-Processor/m-p/648302#M39396</guid>
      <dc:creator>xiangjun_rong</dc:creator>
      <dc:date>2016-09-26T06:06:53Z</dc:date>
    </item>
  </channel>
</rss>

