<?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: Clearing PTA1 freezes program on MKL17Z256 in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750810#M45771</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, that was helpful. Interesting that the errata only states that the pin mux is affected.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Wed, 24 Jan 2018 20:34:28 GMT</pubDate>
    <dc:creator>paulinikula</dc:creator>
    <dc:date>2018-01-24T20:34:28Z</dc:date>
    <item>
      <title>Clearing PTA1 freezes program on MKL17Z256</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750808#M45769</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I'm experiencing a strange problem with a MKL17Z256VFM4 controller that I'm working on. I set PTA1 as GPIO output pin, and I can drive the pin high without problem, but as soon as I program it to drive low, it apparently freezes the MCU. PTA2 can toggle without problem, also other pins that I have tested.&lt;/P&gt;&lt;P style="padding-left: 60px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;CLOCK_EnableClock(kCLOCK_PortA);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; PORT_SetPinMux(PORTA, 1u, kPORT_MuxAsGpio);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; PORT_SetPinMux(PORTA, 2u, kPORT_MuxAsGpio);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;GPIO_PinInit(GPIOA, 1u, &amp;amp;LED_configOutput);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; GPIO_PinInit(GPIOA, 2u, &amp;amp;LED_configOutput);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;//GPIO_ClearPinsOutput(GPIOA, 1&amp;lt;&amp;lt;1u);&amp;nbsp; //if I uncomment this, program will freeze and PTA2 will not toggle in loop&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;//del(); //a test delay. With this delay, program does not advance to the PTA2 toggle loop before freezing. Without delay it toggles PTA2 at least once before freezing.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="padding-left: 30px;"&gt;&lt;SPAN style="font-size: 12px;"&gt;for(;;) {&amp;nbsp;&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; GPIO_PortToggle(GPIOA, 0x00000004); //toggle PTA2 to see if program is running&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt;del(); //delay&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 12px;"&gt; }&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 12px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;If I program PTA1 as TPM2 timer output channel, I can generate PWM perfectly fine with it! But it will still freeze the main program! I suspect that the timer keeps running on its own although the MCU core has freezed for some reason. I have tried swapping the chip and that did not make a difference. I have checked that I don't have a short on PCB on PTA1.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;Edit:&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 15px;"&gt;I think this might be related to the internal ROM bootloader using the PTA1 pin as UART RX pin, and also possibly a USBDM bug.. Now I have found out that PTA1 works if I program the FOPT byte to boot directly from flash. If I leave the factory boot from ROM setting, the problem will appear. Now the funny thing is that USBDM flash programmer does not modify the FOPT byte until I do a small code change, recompile and reload the hex file, although the correct FOPT byte has been in my code all the time. If I select "Security: Unsecure" on USBDM flash programmer, it will program the factory FOPT byte and problem appears. Then if I select "Security: Image" so it should program FOPT byte defined by my code, it will not do it and MCU will still boot from ROM, until I recompile my code and re-flash!&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 23 Jan 2018 13:41:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750808#M45769</guid>
      <dc:creator>paulinikula</dc:creator>
      <dc:date>2018-01-23T13:41:53Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing PTA1 freezes program on MKL17Z256</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750809#M45770</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Pauli,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; You are correct , this problem is related to the ROM bootloader.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please check my document about this phenomena and the solutions:&lt;/P&gt;&lt;P&gt;&lt;A href="https://community.nxp.com/docs/DOC-332389"&gt;Problem Analysis and solutions for booting from ROM BOOTLOADER in KL series&lt;/A&gt;&amp;nbsp;&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>Wed, 24 Jan 2018 06:50:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750809#M45770</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2018-01-24T06:50:21Z</dc:date>
    </item>
    <item>
      <title>Re: Clearing PTA1 freezes program on MKL17Z256</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750810#M45771</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Kerry&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you, that was helpful. Interesting that the errata only states that the pin mux is affected.&amp;nbsp;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 24 Jan 2018 20:34:28 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/Clearing-PTA1-freezes-program-on-MKL17Z256/m-p/750810#M45771</guid>
      <dc:creator>paulinikula</dc:creator>
      <dc:date>2018-01-24T20:34:28Z</dc:date>
    </item>
  </channel>
</rss>

