<?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>Kinetis Microcontrollers中的主题 Re: pFlashCommandSequence RAM Function resets board</title>
    <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659887#M40482</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are convenient, could you upload your problem project? If the project have the important code, you can delete it, just leave the flash operation code which can reflect the problem, I will test it on my FRDM-K64 board, this will be useful to find the root problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Waiting for your reply!&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, 25 Oct 2016 02:50:34 GMT</pubDate>
    <dc:creator>kerryzhou</dc:creator>
    <dc:date>2016-10-25T02:50:34Z</dc:date>
    <item>
      <title>pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659884#M40479</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hello,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have a custom board using a MK24FN1M0VLQ12 with freeRTOS, and KSDK 1.3.0.&lt;/P&gt;&lt;P&gt;If I step through the RAM Function called by pFlashCommandSequence using &lt;STRONG&gt;Instruction Stepping Mode&lt;/STRONG&gt;, with Interrupts Disabled/Enabled, I can execute these functions. Though when I Step Over or Resume I can not get to the next break point.&lt;/P&gt;&lt;P&gt;I saw this&amp;nbsp;&lt;A href="https://community.nxp.com/thread/391288"&gt;Can't get flash erasing and writing on MK22FN128VLH10 to work&lt;/A&gt;.&lt;/P&gt;&lt;P&gt;My Flash Clock on my board is set to 10.48576 MHz&lt;/P&gt;&lt;P&gt;The Flash Clock in Run Mode works up to 25MHz.&lt;/P&gt;&lt;P&gt;The Flash Clock in VLPR Mode works up to 800kHz&lt;/P&gt;&lt;P&gt;I think I should be in the clear for that.&amp;nbsp;I am not running VLPR (Very Low Power Run) mode.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Is alignment an issue?&lt;/P&gt;&lt;P&gt;The Flash Demo projects in K64F and K22F boards don't use any alignments in their RAM Functions that I can see.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Why would my board reset when running these RAM Functions?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jason Philippi&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 21 Oct 2016 20:51:23 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659884#M40479</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-10-21T20:51:23Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659885#M40480</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Your problem should be caused by the interrupt, the flash operation command can't be interrupted.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; So, before you do the flash operation, please disable the&lt;STRONG&gt; global interrupt&lt;/STRONG&gt;, after the flash operation is finished, enable the global interrupt again.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please disable the global interrupt, and try again.&lt;/P&gt;&lt;P&gt;#define EnableInterrupt&amp;nbsp; asm("cpsie i");&lt;BR /&gt;#define DisableInterrupt&amp;nbsp; asm("cpsid i");&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Wish it helps you!&lt;/P&gt;&lt;P&gt;If you still have question, please contact me!&lt;/P&gt;&lt;P&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, 24 Oct 2016 07:08:43 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659885#M40480</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-10-24T07:08:43Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659886#M40481</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I was using&amp;nbsp;INT_SYS_DisableIRQGlobal() and&amp;nbsp;INT_SYS_EnableIRQGlobal() from fsl_interrupt_manager.c which is the same as what you defined. I used your version and that didn't work either.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The board still resets after stepping over the command sequence.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 24 Oct 2016 18:24:54 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659886#M40481</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-10-24T18:24:54Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659887#M40482</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; If you are convenient, could you upload your problem project? If the project have the important code, you can delete it, just leave the flash operation code which can reflect the problem, I will test it on my FRDM-K64 board, this will be useful to find the root problem.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Waiting for your reply!&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, 25 Oct 2016 02:50:34 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659887#M40482</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-10-25T02:50:34Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659888#M40483</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I am currently porting it over to my FRDM-K64 board. I have to strip out things I don't want public.&lt;/P&gt;&lt;P&gt;I'll have 3 tasks running the tri color LED and 1 task running the Flash Swap.&amp;nbsp;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Hopefully I'll have it up next week.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 27 Oct 2016 21:44:37 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659888#M40483</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-10-27T21:44:37Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659889#M40484</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I understand you!&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; After you porting it to the FRDM-K64, and reproduce your problem, just send me your project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; I would like to help you to check it!&lt;/P&gt;&lt;P&gt;Waiting for your updated information!&lt;/P&gt;&lt;P&gt;Best Regards&lt;/P&gt;&lt;P&gt;Kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 28 Oct 2016 10:01:52 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659889#M40484</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-10-28T10:01:52Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659890#M40485</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I attached the project zip and a set of components I use from &lt;A class="link-titled" href="https://mcuoneclipse.com/" title="https://mcuoneclipse.com/"&gt;https://mcuoneclipse.com/&lt;/A&gt;&amp;nbsp;.&lt;/P&gt;&lt;P&gt;You will have to import and link the components with processor expert.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;There are 3 independent tasks running the Tri-color LED. They are set to cycle through all possible colors from OFF to White.&lt;/P&gt;&lt;P&gt;The flash_task will start but, will then wait for a notification to wake it up.&lt;/P&gt;&lt;P&gt;Press SW3 to wake up the task to start.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I have not verified the programming of the upper flash because stepping by instruction sets would take too long.&lt;/P&gt;&lt;P&gt;The problem occurs at the first call of&amp;nbsp;pFlashCommandSequence from&amp;nbsp;PFlashSwapCtl in flash_swap().&lt;/P&gt;&lt;P&gt;If I don't step through it by instruction set, the board will reset.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Let me know what you think.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 01 Nov 2016 00:29:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659890#M40485</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-11-01T00:29:21Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659891#M40486</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason Philippi,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Thank you for your more details.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please tell me what the IDE you are using? Codewarrior?&lt;/P&gt;&lt;P&gt;I use CW open it, it have a lot of errors:&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/6039iBB90AD2B74214489/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;&lt;/P&gt;&lt;P&gt;About the component you attached, please give me a picture how to import to your project.&lt;/P&gt;&lt;P&gt;Thank you and wait for your reply!&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 06:10:40 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659891#M40486</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-11-03T06:10:40Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659892#M40487</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;I am using Kinetis Design Studio 3.2.0 with KSDK 1.2.0 for the FRDM-K64F board.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You will need to install KSDK 1.2.0 for all the components except FreeRTOS.&lt;/P&gt;&lt;P&gt;I believe that should be possible through Help -&amp;gt; Install New Software...&lt;/P&gt;&lt;P&gt;Freescale KDS Update Site - &lt;A class="unlinked"&gt;http://freescale.com/lgfiles/updates/Eclipse/KDS&lt;/A&gt;&lt;/P&gt;&lt;P&gt;Select KSDK 1.2.0 Eclipse Update&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;To install FreeRTOS component from mcuoneclipse.com&lt;/P&gt;&lt;P&gt;Extract Components into workspace folder but not the project folder.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-Components-1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6207i2B34EBBAD42C92B9/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-Components-1.png" alt="import-Components-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Select the two beans&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-Components-2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6257i425A53F5BA34F17F/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-Components-2.png" alt="import-Components-2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Create a new component&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-Components-3.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6345i76DD57421BD36587/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-Components-3.png" alt="import-Components-3.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This is where I have the components&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="import-Components-4.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6430i41F3490048B49309/image-size/large?v=v2&amp;amp;px=999" role="button" title="import-Components-4.png" alt="import-Components-4.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;If the FreeRTOS component shows a red X over it, then change the repository like this.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Change-Repository-1.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/5998i65382EA646BB8877/image-size/large?v=v2&amp;amp;px=999" role="button" title="Change-Repository-1.png" alt="Change-Repository-1.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="Change-Repository-2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/6044i8FBBAC83D545F071/image-size/large?v=v2&amp;amp;px=999" role="button" title="Change-Repository-2.png" alt="Change-Repository-2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 03 Nov 2016 18:30:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659892#M40487</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-11-03T18:30:08Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659893#M40488</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I haven't heard any updates on this problem in 2 weeks.&lt;/P&gt;&lt;P&gt;I was wondering if you were able to set up the project?&lt;/P&gt;&lt;P&gt;Let me know if you have any other problems with the set up.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 18 Nov 2016 16:51:25 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659893#M40488</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-11-18T16:51:25Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659894#M40489</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sorry for my later reply, there has a lot of cases need to process before.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp; I have set up your project on my side now.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; Now, I can reproduce your problem on my board, you are using the flash swap function.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I am checking your code and working on it.&lt;/P&gt;&lt;P&gt;&amp;nbsp; In the meanwhile, you also can test the code, you can try to create a project&amp;nbsp; without freertos,&amp;nbsp; just add your flash swap code, make sure your flash swap code have no problem .&lt;/P&gt;&lt;P&gt;About the swap code, please also refer to the AN4533:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://www.nxp.com/assets/documents/data/en/application-notes/AN4533.pdf?&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1" title="http://www.nxp.com/assets/documents/data/en/application-notes/AN4533.pdf?&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1"&gt;http://www.nxp.com/assets/documents/data/en/application-notes/AN4533.pdf?&amp;amp;fsrch=1&amp;amp;sr=1&amp;amp;pageNum=1&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;and it's code:&lt;/P&gt;&lt;P&gt;&lt;A class="link-titled" href="http://cache.nxp.com/files/microcontrollers/doc/app_note/AN4533SW.zip" title="http://cache.nxp.com/files/microcontrollers/doc/app_note/AN4533SW.zip"&gt;http://cache.nxp.com/files/microcontrollers/doc/app_note/AN4533SW.zip&lt;/A&gt;&amp;nbsp;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; I will also test it on my side, any progress will let you know.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Best Regards,&lt;/P&gt;&lt;P&gt;Kerry&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 21 Nov 2016 06:11:22 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659894#M40489</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-11-21T06:11:22Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659895#M40490</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Jason Philippi,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Sorry for my later reply, it caused a lot of time to test your project.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Now, I found the root problem which caused your reset problem, it is the flash_task stack size is too small.&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; Please do the following modification:&lt;/P&gt;&lt;P&gt;1. flash_callback definition changed to:&lt;/P&gt;&lt;P&gt;bool SIZE_OPTIMIZATION flash_callback(uint8_t currentSwapMode)&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;2.&amp;nbsp; CALLBACK_SIZE changed to&lt;/P&gt;&lt;P&gt;#define LAUNCH_CMD_SIZE 0x80 //0x200&lt;BR /&gt;#define CALLBACK_SIZE 0x130 //0x200 //0x1a0&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;3. ProcessorExpert.ld file&lt;/P&gt;&lt;P&gt;HEAP_SIZE&amp;nbsp; = DEFINED(__heap_size__)&amp;nbsp; ? __heap_size__&amp;nbsp; : 0x4000;&lt;BR /&gt;STACK_SIZE = DEFINED(__stack_size__) ? __stack_size__ : 0x2000;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;4.FRTOS1_xTaskCreate stack size changed to 1000.&lt;/P&gt;&lt;P&gt;void flash_initTask()&lt;BR /&gt;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;//flash1_InitConfig0.CallBack = (PCALLBACK)RelocateFunction((uint32_t)ramForCallback , CALLBACK_SIZE , (uint32_t)flash_callback);&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;if(FRTOS1_xTaskCreate(&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;flash_task, /* pointer to the task */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;"flash_task", /* task name for kernal awareness debugging */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;1000, /* task stack size */ //configMINIMAL_STACK_SIZE&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;(void*)NULL, /* optional task startup argument */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;tskIDLE_PRIORITY, /* initial priority */&lt;BR /&gt;&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;amp;flash_taskHandle /* optional task handle to create */&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;) != pdPASS)&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;for(;;){} //Ran out of heap&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;else&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;{&lt;BR /&gt;&amp;nbsp;&amp;nbsp; &amp;nbsp;&amp;nbsp;&amp;nbsp; &amp;nbsp;}&lt;BR /&gt;}&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;After debug, you can find the code can run over PFlashSwapCtl function.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="pastedImage_2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/10280i417CC46392C3CE2C/image-size/large?v=v2&amp;amp;px=999" role="button" title="pastedImage_2.png" alt="pastedImage_2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I also attached my modified project.&lt;/P&gt;&lt;P&gt;After you add it and build it, please modify ProcessorExpert.ld stack and heap size.&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 30 Nov 2016 09:43:24 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659895#M40490</guid>
      <dc:creator>kerryzhou</dc:creator>
      <dc:date>2016-11-30T09:43:24Z</dc:date>
    </item>
    <item>
      <title>Re: pFlashCommandSequence RAM Function resets board</title>
      <link>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659896#M40491</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Kerry,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;This worked for me!&lt;/P&gt;&lt;P&gt;&lt;STRONG&gt;Could you give me some advice on how you figured out the sizes for&amp;nbsp;&lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;HEAP_SIZE&lt;/SPAN&gt;, &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;STACK_SIZE&lt;/SPAN&gt;, task Stack Size, &lt;SPAN style="color: #51626f; background-color: #ffffff;"&gt;LAUNCH_CMD_SIZE, and&amp;nbsp;CALLBACK_SIZE&amp;nbsp;&lt;/SPAN&gt;was needed?&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;I am using -fstack-usage to find out how many bytes my functions are using.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you,&lt;/P&gt;&lt;P&gt;Jason&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 06 Dec 2016 20:02:04 GMT</pubDate>
      <guid>https://community.nxp.com/t5/Kinetis-Microcontrollers/pFlashCommandSequence-RAM-Function-resets-board/m-p/659896#M40491</guid>
      <dc:creator>jasonphilippi</dc:creator>
      <dc:date>2016-12-06T20:02:04Z</dc:date>
    </item>
  </channel>
</rss>

