<?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>MPC5xxx中的主题 Re: C55 Flash Driver Problem</title>
    <link>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728358#M9844</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 think I found a solution for my problem. If I change this part of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;//Wait until the operation finishes&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;while ((returnCode = FlashCheckStatus(&amp;amp;ssdConfig, C55_MODE_OP_PROGRAM, &amp;amp;opResult, &amp;amp;ctxData)) == C55_INPROGRESS);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;to this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;&lt;EM style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;//Wait until the operation finishes&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;while ((returnCode = FlashCheckStatus(&amp;amp;ssdConfig, C55_MODE_OP_PROGRAM, &amp;amp;opResult, &amp;amp;ctxData)) != C55_DONE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;everything works as expected and I can write multiple programmable size to flash.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;After seven cycles of FlashCheck with return code 0x00000000 (=C55_OK) the eight FlashCheckStatus call returns C55_DONE.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;-&amp;gt; First 0x80 program with FlashProgram, then seven 0x80 program with FLashCheckstatus equals 0x400 bytes of programmed data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;It would make sense, because the FlashCheckStatus is using the FlashProgram function when there is still data to be programmed (at least as far as i understood this function from manual) and this function has the return value C55_DONE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Is this possible at all? Because I found nothing about this alternative return value of FlashCheckStatus in the manual for the C55 drivers and also the demo code delivered with the drivers is using the first code line and therefore shouldn't work for multiple programmable size?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Looking forward to your opinion about this&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 23 Nov 2017 09:18:47 GMT</pubDate>
    <dc:creator>whoam</dc:creator>
    <dc:date>2017-11-23T09:18:47Z</dc:date>
    <item>
      <title>C55 Flash Driver Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728357#M9843</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Hi all,&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;I'm building my own external tool to flash the MPC5775K with the help of this application note&amp;nbsp;&lt;A class="link-titled" href="https://www.nxp.com/docs/en/application-note/AN4365.pdf" title="https://www.nxp.com/docs/en/application-note/AN4365.pdf"&gt;https://www.nxp.com/docs/en/application-note/AN4365.pdf&lt;/A&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;Most of the things work, but I still have&amp;nbsp;one major issue/problem when using the FlashProgram/FlashCheckStatus function:&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;When I'm flashing just the programmable size of 0x80 with FlashProgram the process works fine. But if i try to flash the size 0x400 it doesn't work like it should. It's just flashing the size of 0x100 and the return value of the FlashCheckStatus is 0x00000000 instead of&amp;nbsp;C55_INPROGRESS. When I check the CtxData after the FlashCheckStatus it is returning 0xF9C100 (F9C000 is dest address) and also the size is now 0x300, so it stored the correct data there.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;I wrote the SRAM start address of the FlashProgramm Driver into&amp;nbsp;pReqCompletionFn of CONTEXT_DATA. Do I have to do anything else?&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;(When using the CheckStatus function with FlashErase it is working fine and returns C55_INPROGRESS)&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="color: #51626f; background-color: #ffffff; border: 0px; font-size: 14px;"&gt;This is my code of the Flash Part if it's helping:&lt;/SPAN&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;BR style="color: #51626f; background-color: #ffffff;" /&gt;&lt;SPAN style="font-size: 13px;"&gt;&lt;EM style="background-color: #ffffff; border: 0px; color: #51626f;"&gt;/* write address of Flash Program to ctxData-&amp;gt;pReqCompletionFn to enable multiple programming of programmable size*/&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;WriteWord(C55_pReqCompletionFn, C55_Addr_FlashProgram);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;returnCode = FlashProgram(&amp;amp;ssdConfig, FALSE, 0x00F9C000, 1024, data2program, &amp;amp;ctxData);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;if (returnCode == C55_OK)&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;{&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&lt;EM&gt;&amp;nbsp;//Wait until the operation finishes&lt;/EM&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="font-size: 13px;"&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;while ((returnCode = FlashCheckStatus(&amp;amp;ssdConfig, C55_MODE_OP_PROGRAM, &amp;amp;opResult, &amp;amp;ctxData)) == C55_INPROGRESS);&lt;/SPAN&gt;&lt;BR /&gt;&lt;SPAN style="font-size: 13px;"&gt;}&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/DIV&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;This is the routine of the FlashProgramm fucntion:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;OL&gt;&lt;LI style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;write source data into SRAM at SourceStart&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r1 as the stack pointer&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r3 to point to the SSD_CONFIG structure in internal SRAM&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r4 with the factoyPgmFlag value&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r5 to point to the destination address to be programmed in flash memory&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt; Set r6 to the size of the data in bytes to be programmed to flash memory&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r7 to point to SOurceSTart&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r8 to point to the address where CtxData is in SRAM&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Start with FLashProgram address-0x4&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Check for Debug mode re-entering&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Read r3.&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;DIV style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;This is the routine of the FlashCheckStatus&amp;nbsp;fucntion:&lt;/SPAN&gt;&lt;/DIV&gt;&lt;OL style="padding: 0px 0px 0px 30px;"&gt;&lt;LI style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r1 as the stack pointer&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="border: 0px; font-weight: inherit; font-size: 14px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r3 to point to the SSD_CONFIG structure in internal SRAM&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r4 with the modeOp value&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r5 to point to the&amp;nbsp;address where opResult should be stored&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Set r6 to point to the address where CtxData is stored in SRAM&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Start with FlashCheckStatus address-0x4&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Check for Debug mode re-entering&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Read r3.&lt;/SPAN&gt;&lt;/LI&gt;&lt;LI style="margin: 0.2em 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Read opResult value from SRAM&lt;/SPAN&gt;&lt;/LI&gt;&lt;/OL&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Would be really grateful for any kind of help there. :smileyhappy:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards and thanks in advance&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 22 Nov 2017 11:03:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728357#M9843</guid>
      <dc:creator>whoam</dc:creator>
      <dc:date>2017-11-22T11:03:47Z</dc:date>
    </item>
    <item>
      <title>Re: C55 Flash Driver Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728358#M9844</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 think I found a solution for my problem. If I change this part of my code:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;EM style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;//Wait until the operation finishes&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;while ((returnCode = FlashCheckStatus(&amp;amp;ssdConfig, C55_MODE_OP_PROGRAM, &amp;amp;opResult, &amp;amp;ctxData)) == C55_INPROGRESS);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;to this:&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #3d3d3d;"&gt;&lt;EM style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;//Wait until the operation finishes&lt;/EM&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 13px;"&gt;while ((returnCode = FlashCheckStatus(&amp;amp;ssdConfig, C55_MODE_OP_PROGRAM, &amp;amp;opResult, &amp;amp;ctxData)) != C55_DONE);&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;everything works as expected and I can write multiple programmable size to flash.&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;After seven cycles of FlashCheck with return code 0x00000000 (=C55_OK) the eight FlashCheckStatus call returns C55_DONE.&lt;BR /&gt;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;-&amp;gt; First 0x80 program with FlashProgram, then seven 0x80 program with FLashCheckstatus equals 0x400 bytes of programmed data.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;It would make sense, because the FlashCheckStatus is using the FlashProgram function when there is still data to be programmed (at least as far as i understood this function from manual) and this function has the return value C55_DONE.&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Is this possible at all? Because I found nothing about this alternative return value of FlashCheckStatus in the manual for the C55 drivers and also the demo code delivered with the drivers is using the first code line and therefore shouldn't work for multiple programmable size?&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;&amp;nbsp;&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Looking forward to your opinion about this&lt;/SPAN&gt;&lt;/P&gt;&lt;P style="color: #51626f; background-color: #ffffff; border: 0px;"&gt;&lt;SPAN style="border: 0px; font-weight: inherit; font-size: 15px;"&gt;Regards&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 23 Nov 2017 09:18:47 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728358#M9844</guid>
      <dc:creator>whoam</dc:creator>
      <dc:date>2017-11-23T09:18:47Z</dc:date>
    </item>
    <item>
      <title>Re: C55 Flash Driver Problem</title>
      <link>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728359#M9845</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;can anyone verify if this usage of the SSD is correct?&lt;BR /&gt;&lt;BR /&gt;Regards&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 19 Dec 2017 07:08:18 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MPC5xxx/C55-Flash-Driver-Problem/m-p/728359#M9845</guid>
      <dc:creator>whoam</dc:creator>
      <dc:date>2017-12-19T07:08:18Z</dc:date>
    </item>
  </channel>
</rss>

