<?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: PE Internal Flash driver causes core lockup in Kinetis Microcontrollers</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352211#M17451</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Kinetis MK66FN2M0VMD18 on a Custom Board and I'm facing the same troubles when I'm attempt to write or erase flash memory.&lt;/P&gt;&lt;P&gt;I cannot disable interrupt when I'm operating on flash because of the behavior of my application.&lt;/P&gt;&lt;P&gt;I'm not sure that disabling interrupt will resolve my problems but&amp;nbsp; at the same time I don't have any other valid solutions.&lt;/P&gt;&lt;P&gt;Could You explain me why disabling intterupts when executing flash commands should be the solution to this issue?&lt;/P&gt;&lt;P&gt;Is there any official document by NXP asserting this solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for Your support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 09 Mar 2017 15:40:45 GMT</pubDate>
    <dc:creator>emanuelemarracc</dc:creator>
    <dc:date>2017-03-09T15:40:45Z</dc:date>
    <item>
      <title>PE Internal Flash driver causes core lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352208#M17448</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am using the Processor Expert IntFlash component for the KE04 processor. (KDS 2.0.0).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The issue shows up when UART interrupts are being serviced within a SetBlockFlash() call(512B of data). I was able to fix the core lockup issue by disabling/enabling interrupt around this call, however I then miss the UART data coming during this write period.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is this a known issue or am I using it improperly?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Any help would be appreciated.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 17:17:48 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352208#M17448</guid>
      <dc:creator>tmeyer</dc:creator>
      <dc:date>2014-12-15T17:17:48Z</dc:date>
    </item>
    <item>
      <title>Re: PE Internal Flash driver causes core lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352209#M17449</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Tim&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Interrupts need to be disabled when programming Flash if they run in Flash. If you can put the interrupt routine in SRAM you won't need to disable interrupts when programming and so won't lose UART data (due to rx overruns).&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;It is often not very practical to put large amounts of code in SRAM so you may need to reduce the Baud rate used so that there is no overrun during each programming operation.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Make sure that the disable/enable interrupt is &lt;SPAN style="text-decoration: underline;"&gt;not&lt;/SPAN&gt; placed around the &lt;SPAN style="text-decoration: underline;"&gt;complete&lt;/SPAN&gt; block call but &lt;SPAN style="text-decoration: underline;"&gt;only&lt;/SPAN&gt; around the actual &lt;SPAN style="text-decoration: underline;"&gt;programming operatio&lt;/SPAN&gt;n (block programming of 512 bytes will take several ms whereas each individual programming operation will be taking about 100us to complete). It should be possible to work with a Baud rate of up 38'400 without underruns during programming.&lt;/P&gt;&lt;P&gt;Since sector deletes take longer, deleting should be avoided during UART activity if at all possible, if the interrupts cannot be relocated to SRAM.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is a 'normal' restriction of these devices.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM&gt;P.S. If you can use a flow control protocol (XON/XOFF or RTS/CTS) on the line you can also stop the remote transmitter from sending any data while programming/deleting.&lt;/EM&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;A href="http://www.utasker.com/kinetis.html" title="http://www.utasker.com/kinetis.html"&gt;http://www.utasker.com/kinetis.html&lt;/A&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 17:51:49 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352209#M17449</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2014-12-15T17:51:49Z</dc:date>
    </item>
    <item>
      <title>Re: PE Internal Flash driver causes core lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352210#M17450</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for that info. I am looking into designing the system to prevent rs485 data to be on the bus during flash erases/writes.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Tim&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 15 Dec 2014 21:51:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352210#M17450</guid>
      <dc:creator>tmeyer</dc:creator>
      <dc:date>2014-12-15T21:51:59Z</dc:date>
    </item>
    <item>
      <title>Re: PE Internal Flash driver causes core lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352211#M17451</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear All,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I'm using Kinetis MK66FN2M0VMD18 on a Custom Board and I'm facing the same troubles when I'm attempt to write or erase flash memory.&lt;/P&gt;&lt;P&gt;I cannot disable interrupt when I'm operating on flash because of the behavior of my application.&lt;/P&gt;&lt;P&gt;I'm not sure that disabling interrupt will resolve my problems but&amp;nbsp; at the same time I don't have any other valid solutions.&lt;/P&gt;&lt;P&gt;Could You explain me why disabling intterupts when executing flash commands should be the solution to this issue?&lt;/P&gt;&lt;P&gt;Is there any official document by NXP asserting this solution?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks for Your support,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 15:40:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352211#M17451</guid>
      <dc:creator>emanuelemarracc</dc:creator>
      <dc:date>2017-03-09T15:40:45Z</dc:date>
    </item>
    <item>
      <title>Re: PE Internal Flash driver causes core lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352212#M17452</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi&lt;/P&gt;&lt;P&gt;&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/15159i57A8FFC6CA94B716/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;There are multiple flash banks in the K66 and as long as your code is not running (and no interrupts need to run) in the Flash bank being erased/written there is no difficulty.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Mark&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 09 Mar 2017 16:31:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352212#M17452</guid>
      <dc:creator>mjbcswitzerland</dc:creator>
      <dc:date>2017-03-09T16:31:44Z</dc:date>
    </item>
    <item>
      <title>Re: PE Internal Flash driver causes core lockup</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352213#M17453</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Dear Mark,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;thank you for your answer.&lt;/P&gt;&lt;P&gt;I'm working in Run mode and MK66FN2M0VMD18 features only&amp;nbsp; 2MB program flash memory bank.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I need to store program code in the first half and data for update purposes in the second half. What I need to do is:&lt;/P&gt;&lt;P&gt;1. erase second half and write update data&lt;/P&gt;&lt;P&gt;2. erase first half and copy data from the second half.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Do I need to use program memory swap mode? Why running Interrupts may cause an error when accessing the flash bank?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Pleas note that on the ARM Community we read that a delay is required between calling the erase/write handler function and carrying out flash commands to prevent core lockup "&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="https://community.arm.com/iot/embedded/b/embedded-blog/posts/writing-data-to-flash-during-program-execution-with-the-freescale-kl25z-series" title="https://community.arm.com/iot/embedded/b/embedded-blog/posts/writing-data-to-flash-during-program-execution-with-the-freescale-kl25z-series"&gt;Writing Data To Flash During Program Execution With The Freescale KL25z Series. - Embedded blog - Embedded - ARM Communi…&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;Can You explain why this delay should be useful for our aims? How to dimension the delay?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Emanuele&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 10 Mar 2017 07:29:29 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/PE-Internal-Flash-driver-causes-core-lockup/m-p/352213#M17453</guid>
      <dc:creator>emanuelemarracc</dc:creator>
      <dc:date>2017-03-10T07:29:29Z</dc:date>
    </item>
  </channel>
</rss>

