<?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: Programming K66 Flash over UART serial port in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1298667#M60929</link>
    <description>&lt;P&gt;Hi,&amp;nbsp;Diego&lt;/P&gt;&lt;P&gt;&amp;nbsp; Becasue of hardware is there , I only can use MCU_State0 and UART0 from PTA for bootloader test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try try to change the code from the Bootloader example code from SDK. but it still doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need your help on this.&lt;/P&gt;&lt;P&gt;Here is the change what I did:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Boot Pin change :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; under baord/pin_mux.h&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;#define BOOT_PIN_SW3_GPIO GPIOA /*!&amp;lt;@brief GPIO device name: GPIOA */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define BOOT_PIN_SW3_PORT PORTA /*!&amp;lt;@brief PORT device name: PORTA */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define BOOT_PIN_SW3_PIN 4U /*!&amp;lt;@brief PORTA pin index: 10 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;under baord/pin_mux.c&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTA-&amp;gt;PCR[4] = ((PORTA-&amp;gt;PCR[4] &amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Mask bits to zero which are setting */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Pull Select: Internal pullup resistor is enabled on the corresponding pin, if the&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * corresponding PE field is set. */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | (uint32_t)(kPORT_PullUp));&lt;/P&gt;&lt;P&gt;For&amp;nbsp; Serial port change:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;under baord/pin_mux.h&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void UART0_InitPins(void);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /*! @@name PORTB16 (coord E10), U7[4]/UART0_R&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @{ */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; #define UART0_RESTOREDEFAULT_RX_PORT PORTA /*!&amp;lt;@brief PORT device name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTB */&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;#define UART0_RESTOREDEFAULT_RX_PIN 15U /*!&amp;lt;@brief PORTB pin index: 16 */&lt;BR /&gt;/* @} */&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; /*! @name PORTB17 (coord E9), U10[1]/UART0_TX&lt;BR /&gt;&amp;nbsp; @{ *&lt;BR /&gt;&amp;nbsp; &amp;nbsp;#define UART0_RESTOREDEFAULT_TX_PORT PORTA /*!&amp;lt;@brief PORT device name:&amp;nbsp; &amp;nbsp; PORTB */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #define UART0_RESTOREDEFAULT_TX_PIN 14U /*!&amp;lt;@brief PORTB pin index: 17 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Could you specific tell me anything I missed for the change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kent Yeh&lt;/P&gt;</description>
    <pubDate>Sat, 26 Jun 2021 14:00:42 GMT</pubDate>
    <dc:creator>nhitpad</dc:creator>
    <dc:date>2021-06-26T14:00:42Z</dc:date>
    <item>
      <title>Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1286867#M60708</link>
      <description>&lt;P&gt;&amp;nbsp;I'd like to re-programming the my NXP chip over&amp;nbsp;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;Kinetis Flash Tool.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;I try to pull up NMI to high and reset the chip. but I will can not touch to bootloader over the tool.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;Here is the error message what I saw.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;Error: Connect device failed(Error: Initial ping failure: No response received for ping command.).&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;I want to confirmed is that possible to programming the K66 inner&amp;nbsp; flash&amp;nbsp; over serial UART by&amp;nbsp;&lt;SPAN class="lia-link-navigation child-thread lia-link-disabled"&gt;Kinetis Flash Tool. if yes please tell what I can do for it. if not is there any way can achieve this.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 13:27:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1286867#M60708</guid>
      <dc:creator>nhitpad</dc:creator>
      <dc:date>2021-06-03T13:27:28Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1286986#M60714</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/130966"&gt;@nhitpad&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I hope you are doing well,&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;The short answer is&lt;/STRONG&gt; : It is possible to program your K66 over UART with the Kinetis flash tool (or BLhost&amp;nbsp; utility)&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;STRONG&gt;Detailed answer is&lt;/STRONG&gt; :&amp;nbsp; there are three kind of bootloaders within our Kinetis MCU:&amp;nbsp; Flash-resident , ROM resident and Flashloader. In the &lt;A href="https://www.nxp.com/design/software/development-software/mcuxpresso-software-and-tools-/mcuboot-mcu-bootloader-for-nxp-microcontrollers:MCUBOOT" target="_self"&gt;MCUboot&lt;/A&gt;&amp;nbsp; page, under the Supported Devices you will see which bootloader options are supported with our Kinetis MCUs.&lt;/P&gt;
