<?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>LPC MicrocontrollersのトピックLPC11c24 controller interrupt vector offset relocation</title>
    <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11c24-controller-interrupt-vector-offset-relocation/m-p/808455#M32463</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Iam working on LPC11C24 micro controller.&amp;nbsp;we are developing a&amp;nbsp;&amp;nbsp;secondary boot loader by using IAP commands. In bootloader, while jumping to application, we are not able to relocate interrupt vector table.&lt;/P&gt;&lt;P&gt;Application&amp;nbsp; using CAN_IRQn , EINT1_IRQn,&amp;nbsp;SysTick_IRQn , where as bootloader need to use&amp;nbsp;&lt;SPAN&gt;CAN_IRQn,&amp;nbsp;SysTick_IRQn in the bootloader . Application and bootloader are using same interrupts (CAN_IRQn,&amp;nbsp;&lt;SPAN&gt;SysTick_IRQn).&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried by using vector table relocation to RAM as mentioned in some posts,but observed that application interrupts are not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Suggest on this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please find below implementation. My application code starts from 0x3000. RAM starts from&amp;nbsp;0x10000000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tried by writing redirecting to RAM&amp;nbsp;code in bootloader code as well as application also.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define vector_in_ram&amp;nbsp; ((uint32_t*)0x10000000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;__disable_irq();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;uint8_t i;&lt;BR /&gt; uint32_t *p = (uint32_t *) 0x3000;&lt;BR /&gt; for(i = 0; i&amp;lt;128; i++)&lt;BR /&gt; {&lt;BR /&gt; vector_in_ram[i] = *p;&lt;BR /&gt; p++;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSMEMREMAP = 0x1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; asm volatile("ldr r0, =0x3000");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov sp, r0");&lt;/P&gt;&lt;P&gt;asm volatile("ldr r0, =0x3004");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov pc, r0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide some inputs on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Tue, 18 Dec 2018 11:34:52 GMT</pubDate>
    <dc:creator>ag00539523</dc:creator>
    <dc:date>2018-12-18T11:34:52Z</dc:date>
    <item>
      <title>LPC11c24 controller interrupt vector offset relocation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11c24-controller-interrupt-vector-offset-relocation/m-p/808455#M32463</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;Iam working on LPC11C24 micro controller.&amp;nbsp;we are developing a&amp;nbsp;&amp;nbsp;secondary boot loader by using IAP commands. In bootloader, while jumping to application, we are not able to relocate interrupt vector table.&lt;/P&gt;&lt;P&gt;Application&amp;nbsp; using CAN_IRQn , EINT1_IRQn,&amp;nbsp;SysTick_IRQn , where as bootloader need to use&amp;nbsp;&lt;SPAN&gt;CAN_IRQn,&amp;nbsp;SysTick_IRQn in the bootloader . Application and bootloader are using same interrupts (CAN_IRQn,&amp;nbsp;&lt;SPAN&gt;SysTick_IRQn).&amp;nbsp;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I tried by using vector table relocation to RAM as mentioned in some posts,but observed that application interrupts are not working.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Suggest on this.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;please find below implementation. My application code starts from 0x3000. RAM starts from&amp;nbsp;0x10000000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;tried by writing redirecting to RAM&amp;nbsp;code in bootloader code as well as application also.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;#define vector_in_ram&amp;nbsp; ((uint32_t*)0x10000000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;__disable_irq();&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;uint8_t i;&lt;BR /&gt; uint32_t *p = (uint32_t *) 0x3000;&lt;BR /&gt; for(i = 0; i&amp;lt;128; i++)&lt;BR /&gt; {&lt;BR /&gt; vector_in_ram[i] = *p;&lt;BR /&gt; p++;&lt;/P&gt;&lt;P&gt;}&lt;BR /&gt; LPC_SYSCON-&amp;gt;SYSMEMREMAP = 0x1;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt; asm volatile("ldr r0, =0x3000");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov sp, r0");&lt;/P&gt;&lt;P&gt;asm volatile("ldr r0, =0x3004");&lt;BR /&gt; asm volatile("ldr r0, [r0]");&lt;BR /&gt; asm volatile("mov pc, r0");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Please provide some inputs on this.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 18 Dec 2018 11:34:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11c24-controller-interrupt-vector-offset-relocation/m-p/808455#M32463</guid>
      <dc:creator>ag00539523</dc:creator>
      <dc:date>2018-12-18T11:34:52Z</dc:date>
    </item>
    <item>
      <title>Re: LPC11c24 controller interrupt vector offset relocation</title>
      <link>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11c24-controller-interrupt-vector-offset-relocation/m-p/808456#M32464</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Anusha G,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; About the secondary bootloader for LPC11C24, please refer to our application note:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN10995.zip" title="https://www.nxp.com/docs/en/application-note/AN10995.zip"&gt;https://www.nxp.com/docs/en/application-note/AN10995.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Because the LPC11C24 is based on the ARM Cortex-M0 core, it is not like the ARM Cortex-M0+ have the VTOR register to relocate the vector, M0 core don't have it.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; So, you need to associated the code to relocate the vector.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; For the details, please check the application note which I recommend you.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/70206iAAE98254200225A3/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question about it, please kindly let me know.&lt;BR /&gt;Have a great day,&lt;BR /&gt;Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-----------------------------------------------------------------------------------------------------------------------&lt;BR /&gt;Note: If this post answers your question, please click the Correct Answer button. Thank you!&lt;BR /&gt;-----------------------------------------------------------------------------------------------------------------------&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 19 Dec 2018 05:58:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/LPC-Microcontrollers/LPC11c24-controller-interrupt-vector-offset-relocation/m-p/808456#M32464</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-12-19T05:58:48Z</dc:date>
    </item>
  </channel>
</rss>

