<?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>MQX Software SolutionsのトピックMFS nandflash corruption?</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-nandflash-corruption/m-p/489290#M15937</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;&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp; working with a K701M with&amp;nbsp; external Flash (like tower K70) with MQX 4.1&lt;/P&gt;&lt;P&gt;I install a nandflash system like bellow.&lt;/P&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;&lt;P&gt;In my system flash, I have many files.&lt;/P&gt;&lt;P&gt;But after test, it seems if I modify the size of one file, other file(s) will be corrupted.&lt;/P&gt;&lt;P&gt;Like if when I add data in a file, place in Nandflash overpass the current Memory block, then take the following block.&lt;/P&gt;&lt;P&gt;But the following block is already busy by other file, then data are overwritten.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the MFS managed all this but it is the feel I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have I forget something in my code?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14637574067038272 jive_macro_code jive_text_macro" data-renderedposition="316_50_798_352" jivemacro_uid="_14637574067038272"&gt;&lt;P&gt;----------------- Init phase ---------------------
MQX_FILE_PTR nandFlashFilePtr;
MQX_FILE_PTR FileHandle;&lt;/P&gt;&lt;P&gt;_io_nandflash_wl_install(&amp;amp;_bsp_nandflash_wl_init, "nandflash_wl:")
nandFlashFilePtr = fopen("nandflash_wl:", NANDWL_OPEN_NORMAL);
_io_mfs_install(nandFlashFilePtr , "a:", (_file_size)0);&lt;/P&gt;&lt;P&gt;FileHandle = fopen("a:", NULL);&lt;/P&gt;&lt;P&gt;ErrorCode = ferror (FileHandle );
if ((ErrorCode != MFS_NO_ERROR) &amp;amp;&amp;amp; (ErrorCode != MFS_NOT_A_DOS_DISK))
{
&amp;nbsp;&amp;nbsp; printf("Error opening filesystem: %s\n", MFS_Error_text((uint32_t)ErrorCode));
&amp;nbsp;&amp;nbsp; return(MQX_ERROR);
}&lt;/P&gt;&lt;P&gt;printf("\nNAND flash was installed.\n");&lt;/P&gt;&lt;P&gt;----------------- life phase to read or write data in a file---------------------
pointer FilePtr;&lt;/P&gt;&lt;P&gt;FilePtr = fopen("a:\\MyFile.bin", "r+");
fseek(FilePtr , MyAddress);&lt;/P&gt;&lt;P&gt;Write(FilePtr , DataPtr, DataLength);
or
Read(FilePtr , DataPtr, DataLength);&lt;/P&gt;&lt;P&gt;fclose(FilePtr);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
    <pubDate>Fri, 20 May 2016 15:19:08 GMT</pubDate>
    <dc:creator>arnogir</dc:creator>
    <dc:date>2016-05-20T15:19:08Z</dc:date>
    <item>
      <title>MFS nandflash corruption?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-nandflash-corruption/m-p/489290#M15937</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;&lt;/P&gt;&lt;P&gt;I'm&amp;nbsp; working with a K701M with&amp;nbsp; external Flash (like tower K70) with MQX 4.1&lt;/P&gt;&lt;P&gt;I install a nandflash system like bellow.&lt;/P&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;&lt;P&gt;In my system flash, I have many files.&lt;/P&gt;&lt;P&gt;But after test, it seems if I modify the size of one file, other file(s) will be corrupted.&lt;/P&gt;&lt;P&gt;Like if when I add data in a file, place in Nandflash overpass the current Memory block, then take the following block.&lt;/P&gt;&lt;P&gt;But the following block is already busy by other file, then data are overwritten.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I think the MFS managed all this but it is the feel I have.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have I forget something in my code?:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;PRE __default_attr="c++" __jive_macro_name="code" class="_jivemacro_uid_14637574067038272 jive_macro_code jive_text_macro" data-renderedposition="316_50_798_352" jivemacro_uid="_14637574067038272"&gt;&lt;P&gt;----------------- Init phase ---------------------
MQX_FILE_PTR nandFlashFilePtr;
MQX_FILE_PTR FileHandle;&lt;/P&gt;&lt;P&gt;_io_nandflash_wl_install(&amp;amp;_bsp_nandflash_wl_init, "nandflash_wl:")
nandFlashFilePtr = fopen("nandflash_wl:", NANDWL_OPEN_NORMAL);
_io_mfs_install(nandFlashFilePtr , "a:", (_file_size)0);&lt;/P&gt;&lt;P&gt;FileHandle = fopen("a:", NULL);&lt;/P&gt;&lt;P&gt;ErrorCode = ferror (FileHandle );
if ((ErrorCode != MFS_NO_ERROR) &amp;amp;&amp;amp; (ErrorCode != MFS_NOT_A_DOS_DISK))
{
&amp;nbsp;&amp;nbsp; printf("Error opening filesystem: %s\n", MFS_Error_text((uint32_t)ErrorCode));
&amp;nbsp;&amp;nbsp; return(MQX_ERROR);
}&lt;/P&gt;&lt;P&gt;printf("\nNAND flash was installed.\n");&lt;/P&gt;&lt;P&gt;----------------- life phase to read or write data in a file---------------------
pointer FilePtr;&lt;/P&gt;&lt;P&gt;FilePtr = fopen("a:\\MyFile.bin", "r+");
fseek(FilePtr , MyAddress);&lt;/P&gt;&lt;P&gt;Write(FilePtr , DataPtr, DataLength);
or
Read(FilePtr , DataPtr, DataLength);&lt;/P&gt;&lt;P&gt;fclose(FilePtr);&lt;/P&gt;&lt;/PRE&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Fri, 20 May 2016 15:19:08 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-nandflash-corruption/m-p/489290#M15937</guid>
      <dc:creator>arnogir</dc:creator>
      <dc:date>2016-05-20T15:19:08Z</dc:date>
    </item>
    <item>
      <title>Re: MFS nandflash corruption?</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-nandflash-corruption/m-p/489291#M15938</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Arnaud:&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I suggest you try the latest MQX version:&amp;nbsp;&amp;nbsp; MQX 4.2.0,&amp;nbsp; together with the patch file, mqx_4.2.0.2. This version fixed some MFS bugs.&lt;/P&gt;&lt;P&gt;Please refer to the MQX 4.2.0 and MQX4.2.0.2 release notes for more details&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Regards&lt;/P&gt;&lt;P&gt;Daniel&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 23 May 2016 06:27:32 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/MFS-nandflash-corruption/m-p/489291#M15938</guid>
      <dc:creator>danielchen</dc:creator>
      <dc:date>2016-05-23T06:27:32Z</dc:date>
    </item>
  </channel>
</rss>

