<?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:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size in MQX Software Solutions</title>
    <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406474#M13631</link>
    <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Randall,&lt;/P&gt;&lt;P&gt;There was issue with FFS to NAND that had workaround of only letting you have access to 1/2 of the NAND space.&lt;/P&gt;&lt;P&gt;This was fixed in the MQX4.1.1 Release.&lt;/P&gt;&lt;P&gt;The Release Notes for it contain following:&lt;/P&gt;&lt;P&gt;MQX-4108 FFS NAND driver halves physical memory issue is fixed. The actual algorithm prepares enough reserved&lt;/P&gt;&lt;P&gt;blocks for a backup algorithm. The mfs_nandflash example is updated.&lt;/P&gt;&lt;P&gt;Updating should resolve the issue.&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>Mon, 13 Jul 2015 19:19:21 GMT</pubDate>
    <dc:creator>DavidS</dc:creator>
    <dc:date>2015-07-13T19:19:21Z</dc:date>
    <item>
      <title>Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406473#M13630</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;&lt;SPAN style="line-height: 107%; font-family: 'Cambria',serif; font-size: 12pt;"&gt;I’m are using MQX 4.1and a K20FX512VLQ12 connected to a Spansion S34ML08G2 NAND flash memory chip.&amp;nbsp; Calls to IO_IOCTL_FREE_SPACE returns half the&lt;BR /&gt;memory size, 512K instead of 1MB.&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 107%; font-family: 'Cambria',serif; font-size: 12pt;"&gt;I have updated the &lt;/SPAN&gt;&lt;SPAN style="line-height: 107%; font-family: 'Cambria',serif; font-size: 12pt; mso-bidi-font-family: Consolas;"&gt;NANDFLASH_INFO_STRUCT to reflect the Spansion memory characteristics (page size, block size, etc…), updated&lt;BR /&gt;“wTotalInternalDice” in NFCNandMedia::initChipParam to show 2 dies on the chip.&amp;nbsp; I’m sure I’ve missed a value that needs to be updated, but I’m not sure what it is.&amp;nbsp; &lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 107%; font-family: 'Cambria',serif; font-size: 12pt; mso-bidi-font-family: Consolas;"&gt;Has anyone had experience setting up the BSP / FFS using a NAND memory chip that has two dies?&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 107%; font-family: 'Cambria',serif; font-size: 12pt; mso-bidi-font-family: Consolas;"&gt;I’m using CodeWarrior 10.6 with MQX 4.1&lt;/SPAN&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;SPAN style="line-height: 107%; font-family: 'Cambria',serif; font-size: 12pt; mso-bidi-font-family: Consolas;"&gt;Thank you.&lt;/SPAN&gt;&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Mon, 13 Jul 2015 18:47:27 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406473#M13630</guid>
      <dc:creator>randalljordan</dc:creator>
      <dc:date>2015-07-13T18:47:27Z</dc:date>
    </item>
    <item>
      <title>Re:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406474#M13631</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Randall,&lt;/P&gt;&lt;P&gt;There was issue with FFS to NAND that had workaround of only letting you have access to 1/2 of the NAND space.&lt;/P&gt;&lt;P&gt;This was fixed in the MQX4.1.1 Release.&lt;/P&gt;&lt;P&gt;The Release Notes for it contain following:&lt;/P&gt;&lt;P&gt;MQX-4108 FFS NAND driver halves physical memory issue is fixed. The actual algorithm prepares enough reserved&lt;/P&gt;&lt;P&gt;blocks for a backup algorithm. The mfs_nandflash example is updated.&lt;/P&gt;&lt;P&gt;Updating should resolve the issue.&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>Mon, 13 Jul 2015 19:19:21 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406474#M13631</guid>
      <dc:creator>DavidS</dc:creator>
      <dc:date>2015-07-13T19:19:21Z</dc:date>
    </item>
    <item>
      <title>Re:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406475#M13632</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;David,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.  I’ve updated to MQX 4.1.1 and have the same result, I even tried using MQX 4.2 but it also shows half the available memory which is what leads me to think I have missed something.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;The Spansion memory is two 512 mega-byte planes per devices (in my post I mistakenly said 512K), I’m not sure where to tell MFS / FFS that there are two planes on the device.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Beside updating the NANDFLASH_INFO_STRUCT, NANDFLASH_INIT_STRUCT and wtotalInternalDice in initChipParm is there any other items you can think of I need to change?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your time.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Randall Jordan&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Tue, 14 Jul 2015 11:39:45 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406475#M13632</guid>
      <dc:creator>randalljordan</dc:creator>
      <dc:date>2015-07-14T11:39:45Z</dc:date>
    </item>
    <item>
      <title>Re:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406476#M13633</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Randall,&lt;/P&gt;&lt;P&gt;Could you please share here your NANDFLASH_INFO_STRUCT?&lt;/P&gt;&lt;P&gt;According my expectation, it should be:&lt;/P&gt;&lt;P&gt;/* S34ML08G2 organization */&lt;/P&gt;&lt;P&gt;#define S34ML08G2_PHYSICAL_PAGE_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 2048&lt;/P&gt;&lt;P&gt;#define S34ML08G2_SPARE_AREA_SIZE&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 128&lt;/P&gt;&lt;P&gt;#define S34ML08G2_BLOCK_SIZE&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;nbsp; 131072 /* 128kB */&lt;/P&gt;&lt;P&gt;#define S34ML08G2_NUM_BLOCKS&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;nbsp; 8192&amp;nbsp; /*4096 for each 4 Gb device*/&lt;/P&gt;&lt;P&gt;#define S34ML08G2_WIDTH&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;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp;&amp;nbsp; 8&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;NANDFLASH_INFO_STRUCT _ S34ML08G2_organization_8bit[] =&amp;nbsp; {&lt;/P&gt;&lt;P&gt;&amp;nbsp; S34ML08G2_PHYSICAL_PAGE_SIZE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; S34ML08G2_SPARE_AREA_SIZE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; S34ML08G2_BLOCK_SIZE,&lt;/P&gt;&lt;P&gt;&amp;nbsp; S34ML08G2_NUM_BLOCKS,&lt;/P&gt;&lt;P&gt;&amp;nbsp; S34ML08G2_WIDTH&lt;/P&gt;&lt;P&gt;};&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Note: Unfortunately there is one additional FFS bug also in MQX 4.2.0. This could cause dead lock situation after some time.&lt;/P&gt;&lt;P&gt;In attachment you can find fixed media_buffer_manager.cpp file. Fix will be part of next MQX release.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&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>Wed, 15 Jul 2015 18:14:17 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406476#M13633</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-07-15T18:14:17Z</dc:date>
    </item>
    <item>
      <title>Re:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406477#M13634</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Radeks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thank you for your reply.  I must have misunderstood the structure setup, I have the number of blocks set to 4096, I was thinking that setting wTotalInternalDies to 2 would take care of the total number of blocks.  I’ll make the change and post the results.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;I’ve attached the NANDFLASH_INFO_STRUCT (with the total blocks changed to 8192)  in case there are any other mistakes I’ve made.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Again, thanks for your help.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;-Randy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Wed, 15 Jul 2015 20:11:33 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406477#M13634</guid>
      <dc:creator>randalljordan</dc:creator>
      <dc:date>2015-07-15T20:11:33Z</dc:date>
    </item>
    <item>
      <title>Re:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406478#M13635</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;Hi Randall,&lt;/P&gt;&lt;P&gt;You are welcome.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;You are right,&lt;/P&gt;&lt;P&gt;I spend several minutes until my calculations returns 8192 blocks. I must agree that description of memory structure in MT29F2G16 datasheet is slightly better.&lt;/P&gt;&lt;P&gt;&lt;span class="lia-inline-image-display-wrapper" image-alt="S34ML08G2.png"&gt;&lt;img src="https://community.nxp.com/t5/image/serverpage/image-id/57921i204D405CC2ED0839/image-size/large?v=v2&amp;amp;px=999" role="button" title="S34ML08G2.png" alt="S34ML08G2.png" /&gt;&lt;/span&gt;&lt;/P&gt;&lt;P&gt;&lt;BR /&gt;I hope it helps you.&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Have a great day,&lt;BR /&gt;RadekS&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 08:20:59 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406478#M13635</guid>
      <dc:creator>RadekS</dc:creator>
      <dc:date>2015-07-16T08:20:59Z</dc:date>
    </item>
    <item>
      <title>Re:  Calls to IO_IOCTL_FREE_SPACE returns half the NAND memory size</title>
      <link>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406479#M13636</link>
      <description>&lt;HTML&gt;&lt;HEAD&gt;&lt;/HEAD&gt;&lt;BODY&gt;&lt;P&gt;RadekS,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Changing the block size to 8192 increases the memory size to 518MB.  Is there anything else you can think of that I missed?&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Thanks,&lt;/P&gt;&lt;P&gt;&lt;/P&gt;&lt;P&gt;Randy&lt;/P&gt;&lt;/BODY&gt;&lt;/HTML&gt;</description>
      <pubDate>Thu, 16 Jul 2015 21:32:44 GMT</pubDate>
      <guid>https://community.nxp.com/t5/MQX-Software-Solutions/Calls-to-IO-IOCTL-FREE-SPACE-returns-half-the-NAND-memory-size/m-p/406479#M13636</guid>
      <dc:creator>randalljordan</dc:creator>
      <dc:date>2015-07-16T21:32:44Z</dc:date>
    </item>
  </channel>
</rss>

