<?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: Interrupts not working after loading app with bootloader</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272188#M9359</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, MQX automatically installs the spi isr when it initializes this module, please kindly refer to the following for details.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40071i85E27269883717B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG.png" alt="1.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You may set a breakpoint there to see if the ISR copy done correctly by step trace for your case. if you want to use a custom ISR instead, you may install it after that with the api _int_install_isr().&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40072iBE99262FAC7BE594/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG.png" alt="2.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 25 Jul 2013 03:19:01 GMT</pubDate>
    <dc:creator>Kan_Li</dc:creator>
    <dc:date>2013-07-25T03:19:01Z</dc:date>
    <item>
      <title>Interrupts not working after loading app with bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272186#M9357</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hey Fellow Embedded People,&lt;/P&gt;&lt;P&gt;Running this on a K20DX256ZVMD10 using MQX4.0 and CW10.3&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have an app using an interrupt from SPI and everything works great if I load and start the app from address 0x0000_0000. I put the SPI interrupt ISR vector directly into vectors.c&lt;/P&gt;&lt;P&gt;Next, I fired up the MSD bootloader to bootload starting at address 0x0000_C000.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Next, in the app:&lt;/P&gt;&lt;P&gt;Set '#define MQX_ROM_VECTORS&amp;nbsp;&amp;nbsp; 0' in user_config.h and small_ram_config.h&lt;/P&gt;&lt;P&gt;Changed intflash.lcf to:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; vectorrom&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x0000C000, LENGTH = 0x00000400&amp;nbsp; # TJ changed from 0000 to C000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; cfmprotrom&amp;nbsp; (RX): ORIGIN = 0x0000C400, LENGTH = 0x00000020&amp;nbsp; # TJ changed from 0400 to C400&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; rom&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RX): ORIGIN = 0x0000C420, LENGTH = 0x00033BE0&amp;nbsp; # Code + Const data TJ changed from 0420 to C420, &amp;amp; 3FBE0 to 33BE0 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; ram&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (RW): ORIGIN = 0x1FFF8000, LENGTH = 0x00010000&amp;nbsp; # SRAM - RW data&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; 3. Cleaned the project and re-built.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, after I load the application with the bootloader and restart, the application loads and runs but the SPI interrupt never gets serviced.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Looking at the SRAM area where the vector table should have been copied to, address 0x1FFF_8000, I do not see my SPI ISR vector in the table. ??? n&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any ideas or help is much appreciated.&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 13:49:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272186#M9357</guid>
      <dc:creator>cavebiker</dc:creator>
      <dc:date>2013-07-15T13:49:54Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupts not working after loading app with bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272187#M9358</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I copied my SPI2 interrupt vector from address 0x0000_C0B0 in FLASH to the SRAM vector area at 0x1FFF_80B0 and now everything works (SPI2 is my only external interrupt).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;So the only thing MQX is not doing for me is automatically copying my external interrupt vectors to the SRAM area. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Does anyone know of a way to fix this problem without adding code to manually copy the vectors to SRAM?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks in advance.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Tom&lt;/P&gt;&lt;P&gt;&lt;SPAN class="mce_paste_marker"&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Jul 2013 20:31:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272187#M9358</guid>
      <dc:creator>cavebiker</dc:creator>
      <dc:date>2013-07-15T20:31:40Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupts not working after loading app with bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272188#M9359</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tom,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually, MQX automatically installs the spi isr when it initializes this module, please kindly refer to the following for details.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="1.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40071i85E27269883717B2/image-size/large?v=v2&amp;amp;px=999" role="button" title="1.PNG.png" alt="1.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;You may set a breakpoint there to see if the ISR copy done correctly by step trace for your case. if you want to use a custom ISR instead, you may install it after that with the api _int_install_isr().&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="2.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40072iBE99262FAC7BE594/image-size/large?v=v2&amp;amp;px=999" role="button" title="2.PNG.png" alt="2.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hope that helps,&lt;/P&gt;&lt;P&gt;B.R&lt;/P&gt;&lt;P&gt;Kan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 25 Jul 2013 03:19:01 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272188#M9359</guid>
      <dc:creator>Kan_Li</dc:creator>
      <dc:date>2013-07-25T03:19:01Z</dc:date>
    </item>
    <item>
      <title>Re: Interrupts not working after loading app with bootloader</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272189#M9360</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using a baremetal ISR here (I modified the vectors.c and hard-coded my ISR there)&lt;/P&gt;&lt;P&gt;The solution here was adding this code at the start of the application:&lt;/P&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;#ifdef BOOTLOADER_ENABLE&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt; &lt;/TD&gt;&lt;TD&gt;// Copy Application Stored Interrupt Vector table for SPI2 to SRAM&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;pdst=(uint_32*)0x1FFF80B0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // SPI2 interrupt vector in SRAM.&amp;nbsp;&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;psrc=(uint_32*)0x0000C0B0;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; // SPI2 interrupt vector in Flash.&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;for (i=0;i&amp;lt;0x1;i++,pdst++,psrc++)&amp;nbsp; &lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *pdst=*psrc;&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;} &lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;#endif&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;BUT this was using MQX 3.8. Now I'm using MQX 4.0 and I'm having the same problems.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Aug 2015 20:57:30 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Interrupts-not-working-after-loading-app-with-bootloader/m-p/272189#M9360</guid>
      <dc:creator>cavebiker</dc:creator>
      <dc:date>2015-08-21T20:57:30Z</dc:date>
    </item>
  </channel>
</rss>

