<?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>LPCXpresso IDE中的主题 Re: Understanding the Cortex-M3 (LPC1769) interrupt model.</title>
    <link>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568121#M19191</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by skysat on Sat Jan 18 13:27:29 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to some gentle prodding by TheFallGuy, I can answer my own questions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. What are those final two instructions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK, I can't answer that one but they still look like filler to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. So, are interrupts globally disabled?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; No.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Is the particular interrupt disabled?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes, the IRQ that caused execution of the ISR is disabled until the ISR returns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Can someone explain EXACTLY what is going on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes, his name is Joseph Yiu.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 15 Jun 2016 23:46:44 GMT</pubDate>
    <dc:creator>lpcware</dc:creator>
    <dc:date>2016-06-15T23:46:44Z</dc:date>
    <item>
      <title>Understanding the Cortex-M3 (LPC1769) interrupt model.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568119#M19189</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by skysat on Sat Jan 18 10:33:40 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;I'm having trouble understanding exactly how interrupts/exceptions work on the M3.&amp;nbsp; To my way of thinking, an interrupt works like this:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Push the PSR (which includes the interrupt enable bit).&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;2. Push the PC.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Disable interrupts.&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Execute the ISR.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;The ISR may or may not re-enable interrupts but upon exit, the former PSR will be restored thus restoring the former interrupt enable/disable state.&amp;nbsp; The following code is at the end of my ISR:&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;213&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; }&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0000c0d0:&amp;nbsp;&amp;nbsp; add.w&amp;nbsp;&amp;nbsp; r7, r7, #24&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0000c0d4:&amp;nbsp;&amp;nbsp; mov&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; sp, r7&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0000c0d6:&amp;nbsp;&amp;nbsp; pop&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; {r7, pc}&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0000c0d8:&amp;nbsp;&amp;nbsp; adds&amp;nbsp;&amp;nbsp;&amp;nbsp; r5, r7, #4&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;0000c0da:&amp;nbsp;&amp;nbsp; asrs&amp;nbsp;&amp;nbsp;&amp;nbsp; r0, r0, #32&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;(Are the last two instructions filler or data?&amp;nbsp; I notice that "Show Opcodes" doesn't do anything.)&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;The debugger seems to think that I have a PSR (although it doesn't know what the bits mean).&amp;nbsp;&amp;nbsp; Where is the PSR documented. I don't see any interrupts being enabled.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;So, are interrupts globally disabled?&amp;nbsp; Is the particular interrupt disabled?&amp;nbsp; Can someone explain EXACTLY what is going on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;You would think that the answer to these questions would be in the "Cortex-M3 Technical Reference Manual" (there is a puny chapter on the NVIC).&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Randy&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;An then there is the matter of return address 0xfffffff8.&amp;nbsp; I'll handle that in my next post - "Where's my stack?".&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568119#M19189</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:43Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the Cortex-M3 (LPC1769) interrupt model.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568120#M19190</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Sat Jan 18 11:15:54 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;A good place to start is to read the "Definitive Guide to the Cortex-M3" by Joseph Yui.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;Failing, that, there is a lot of technical documentation on the ARM Website.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;&lt;A class="jive-link-external-small" href="https://community.nxp.com/external-link.jspa?url=http%3A%2F%2Finfocenter.arm.com%2Fhelp%2Findex.jsp%3Ftopic%3D%2Fcom.arm.doc.dui0552a%2FBABDGADF.html" rel="nofollow" target="_blank"&gt;http://infocenter.arm.com/help/index.jsp?topic=/com.arm.doc.dui0552a/BABDGADF.html&lt;/A&gt;&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;There are chapters on the programmers model, Exceptions and Interrupts and the Stack.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568120#M19190</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the Cortex-M3 (LPC1769) interrupt model.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568121#M19191</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by skysat on Sat Jan 18 13:27:29 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;Thanks to some gentle prodding by TheFallGuy, I can answer my own questions.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;1. What are those final two instructions?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; OK, I can't answer that one but they still look like filler to me.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;2. So, are interrupts globally disabled?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; No.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;3. Is the particular interrupt disabled?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes, the IRQ that caused execution of the ISR is disabled until the ISR returns.&lt;/SPAN&gt;&lt;BR /&gt;&lt;BR /&gt;&lt;SPAN&gt;4. Can someone explain EXACTLY what is going on?&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Yes, his name is Joseph Yiu.&lt;/SPAN&gt;&lt;BR /&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568121#M19191</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:44Z</dc:date>
    </item>
    <item>
      <title>Re: Understanding the Cortex-M3 (LPC1769) interrupt model.</title>
      <link>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568122#M19192</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;STRONG&gt;Content originally posted in LPCWare by TheFallGuy on Sun Jan 19 03:27:29 MST 2014&lt;/STRONG&gt;&lt;BR /&gt;&lt;SPAN&gt;1. Not filler - constants. 16-bit Thumb instructions set do not allow loading of large constant values, so they are often loaded by using PC-relative addressing. These constants are normally placed at the end of a function. This is what you are seeing.&lt;/SPAN&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jun 2016 23:46:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPCXpresso-IDE/Understanding-the-Cortex-M3-LPC1769-interrupt-model/m-p/568122#M19192</guid>
      <dc:creator>lpcware</dc:creator>
      <dc:date>2016-06-15T23:46:45Z</dc:date>
    </item>
  </channel>
</rss>

