<?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>topic Re: KEA128 UART Bootloader in MCU Bootloader</title>
    <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712295#M595</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi batts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thanks for your updated information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; From your description, it should disables the bootloader interrupt before enter the application code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your conclusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Tue, 05 Sep 2017 01:02:56 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2017-09-05T01:02:56Z</dc:date>
    <item>
      <title>KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712287#M587</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I've found a few posts on a UART bootloader for the KEA128, they're all old posts though so I'd like to know what the best approach today would be.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;OL&gt;&lt;LI&gt;What I've gathered is I could port the example UART bootloader for E series (AN4767).&lt;/LI&gt;&lt;LI&gt;There's also KBOOT, though I don't think there's support for the KEA128.&amp;nbsp;&lt;/LI&gt;&lt;LI&gt;There's OpenSDA, but I'm not sure if that provides a UART bootloader over a COM port.&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Are there other options? What's the best approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 31 Aug 2017 01:21:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712287#M587</guid>
      <dc:creator>batts</dc:creator>
      <dc:date>2017-08-31T01:21:40Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712288#M588</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi batts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Of course, you can use the opensda COM port.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I don't know what the IDE you are using, I porting a UART bootloader for TRK-KEA128 with MDK IDE, and it compatible with out KBOOT2.0, you can use the kinetisFlashTool to download the application code directly.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Now, I attached my project for your reference.&lt;/P&gt;&lt;P&gt;&amp;nbsp; In the future, I will also port it to KDS and IAR project, and will share it in the community.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Thu, 31 Aug 2017 06:08:06 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712288#M588</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-08-31T06:08:06Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712289#M589</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, that's very helpful. I've decided to write the bootloader, using yours as a reference. I'm having trouble understanding how to manage the vector tables. Could you please explain your approach?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Here's my understanding, the vector tables location is determined by hardware. While the bootloader is running I need it's vector table active, though when the device is flashed and the app is running, I'd like to redirect the vector table to the applications vector table.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers,&lt;/P&gt;&lt;P&gt;Sam&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 04:50:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712289#M589</guid>
      <dc:creator>batts</dc:creator>
      <dc:date>2017-09-04T04:50:47Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712290#M590</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Batts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Please check this code at first:&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/28100i83B0BD3E5D6BBE6B/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;If the application code is downloaded,&amp;nbsp; then the vector will relocate to the application address, and run the application code.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Mon, 04 Sep 2017 06:42:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712290#M590</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-09-04T06:42:45Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712291#M591</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks, I see there you are reading the application vector table, retrieving the stack pointer and the program counter, though how does the hardware know the vector table has moved? This would work for applications that don't use interrupts, though interrupts would still fire in the bootloader code.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I've read you can use the VTOR register (vector table redirection register), this is what I've tried but it's not working:&lt;/P&gt;&lt;P&gt;SCB-&amp;gt;VTOR = APPLICATION_FLASH_START_ADDR;&lt;/P&gt;&lt;P&gt;I also tried&lt;/P&gt;&lt;P&gt;SCB-&amp;gt;VTOR = (APPLICATION_FLASH_START_ADDR &amp;lt;&amp;lt; SCB_VTOR_TBLOFF_Pos);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help is appreciated,&lt;/P&gt;&lt;P&gt;Thanks&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 06:49:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712291#M591</guid>
      <dc:creator>batts</dc:creator>
      <dc:date>2017-09-04T06:49:51Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712292#M592</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry,&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To be more specific, I can enter the target application though it quickly exits and gets caught in the "DefaultISR", my guess is that's due to the hardware pointing to the wrong vector table. Though I haven't solved it yet, so I'm not 100% sure.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Cheers&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 04 Sep 2017 07:42:58 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712292#M592</guid>
      <dc:creator>batts</dc:creator>
      <dc:date>2017-09-04T07:42:58Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712293#M593</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi batts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Do you do the application code vector relocate? This is very important.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; As you know, in the bootloader, I define the application code in 0x2000UL, so you need to relocate your application code and vector to 0x2000.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; If you enable the interrupt in your application code, and after enter application code, you get defaultISR, it seems your app can't find the detail vector ISR, please check the application relocation at first.&lt;/P&gt;&lt;P&gt;&amp;nbsp; Any updated question, just let me know!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Mon, 04 Sep 2017 08:55:51 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712293#M593</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-09-04T08:55:51Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712294#M594</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry, thanks.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Turns out I was managing the vector table redirection correctly. The issue was my bootloader uses interrupts and I wasn't disabling them before entering the app code, so when my app entered it was calling a UART interrupts, and no handler was defined so it called the defaultISR continuously (because the UART interrupt flag wasn't being cleared).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for your help.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 05 Sep 2017 00:45:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712294#M594</guid>
      <dc:creator>batts</dc:creator>
      <dc:date>2017-09-05T00:45:41Z</dc:date>
    </item>
    <item>
      <title>Re: KEA128 UART Bootloader</title>
      <link>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712295#M595</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi batts,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Thanks for your updated information.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; From your description, it should disables the bootloader interrupt before enter the application code.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your conclusion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&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>Tue, 05 Sep 2017 01:02:56 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MCU-Bootloader/KEA128-UART-Bootloader/m-p/712295#M595</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2017-09-05T01:02:56Z</dc:date>
    </item>
  </channel>
</rss>