&lt;P&gt;The K66 does not have ROM resident bootloader, but it has Flash-resident bootloader , which&amp;nbsp; will reside&amp;nbsp; at&amp;nbsp; the beginning of the flash , reserving several KB of memory. If you consider to use this bootloader option , you must ensure that&amp;nbsp; application images are above&amp;nbsp; the bootloader&amp;nbsp; area, usually 0xA000 address.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diego_charles_1-1622740349689.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/146182iB21B759FA66DFDD8/image-size/medium?v=v2&amp;amp;px=400" role="button" title="diego_charles_1-1622740349689.png" alt="diego_charles_1-1622740349689.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Here I am making sure that my target application image is above the flash-resident bootloader area.&lt;/P&gt;
&lt;P&gt;The flash-resident bootloader project for the MK66 can be found on the MCUxpresso SDK&amp;nbsp; and can be imported and flashed as a standard project ( we recommend to build the flash-loader&amp;nbsp; under release mode with optimizations to reduce its code size) .&amp;nbsp;&lt;/P&gt;
&lt;P&gt;When you have this resident bootloader you can load the binary of your application&amp;nbsp; (with its respective offset ) as you usually do.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Below you will find an snapshot of me using the Kinetis flash tool to load my a blinky binary at 0xA00 offset (with the FRDM-K64F). In my case I pressed the NMI pin, during reset to stop the bootloader from booting the application.&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diego_charles_0-1622740302425.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/146181iC21E1673A0B50ABE/image-size/medium?v=v2&amp;amp;px=400" role="button" title="diego_charles_0-1622740302425.png" alt="diego_charles_0-1622740302425.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Please take a look at the documentation at MCUBOOT. Where we provide&amp;nbsp; further details&lt;/P&gt;
&lt;P&gt;I hope this could help you.&lt;/P&gt;
&lt;P&gt;Diego.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Thu, 03 Jun 2021 17:27:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1286986#M60714</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-06-03T17:27:59Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1287335#M60729</link>
      <description>&lt;P&gt;HI,&amp;nbsp;&lt;SPAN&gt;Diego&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;Really appreciate for your quickly response. As you mentioned, to make the target application boot to bootloader module. I must create an bootloader area and put in the the correct memory address.&lt;/P&gt;&lt;P&gt;I still have a little uncertainly how to create it. Could you provide the sample code to me about how create the bootloader image. if could ,could you please also give me the memory link script of the bootloader image that I can reference.&amp;nbsp; &amp;nbsp; &amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 07:20:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1287335#M60729</guid>
      <dc:creator>nhitpad</dc:creator>
      <dc:date>2021-06-04T07:20:32Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1287655#M60739</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/130966"&gt;@nhitpad&lt;/a&gt;&lt;/P&gt;
