<?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: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252559#M7243</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No no, you did not mislead me, no worries about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I am not using IAR, I am using Code Warrior 10.4. I have my project running great but win_hc08sprg.exe will not recognize my bootloader. Is it more difficult to work with CW and an2295? So, I guess what I should have asked in my last post was... for letter A on this thread (&lt;SPAN style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;A: H/W doesn't work with AN2295 firmware in OpenSDA. (solved)&lt;/STRONG&gt;&lt;/SPAN&gt;), is that directions for IAR or CW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and sorry for any confusion. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 09 Oct 2013 12:26:07 GMT</pubDate>
    <dc:creator>lander</dc:creator>
    <dc:date>2013-10-09T12:26:07Z</dc:date>
    <item>
      <title>Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252552#M7236</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;AN2295 doesn't work well on FRDM-KL25Z. Additionally, it is hardly to be debugged on FRDM. And here is my evaluating report.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;A: H/W doesn't work with AN2295 firmware in OpenSDA. (solved)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I enable "Kinetis L Debug" and changed following project options.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; General Options\Target\Device: Freescale MKL25Z128xxx4&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Debugger\Setup\Driver: PE micro, Run to: __main&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Download\Verify download checked + Use flash loader + Override "$TOOLKIT_DIR$\config\flashloader\Freescale\FlashKLxx128K.board"&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; PEmicro\Setup\OpenSDA-USA&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;The previous options are configured in simulator and run to "main", which will be complaint by debugger for "can not run to main".&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It takes me quite a long time before I realize that I am working in a simulator mode.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;B: Strange reset behavior. The code only runs to __main until a system reset from an invalid address. (partly solved)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;When I click reset in IAR debugger, the code will stop at __main. Look good? No!&lt;/P&gt;&lt;P&gt;If I enable bkp on UART_Initialization(), the reset will stop at this function, instead of __main().&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I traced its every step in disassembly, I found it runs in following ways.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; reset --&amp;gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; // 0x0000&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UART_Initialization();&amp;nbsp; // @0x0040&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; TIMER_DEINIT(BOOT_CALIBRATION_TIMER_BASE);&amp;nbsp; // by timeout&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; ......&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JumpToUserApplication();&amp;nbsp;&amp;nbsp;&amp;nbsp; // @0x041C: jumps to an invalid memory&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; --&amp;gt; __main&amp;nbsp; // 0x0540&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;That means when I pressed reset, the software goes to UART first, then it goes to invalid memory after timeout, then it stops on __main due to system reset. What an amazing loop!&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Additionally, the map file is different from disassembly window, which has a byte shift.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; *.map file:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UART_Initialization&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000041&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JumpToUserApplication&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x0000041d&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __main&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x00000541&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I know some startup functions will be called before main(), that is normal. But this situation is strange, since UART function is not part of startup. That is definately a bug. I checked its vector table, which contains 16 vectors. Although KL25Z have 48 vectors, the first 16 vectors are core vectors. In bootloader mode, UART is not interrupt driven, it is enough. I will add more periperal vecotrs anyway, as additional test.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #ff0000;"&gt;&lt;STRONG&gt;For some reason, the reset vector has not directed to __main.&lt;/STRONG&gt;&lt;/SPAN&gt; Alternatively, the reset in debugger has not performed a real reset. It runs for a while, then stops on __main.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Attached disassembly log.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; UART_Initialization():&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x05F0: 0xF7FF-0xFD26&amp;nbsp;&amp;nbsp; BL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; UART_Initialization&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @0x0040:&amp;nbsp;&amp;nbsp;&amp;nbsp; UART_Initialization&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; JumpToUserApplication(*((unsigned long*)RELOCATED_VECTORS), *((unsigned long*)(RELOCATED_VECTORS+4)));&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0x07CC: 0xF7FF-0xFE26&amp;nbsp;&amp;nbsp; BL&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; JumpToUserApplication&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; @0x041C:&amp;nbsp;&amp;nbsp;&amp;nbsp; JumpToUserApplication&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; __asm("mov pc, r1"); // PC = 0x00000424, R1 = 0xD100286F&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; -&amp;gt; __main() @0x0540&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update &lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I have changed its linker file (AN2295_LinkerFile.icf), by changing&lt;/P&gt;&lt;P&gt;define symbol IntVectTable_end__&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; = 0x000003FF; // original value is 0x0000003F&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;It doesn't help.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Up to now, I have no idea to force debugger to stop at __main first, instead of UART_initialization.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Temp solution&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG style=": ; color: #339966;"&gt;By accident, I found if run to parameter is blank, the debugger will stop at __main/main without running to UART function. That is wired. However now it works.&lt;/STRONG&gt;&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;C: Why system jumps to user application even it is invalid? (partly solved)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I know it may lead to reset to run bootloader again, but why using such a ugly approach? Maybe WDT is good enough? By enable it and wait for reset? Or software reset?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please correct me if I have anyhting wrong. Attachment is my revised (adding GPIO to toggle LED as indicator).&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;D: Why bootloader use __main to replace main()? (solved)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Is there any particular reason behind this replacement?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;I changed __main to main, by changing three places:&lt;/P&gt;&lt;P&gt;IDE options, stack&lt;/P&gt;&lt;P&gt;Project options, program entry&lt;/P&gt;&lt;P&gt;bootloader.c, all __main&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;However, it doesn't matter if program entry is main or __main.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Please help out of this issue since it confuses me a lot.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Currently I enforced it into bootloader mode, with LED indicator. I know it MAY work in such situation. I am still working on it. But its reset behavior always a nightmare for me.&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Update and Temp solution (2013-08-15)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="; color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;A: H/W doesn't work with AN2295 firmware in OpenSDA. (solved)&lt;/STRONG&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Change debugger from Simulator to PEmicro/OpenSDA and other project options in "Kenitis L Debug" configuration.&lt;/SPAN&gt;&lt;SPAN style="; color: #339966; text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;B: Strange reset behavior. The code only runs to __main until a system reset from an invalid address. (partly solved)&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG&gt;C: Why system jumps to user application even it is invalid? (partly solved)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Keep run to parameter as blank, nor "main" neither "_main". That is a common solution for B &amp;amp; C.&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;D: Why bootloader use __main to replace main()? (solved)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; It is easy, you can change options from __main to main.&lt;/SPAN&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;E: Baudrate error (partly solved)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Change default baudrate to 57600, it works on my PC now.&lt;/SPAN&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;F: Without demo application (I'm working on it)&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #000000;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; FSL should at least offer a demo project for AN2295, such as FRDM-KL25Z-DEMO-w/ AN2295 bootloader project. I am working on it now. It may have more issues.&lt;SPAN style="text-decoration: underline;"&gt;&lt;BR /&gt;&lt;/SPAN&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #339966;"&gt;The source code is almost same, so I don't upload it again.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;STRONG style="color: #ff0000;"&gt;&lt;STRONG style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;Well, it seems FSL should update AN2295 for KL25Z. It could save use a lot of time, time to market. And FSL' time to collect orders from us. isn't it?&lt;/P&gt;&lt;P style="min-height: 8pt; padding: 0px;"&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Message was edited by: Kai Liu&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Original Attachment has been moved to: &lt;A _jive_internal="true" href="https://community.nxp.com/docs/DOC-337633"&gt;Kinetis_rev2_strange_reset.zip&lt;/A&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 13 Aug 2013 13:23:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252552#M7236</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-08-13T13:23:59Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252553#M7237</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;For Question B + C, the solution is disable project options' run to "main" or "__main". The debugger will reset to __main. &lt;STRONG&gt;Amazing debugger! If you want it, release it first. &lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Now, the new situation is wrong traffic in "ident" command.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In KL25Z, the ident response should be:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (Version), 0x88&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SDID-H), 0x14&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (SDID-L), 0x86&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (bootloaderIdent)&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00 00 00 01 00 00 10 00 00 00 ff ff 00 00 10 00 00 00 00 00 00 00 04 00 00 00 00 80 4b 4c 32 00 00&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;And these byte arrays are verified in memory window. And I double verified it in uart_putchar(). However the real receiver on PC gets following traffic:&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;&amp;nbsp;&amp;nbsp; Traffic:&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 00 00 00 00 00 00 00 00 00 FC FC FC &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 88 14 86 &lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 80 80 80 01 80 80 10 80 80 80 FF FF 80 80 10 80 80 80 80 80 80 80 04 80 80 80 80 80 4B 4C 32 80 80 &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Then I enforeced to send bootloaderIdent in constant byte arrays, instead of structure def. But I got same result. &lt;STRONG&gt;It seems that UART_putchar are trimmed in a wrong timing?&lt;/STRONG&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 13:32:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252553#M7237</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-08-14T13:32:27Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252554#M7238</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;There is a bug in the KL25Z silicon around UART baud, not sure if this is what you are seeing.&lt;/P&gt;&lt;P&gt;The problem depends on the clock path, see&lt;/P&gt;&lt;P&gt;&lt;A href="http://mcuoneclipse.com/2013/02/17/be-aware-of-the-baud-problem/" title="http://mcuoneclipse.com/2013/02/17/be-aware-of-the-baud-problem/"&gt;Be Aware of the Baud Problem | MCU on Eclipse&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 14 Aug 2013 15:12:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252554#M7238</guid>
      <dc:creator>BlackNight</dc:creator>
      <dc:date>2013-08-14T15:12:21Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252555#M7239</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Well, that is an useful information. Thanks!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Currently I slow-down its baudrate, so I got it working on 57600bps. Amazing.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="FSL_AN2295_Bootloader.PNG.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/40442i87A31B35D9EEA787/image-size/large?v=v2&amp;amp;px=999" role="button" title="FSL_AN2295_Bootloader.PNG.png" alt="FSL_AN2295_Bootloader.PNG.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have updated and summary my discussion thread. It seems most of things are correct, unless we use in wrong way with wrong options. &lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Since FSL doesn't offer off-the-shelf demo for A2295, I am working on one with modified linker icf file.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 15 Aug 2013 02:31:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252555#M7239</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-08-15T02:31:50Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252556#M7240</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have shared my experiences on porting AN2295 to FRDM-KL25Z at FSL community:&lt;A _jive_internal="true" data-containerid="40624" data-containertype="2020" data-objectid="95429" data-objecttype="102" href="https://community.nxp.com/docs/DOC-95429" style="font-family: 'Helvetica Neue', Helvetica, Arial, 'Lucida Grande', sans-serif; color: #3778c7;"&gt;https://community.freescale.com/docs/DOC-95429&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 20 Aug 2013 23:52:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252556#M7240</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-08-20T23:52:45Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252557#M7241</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Is letter A for CW (I'm on CW 10.4)? Or for IAR? I'm asking because the GUI (&lt;SPAN style="line-height: 107%; font-family: 'Calibri','sans-serif'; font-size: 11pt; mso-ascii-theme-font: minor-latin; mso-fareast-font-family: Calibri; mso-fareast-theme-font: minor-latin; mso-hansi-theme-font: minor-latin; mso-bidi-font-family: 'Times New Roman'; mso-bidi-theme-font: minor-bidi; mso-ansi-language: EN-US; mso-fareast-language: EN-US; mso-bidi-language: AR-SA;"&gt;win_hc08sprg.exe) won't recognize my bootloader. I am trying to figure out these two:&amp;nbsp; &lt;/SPAN&gt;Download\Verify download checked + Use flash loader + Override "$TOOLKIT_DIR$\config\flashloader\Freescale\FlashKLxx128K.board" &amp;amp;&amp;amp; PEmicro\Setup\OpenSDA-USA.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 04 Oct 2013 20:39:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252557#M7241</guid>
      <dc:creator>lander</dc:creator>
      <dc:date>2013-10-04T20:39:23Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252558#M7242</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;It should be AN2295, instead of A2295. Sorry for misleading you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;In my experience, the code is working well, but IAR should be configured correctly to be debugged first. You can try &lt;A _jive_internal="true" class="loading" href="https://community.nxp.com/docs/DOC-95429" title="https://community.freescale.com/docs/DOC-95429"&gt;https://community.freescale.com/docs/DOC-95429&lt;/A&gt; for detail.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 08 Oct 2013 08:22:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252558#M7242</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-10-08T08:22:52Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252559#M7243</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;No no, you did not mislead me, no worries about that.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;My problem is that I am not using IAR, I am using Code Warrior 10.4. I have my project running great but win_hc08sprg.exe will not recognize my bootloader. Is it more difficult to work with CW and an2295? So, I guess what I should have asked in my last post was... for letter A on this thread (&lt;SPAN style="color: #339966; text-decoration: underline;"&gt;&lt;STRONG&gt;A: H/W doesn't work with AN2295 firmware in OpenSDA. (solved)&lt;/STRONG&gt;&lt;/SPAN&gt;), is that directions for IAR or CW?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you and sorry for any confusion. &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 12:26:07 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252559#M7243</guid>
      <dc:creator>lander</dc:creator>
      <dc:date>2013-10-09T12:26:07Z</dc:date>
    </item>
    <item>
      <title>Re: Something wrong with AN2295 bootloader on FRDM-KL25Z for its reset behaviour</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252560#M7244</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I have not tested it on CW, since I am using open source gcc-arm + eclipse to replace it. As my experience, the win-hcsprg.exe is out of maintenance. So either check it in VC++, or develop your own with "glue" language. I know it is painful.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 09 Oct 2013 23:30:02 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Something-wrong-with-AN2295-bootloader-on-FRDM-KL25Z-for-its/m-p/252560#M7244</guid>
      <dc:creator>kai_liu</dc:creator>
      <dc:date>2013-10-09T23:30:02Z</dc:date>
    </item>
  </channel>
</rss>

