<?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: frdmk64 internal flash write problem in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463431#M15504</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi david,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i did boot loader code. my application code less than 512KB its working fine. but when i try more than 512kb(application code) its not working. i mean some functionality missing. ex:uart rx not working or uart txt not working like that. but when i load PE programmer its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what could be the issue. end of SREC file address i want to write any data..? please give some suggestion. i checked my application address and data&amp;nbsp; all are fine but i dnt know why some functionality was not working. give some suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudhakar p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Thu, 18 Feb 2016 07:06:53 GMT</pubDate>
    <dc:creator>sudhakarp</dc:creator>
    <dc:date>2016-02-18T07:06:53Z</dc:date>
    <item>
      <title>frdmk64 internal flash write problem</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463429#M15502</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi,&lt;/P&gt;&lt;P&gt;i am working on FRDMK64 controller. i am using KDS3.0 and KSDK1.2.0 example. my controller have 1MB flash and 256kb RAM.&lt;STRONG&gt;i am working on internal data flash read/write&lt;/STRONG&gt; example.&lt;/P&gt;&lt;P&gt;i have some doubts in following function&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;1)what is the use of CACHE_DISABLE&lt;/P&gt;&lt;P&gt;2) g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction((uint32_t)ramFunc , LAUNCH_CMD_SIZE ,(uint32_t)FlashCommandSequence);&lt;/P&gt;&lt;P&gt;in this function &lt;STRONG&gt;can i increase LAUNCH_CMD_SIZE&amp;nbsp; to 0x200. and also what is the use of above function and &lt;STRONG&gt;LAUNCH_CMD_SIZE&amp;nbsp; .&lt;/STRONG&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;3)in my application code i am trying to write data from 0x8000 to 0xFA000 address but its not working correctly. upto 0x80000 address only its working fine.&amp;nbsp; i mean upto(512kb).&lt;STRONG&gt;&lt;BR /&gt;&lt;/STRONG&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;can you give some solution for this.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudhakar p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Feb 2016 12:28:00 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463429#M15502</guid>
      <dc:creator>sudhakarp</dc:creator>
      <dc:date>2016-02-16T12:28:00Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64 internal flash write problem</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463430#M15503</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhakar p,&lt;/P&gt;&lt;P&gt;I do not see where CACHE_DISABLE is implemented.&amp;nbsp; Can you point me to that?&lt;/P&gt;&lt;P&gt;I general the Flash Controller has 4-way, 4-set cache enabled.&amp;nbsp; Please review the FMC chapter of the Reference Manual.&lt;/P&gt;&lt;P&gt;If you think the cache is getting corrupted than after your code re-programs the flash invalidate the cache.&amp;nbsp; Reference:&lt;/P&gt;&lt;P&gt;28.6 Initialization and application information&lt;/P&gt;&lt;P&gt;The FMC does not require user initialization. Flash acceleration features are enabled by default.&lt;/P&gt;&lt;P&gt;The FMC has no visibility into flash memory erase and program cycles because the Flash&lt;/P&gt;&lt;P&gt;Memory module manages them directly. As a result, if an application is executing flash&lt;/P&gt;&lt;P&gt;memory commands, the FMC's cache might need to be disabled and/or flushed to prevent&lt;/P&gt;&lt;P&gt;the possibility of returning stale data. Use the PFB0CR[CINV_WAY] field to invalidate&lt;/P&gt;&lt;P&gt;the cache in this manner.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The &lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;g_FlashLaunchCommand = (pFLASHCOMMANDSEQUENCE)RelocateFunction() is copying code from Flash to SRAM.&amp;nbsp; The code to execute flash commands needs to run outside of flash space (it must run from SRAM for Kinetis K devices).&amp;nbsp; The LAUNCH_CMD_SIZE is just a size that is bigger than the flash code size that gets copied to SRAM (i.e. it is the size of SRAM reserved and then used to run Flash commands).&amp;nbsp; Increasing it is not needed unless you have modified the code to be bigger.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Attached is my main.c from the project C:\Freescale\KSDK_1.2.0\examples\frdmk64f\driver_examples\flash\kds .&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;This code setup to erase 0x80000-0x100000, and then program the beginning 0x80 bytes of each sector that can be viewed in the memory window when debugger is halted.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;Regards,&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="color: #51626f; font-family: arial, helvetica, 'helvetica neue', verdana, sans-serif; font-size: 14px;"&gt;David &lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 16 Feb 2016 18:23:41 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463430#M15503</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-02-16T18:23:41Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64 internal flash write problem</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463431#M15504</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;hi david,&lt;/P&gt;&lt;P&gt;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; i did boot loader code. my application code less than 512KB its working fine. but when i try more than 512kb(application code) its not working. i mean some functionality missing. ex:uart rx not working or uart txt not working like that. but when i load PE programmer its working fine.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;what could be the issue. end of SREC file address i want to write any data..? please give some suggestion. i checked my application address and data&amp;nbsp; all are fine but i dnt know why some functionality was not working. give some suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudhakar p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 18 Feb 2016 07:06:53 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463431#M15504</guid>
      <dc:creator>sudhakarp</dc:creator>
      <dc:date>2016-02-18T07:06:53Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64 internal flash write problem</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463432#M15505</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhakar,&lt;/P&gt;&lt;P&gt;Not sure why you have the problem.&lt;/P&gt;&lt;P&gt;I tested my code to erase and program across the flash block boundary successfully.&lt;/P&gt;&lt;P&gt;Do you have interrupts enabled?&amp;nbsp; If yes, try disabling interrupts during flash command execution.&lt;/P&gt;&lt;P&gt;Do you have watchdog enabled?&lt;/P&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David &lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 19 Feb 2016 16:59:36 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463432#M15505</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-02-19T16:59:36Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64 internal flash write problem</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463433#M15506</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi david,&lt;/P&gt;&lt;P&gt;i am not using any interrupt and watchdog (all disabled). can you tel &lt;STRONG&gt;is possible to write byte by byte character in internal data flash?&lt;/STRONG&gt; if yes how to do..?example i want to erase and write 0x8000 address only remaining address should not effect. is possible.?address&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; data&lt;/P&gt;&lt;P&gt;0x8000&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xaa&lt;/P&gt;&lt;P&gt;0x8001&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 0xff&amp;nbsp; like that i want to erase and write.&lt;/P&gt;&lt;P&gt;why i need like that mean in .SREC motorola S record format some time i want to write only 4 byte or 2 byte char only . if possible to write single byte mean i can easily program depends on Moto S record Address.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;S208&lt;STRONG&gt;0FD000&lt;/STRONG&gt;0017850478&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; -MOTO S record example,&amp;nbsp; here 00178504 only data so 0xFD000 adress i want to write that data. how to do this one..? give some suggestion.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Actually i need this one for bootloader purpose only. i dnt need mbed bootloader.i need .MOTOrola S record format bootloader.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;regards,&lt;/P&gt;&lt;P&gt;sudhakar p&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Sat, 20 Feb 2016 06:50:12 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463433#M15506</guid>
      <dc:creator>sudhakarp</dc:creator>
      <dc:date>2016-02-20T06:50:12Z</dc:date>
    </item>
    <item>
      <title>Re: frdmk64 internal flash write problem</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463434#M15507</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Sudhakar,&lt;/P&gt;&lt;P&gt;Best to review the K64 Reference Manual Flash Memory Module (FTFE) chapter.&lt;/P&gt;&lt;P&gt;Simple rules of thumb are:&lt;/P&gt;&lt;P&gt;- smallest erase size is a sector (4096 bytes for K64).&lt;/P&gt;&lt;P&gt;- smallest programming/flashing size is 32-bits (4 bytes).&lt;/P&gt;&lt;P&gt;- code should not try to re-program/flash the same 32-bits without first having erased the sector first.&amp;nbsp; Otherwise flash may be damaged.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Attached is linker file example of adding user defined BYTE values to flash space near end of flash.&lt;/P&gt;&lt;P&gt;C:\Freescale\KSDK_1.2.0\platform\devices\MK64F12\linker\gcc\MK64FN1M0xxx12_flash.ld&lt;/P&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14561832335009332" data-renderedposition="242_8_1006_32" jivemacro_uid="_14561832335009332"&gt;&lt;P&gt;&amp;nbsp; flash_done&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; (R)&amp;nbsp; : ORIGIN = 0x000FFFE0, LENGTH = 0x00000010&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;/PRE&gt;&lt;PRE __default_attr="plain" __jive_macro_name="code" class="jive_macro_code jive_text_macro _jivemacro_uid_14561832030406204" data-renderedposition="273_8_1006_300" jivemacro_uid="_14561832030406204"&gt;&lt;/PRE&gt;&lt;TABLE&gt;&lt;TBODY&gt;&lt;TR&gt;&lt;TD&gt;&amp;nbsp; &lt;/TD&gt;&lt;TD&gt;.flash_written :&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;{&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0x00)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0xBF)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0x00)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0xBF)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0x00)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0xBF)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0x00)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0xBF)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0x00)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;BYTE(0xBF)&lt;/TD&gt;&lt;/TR&gt;&lt;TR&gt;&lt;TD&gt;&lt;/TD&gt;&lt;TD&gt;} &amp;gt; flash_done&lt;/TD&gt;&lt;/TR&gt;&lt;/TBODY&gt;&lt;/TABLE&gt;&lt;P&gt;Regards,&lt;/P&gt;&lt;P&gt;David&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 22 Feb 2016 23:20:42 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/frdmk64-internal-flash-write-problem/m-p/463434#M15507</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2016-02-22T23:20:42Z</dc:date>
    </item>
  </channel>
</rss>