&lt;P&gt;Just a point that I forgot to mention : on the K66 SDK, the flash-resident bootloader is named as&amp;nbsp;frdmk66f_freedom_bootloader.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Regarding the creation of the image, there is a sample project that you can check&amp;nbsp;&lt;EM&gt;frdmk66f_led_demo_freedom_a000 .&amp;nbsp; &lt;/EM&gt;You can find its linker script directly following this path:&amp;nbsp; &lt;EM&gt;frdmk66f_led_demo_freedom_a000-&amp;gt;&lt;/EM&gt;middleware-&amp;gt;mcu-boot.&amp;nbsp; (Depending your toolchain its location may change a bit, but that's for the MCUXpresso IDE)&lt;/P&gt;
&lt;P&gt;I recommend you to take a look at the&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/user-guide/MBOOTDEMOUG.pdf" target="_blank" rel="noopener"&gt;MCU Bootloader Demo Applications&lt;/A&gt;&lt;BR /&gt;&lt;A href="https://www.nxp.com/docs/en/user-guide/MBOOTDEMOUG.pdf" target="_blank" rel="noopener"&gt;User's Guide&lt;/A&gt;&amp;nbsp;There you will find relevant information how to use the bootloader to load an application image. Also, regarding the 0xA000 offset for the image,&lt;EM&gt; chapter&amp;nbsp;7.1 Memory map overview&lt;/EM&gt;&amp;nbsp;will be useful to&amp;nbsp; visualize &amp;nbsp;the use of the memory by the application and the bootloader.&lt;/P&gt;
&lt;P&gt;To move and application to the 0xA000 with ease, in the MCUXpresso IDE, you can go to project properties-&amp;gt;MCU settings-&amp;gt; Memory details and adjust the base address of the flash.&lt;/P&gt;
&lt;P&gt;I hope it helps,&lt;/P&gt;
&lt;P&gt;Diego.&lt;/P&gt;</description>
      <pubDate>Fri, 04 Jun 2021 16:50:50 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1287655#M60739</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-06-04T16:50:50Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1288663#M60781</link>
      <description>&lt;P&gt;HI ,&amp;nbsp; &lt;SPAN&gt;Diego&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp;Thanks for you response but I still can not made my board&amp;nbsp; too bootloader mode.&lt;/SPAN&gt;&lt;SPAN&gt;I tried to reprogramming the FW as blow I Programming both Freedeom_bootlaoder and led_demo_freedeom_a000. I've set update the start address for both led_demo_freedom_a000.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Set application image (led_demo_freedeom_a000)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; Set on project Explorer&amp;nbsp; Project_settings ==&amp;gt; Memory ==&amp;gt;edit memory ==&amp;gt; change flash location to 0xa000. Size to 0x200000.&amp;nbsp; Build image and create binary image&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;No change for the&amp;nbsp;Freedeom_bootlaoder&amp;nbsp; and build image and create binary image.(start from 0x0000)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Programming step&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. using J-Flash Lite programming the&amp;nbsp;Freedeom_bootlaoder start from 0x00&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. Programming the application image(led_demo_freedeom_a000)&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;3. PULL high NMI and press rest Switch.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;4. Sen command&amp;nbsp; blhost -p COM5 -- get-property 12&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;5. ==&amp;gt; Get&amp;nbsp; Error: Initial ping failure: No response received for ping command.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Did I do any operation wrong .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;Kent Yeh&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 03:09:46 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1288663#M60781</guid>
      <dc:creator>nhitpad</dc:creator>
      <dc:date>2021-06-08T03:09:46Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1288671#M60782</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/130966"&gt;@nhitpad&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Thank you for your reply!&lt;/P&gt;
&lt;P&gt;Ok, could you check if you have the same serial pins that the K66 bootloader uses?&lt;/P&gt;
&lt;P&gt;See&amp;nbsp;&lt;A href="https://www.nxp.com/docs/en/user-guide/MBOOTDEMOUG.pdf#page=35" target="_self"&gt;Table 9. MK66F18 bootloader – FRDM-K66F&lt;/A&gt;&lt;/P&gt;
&lt;P&gt;Also , Double check the boot-pin for the K66 bootloader , see&amp;nbsp; &lt;A href="https://www.nxp.com/docs/en/user-guide/MBOOTDEMOUG.pdf#page=26" target="_self"&gt;Figure 24. FRDM-K66F platform&amp;nbsp;&lt;/A&gt;&amp;nbsp;, on the FRDM-K66F the boot-pin corresponds to the SW3, which is PTA10, actually it is not NMI.&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper lia-image-align-inline" image-alt="diego_charles_0-1623122917451.png" style="width: 400px;"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/146507i55DCFFE7F448E36B/image-size/medium?v=v2&amp;amp;px=400" role="button" title="diego_charles_0-1623122917451.png" alt="diego_charles_0-1623122917451.png" /&gt;&lt;/span&gt;&lt;/P&gt;
&lt;P&gt;Let me know your findings&lt;/P&gt;
&lt;P&gt;All the best&lt;/P&gt;
&lt;P&gt;Diego.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Tue, 08 Jun 2021 03:37:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1288671#M60782</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-06-08T03:37:12Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1297432#M60915</link>
      <description>&lt;P&gt;&lt;SPAN&gt;Hi , Diego.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;&amp;nbsp; Sorry for&amp;nbsp; take so long time to response. Because of we met some of the hardware level issue.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;On the board. We have discuss with the PIN but according the hardware design is already there.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I can not heck the board for SW 3.&amp;nbsp; &amp;nbsp;Therefore I want to check is there any SW level way to led the board to boot loader mode.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;I have 2 question wait to check wit you. &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1 . From the Kite tool is there is any way can control and PTA 10 over Software level ?( or using bhost)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;2. In my current design I can control the PIN PTA4. Is there any way I can bypass the PTA 4 to PTA10&amp;nbsp; to handling the PIN status?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Kent Yeh&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;</description>
      <pubDate>Thu, 24 Jun 2021 07:11:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1297432#M60915</guid>
      <dc:creator>nhitpad</dc:creator>
      <dc:date>2021-06-24T07:11:43Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1298667#M60929</link>
      <description>&lt;P&gt;Hi,&amp;nbsp;Diego&lt;/P&gt;&lt;P&gt;&amp;nbsp; Becasue of hardware is there , I only can use MCU_State0 and UART0 from PTA for bootloader test.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Try try to change the code from the Bootloader example code from SDK. but it still doesn't work.&amp;nbsp;&lt;/P&gt;&lt;P&gt;Need your help on this.&lt;/P&gt;&lt;P&gt;Here is the change what I did:&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;Boot Pin change :&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; under baord/pin_mux.h&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;#define BOOT_PIN_SW3_GPIO GPIOA /*!&amp;lt;@brief GPIO device name: GPIOA */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define BOOT_PIN_SW3_PORT PORTA /*!&amp;lt;@brief PORT device name: PORTA */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;#define BOOT_PIN_SW3_PIN 4U /*!&amp;lt;@brief PORTA pin index: 10 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;nbsp;under baord/pin_mux.c&amp;nbsp; &amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTA-&amp;gt;PCR[4] = ((PORTA-&amp;gt;PCR[4] &amp;amp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; /* Mask bits to zero which are setting */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; (~(PORT_PCR_PS_MASK | PORT_PCR_PE_MASK | PORT_PCR_ISF_MASK)))&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;/* Pull Select: Internal pullup resistor is enabled on the corresponding pin, if the&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; * corresponding PE field is set. */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; | (uint32_t)(kPORT_PullUp));&lt;/P&gt;&lt;P&gt;For&amp;nbsp; Serial port change:&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp;under baord/pin_mux.h&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; void UART0_InitPins(void);&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; /*! @@name PORTB16 (coord E10), U7[4]/UART0_R&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; @{ */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp; #define UART0_RESTOREDEFAULT_RX_PORT PORTA /*!&amp;lt;@brief PORT device name:&amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;PORTB */&amp;nbsp;&lt;BR /&gt;&amp;nbsp; &amp;nbsp; &amp;nbsp;#define UART0_RESTOREDEFAULT_RX_PIN 15U /*!&amp;lt;@brief PORTB pin index: 16 */&lt;BR /&gt;/* @} */&lt;/P&gt;&lt;P&gt;&amp;nbsp; &amp;nbsp; /*! @name PORTB17 (coord E9), U10[1]/UART0_TX&lt;BR /&gt;&amp;nbsp; @{ *&lt;BR /&gt;&amp;nbsp; &amp;nbsp;#define UART0_RESTOREDEFAULT_TX_PORT PORTA /*!&amp;lt;@brief PORT device name:&amp;nbsp; &amp;nbsp; PORTB */&lt;BR /&gt;&amp;nbsp; &amp;nbsp; #define UART0_RESTOREDEFAULT_TX_PIN 14U /*!&amp;lt;@brief PORTB pin index: 17 */&lt;/P&gt;&lt;P&gt;&amp;nbsp; Could you specific tell me anything I missed for the change.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Thanks&amp;nbsp;&lt;/P&gt;&lt;P&gt;Kent Yeh&lt;/P&gt;</description>
      <pubDate>Sat, 26 Jun 2021 14:00:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1298667#M60929</guid>
      <dc:creator>nhitpad</dc:creator>
      <dc:date>2021-06-26T14:00:42Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1305646#M61011</link>
      <description>&lt;P&gt;Hi&amp;nbsp;&lt;a href="https://community.nxp.com/t5/user/viewprofilepage/user-id/130966"&gt;@nhitpad&lt;/a&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;I think that you will also need to corroborate the following defines for&amp;nbsp;the default boot pin&amp;nbsp; the file hardware_init_MK66F12.c. For example, those are for the MK64 bootloader.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;#define BOOT_PIN_NUMBER 6
#define BOOT_PIN_GPIO GPIOC&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;The function&amp;nbsp; is_boot_pin_asserted() checks for the state of the boot pin of the bootloader, using the &amp;nbsp;BOOT_PIN_NUMBER define.&amp;nbsp; That's&amp;nbsp; why this definitions are required .&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;LI-CODE lang="c"&gt;bool is_boot_pin_asserted(void)
{
#ifdef BL_TARGET_FLASH
    BOARD_InitBootPin();

    uint32_t readCount = 0;

    // Sample the pin a number of times
    for (uint32_t i = 0; i &amp;lt; BOOT_PIN_DEBOUNCE_READ_COUNT; i++)
    {
        readCount += ((BOOT_PIN_GPIO-&amp;gt;PDIR) &amp;gt;&amp;gt; BOOT_PIN_NUMBER) &amp;amp; 1;
    }

    // boot pin is pulled high so we are measuring lows, make sure most of our measurements
    // registered as low
    return (readCount &amp;lt; (BOOT_PIN_DEBOUNCE_READ_COUNT / 2));
#else
    // Boot pin for Flash only target
    return false;
#endif
}&lt;/LI-CODE&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;Please accept my apologies as well for the late response (I have missed your reply to an error in the system). Probably , in the meantime,&amp;nbsp; you did completed this modification to your bootloader.&lt;/P&gt;
&lt;P&gt;Let me hear from you.&lt;/P&gt;
&lt;P&gt;Diego.&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;
&lt;P&gt;&amp;nbsp;&lt;/P&gt;</description>
      <pubDate>Fri, 09 Jul 2021 21:16:55 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1305646#M61011</guid>
      <dc:creator>diego_charles</dc:creator>
      <dc:date>2021-07-09T21:16:55Z</dc:date>
    </item>
    <item>
      <title>Re: Programming K66 Flash over UART serial port</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1373041#M61882</link>
      <description>&lt;P&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Hi,&amp;nbsp;&lt;SPAN&gt;Diego&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;Thanks&amp;nbsp; for your response , actually I still have some other issue want to check.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN&gt;1. as you response&amp;nbsp; &amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;PRE&gt;#define BOOT_PIN_NUMBER 6&lt;/PRE&gt;&lt;P&gt;This one should be&amp;nbsp; 4 right right ? because the MCU_state pin is PTA4. So it should be number 4 or there is other definition for it ?&lt;/P&gt;&lt;P&gt;Also I have one issues I 'd like to change the boot UART port from UART0( original bootloader define) to UART 4.&amp;nbsp;&amp;nbsp;&lt;/P&gt;&lt;P&gt;2 tings need your help:&lt;/P&gt;&lt;P&gt;1. Because of I am not using EVK for test and my test board is using external clock. Should I modified the BOARD_BootClockRUN_PEE(void) to external clock definition?&lt;/P&gt;&lt;P&gt;2. To change the UART port from 0 to 4&amp;nbsp;&lt;/P&gt;&lt;P&gt;I direct replace the UART0 to UART 4 as follow.&amp;nbsp;&lt;/P&gt;&lt;P&gt;But it still doesn't work could you specific tell me does there have any place I also need to change.&lt;/P&gt;&lt;P&gt;void UART4_InitPins(void)&lt;BR /&gt;{&lt;/P&gt;&lt;P&gt;/* Port B Clock Gate Control: Clock enabled */&lt;BR /&gt;CLOCK_EnableClock(kCLOCK_PortC);&lt;/P&gt;&lt;P&gt;const port_pin_config_t UART4_RX = {/* Internal pull-up/down resistor is disabled */&lt;BR /&gt;kPORT_PullDisable,&lt;BR /&gt;/* Fast slew rate is configured */&lt;BR /&gt;kPORT_FastSlewRate,&lt;BR /&gt;/* Passive filter is disabled */&lt;BR /&gt;kPORT_PassiveFilterDisable,&lt;BR /&gt;/* Open drain is disabled */&lt;BR /&gt;kPORT_OpenDrainDisable,&lt;BR /&gt;/* Low drive strength is configured */&lt;BR /&gt;kPORT_LowDriveStrength,&lt;BR /&gt;/* Pin is configured as UART0_RX */&lt;BR /&gt;kPORT_MuxAlt3,&lt;BR /&gt;/* Pin Control Register fields [15:0] are not locked */&lt;BR /&gt;kPORT_UnlockRegister};&lt;BR /&gt;/* PORTD2 (pin C4) is configured as UART2_RX */&lt;BR /&gt;PORT_SetPinConfig(PORTC, 14U, &amp;amp;UART4_RX);&lt;/P&gt;&lt;P&gt;const port_pin_config_t UART4_TX = {/* Internal pull-up/down resistor is disabled */&lt;BR /&gt;kPORT_PullDisable,&lt;BR /&gt;/* Fast slew rate is configured */&lt;BR /&gt;kPORT_FastSlewRate,&lt;BR /&gt;/* Passive filter is disabled */&lt;BR /&gt;kPORT_PassiveFilterDisable,&lt;BR /&gt;/* Open drain is disabled */&lt;BR /&gt;kPORT_OpenDrainDisable,&lt;BR /&gt;/* Low drive strength is configured */&lt;BR /&gt;kPORT_LowDriveStrength,&lt;BR /&gt;/* Pin is configured as UART0_TX */&lt;BR /&gt;kPORT_MuxAlt3,&lt;BR /&gt;/* Pin Control Register fields [15:0] are not locked */&lt;BR /&gt;kPORT_UnlockRegister};&lt;BR /&gt;/* PORTD3 (pin B4) is configured as UART2_TX */&lt;BR /&gt;PORT_SetPinConfig(PORTC, 15U, &amp;amp;UART4_TX);&lt;/P&gt;&lt;P&gt;SIM-&amp;gt;SOPT5 = ((SIM-&amp;gt;SOPT5 &amp;amp;&lt;BR /&gt;/* Mask bits to zero which are setting */&lt;BR /&gt;(~(SIM_SOPT5_UART0TXSRC_MASK)))&lt;/P&gt;&lt;P&gt;/* UART 0 transmit data source select: UART0_TX pin. */&lt;BR /&gt;| SIM_SOPT5_UART0TXSRC(SOPT5_UART0TXSRC_UART_TX));&lt;/P&gt;</description>
      <pubDate>Thu, 18 Nov 2021 01:51:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Programming-K66-Flash-over-UART-serial-port/m-p/1373041#M61882</guid>
      <dc:creator>nhitpad</dc:creator>
      <dc:date>2021-11-18T01:51:44Z</dc:date>
    </item>
  </channel>
</rss>

