<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="https://community.arm.com/utility/feedstylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Flash-FS on SPI NAND</title><link>https://community.arm.com/developer/tools-software/tools/f/keil-forum/40099/flash-fs-on-spi-nand</link><description> 
Hi All, 

 
I have read the documentation and scoured the forum but (!) I am
still unsure whether Keil provides a solution for FAT filesystem +
SPI NAND. 

 
FAT FS + NAND, yes I see that and FAT FS + SPI SD Card, yes I see
that also, but not FAT FS</description><dc:language>en-US</dc:language><generator>Telligent Community 10</generator><item><title>RE: Flash-FS on SPI NAND</title><link>https://community.arm.com/thread/106913?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2013 22:49:49 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:56331511-c63c-42db-b012-b387f4f285b0</guid><dc:creator>Vladimir Umek</dc:creator><description>&lt;p&gt;&lt;p&gt;
It is just as &amp;quot;simple&amp;quot; as you said :)&lt;/p&gt;

&lt;p&gt;
Page Read/Write and Erase Block functions need to be implemented
and in addition, if internal ECC in MT29F4G01 will be used, NAND page
layout must be adjusted. According to datasheet, it must be done like
this:&lt;/p&gt;

&lt;pre&gt;
static void SetupPageLay (NAND_DRV_CFG *cfg) {
  NAND_PG_LAY *pgLay = cfg-&amp;gt;PgLay;

  /* According to MT29F4G01 datasheet, page 36 */
  if (cfg-&amp;gt;PageSize == 2112) {
    /* Setup page layout */
    pgLay-&amp;gt;Pos_BBM  = 0;      /* Bad block data        */
    pgLay-&amp;gt;Pos_LSN  = 2;      /* Logical sector number */
    pgLay-&amp;gt;Pos_COR  = 6;      /* Data corrupted marker */
    pgLay-&amp;gt;Pos_ECC  = 8;      /* ECC data              */

    pgLay-&amp;gt;SectInc  = 512;    /* Byte address increment till next sector */
    pgLay-&amp;gt;SpareOfs = 2048;   /* Byte address of the first spare         */
    pgLay-&amp;gt;SpareInc = 16;     /* Byte address increment till next spare  */
  }
}
&lt;/pre&gt;

&lt;p&gt;
If internal ECC logic won&amp;#39;t be used, you must enable ECC in
software through the File_Config.c and then there is no need to
adjust page layout - flash translation layer will take the default
settings.&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash-FS on SPI NAND</title><link>https://community.arm.com/thread/81031?ContentTypeID=1</link><pubDate>Thu, 28 Feb 2013 13:57:45 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:5ffb4b35-04e3-467f-b01e-ad6c84cce6c6</guid><dc:creator>Andy Atkinson</dc:creator><description>&lt;p&gt;&lt;p&gt;
Hi Vladimir,&lt;/p&gt;

&lt;p&gt;
Thanks for the update. The documentation does not appear clear to
me in this regard (or have I not read the &amp;#39;important bit(s)&amp;#39;?).&lt;/p&gt;

&lt;p&gt;
The flash device we are using is Micron MT29F4G01.&lt;/p&gt;

&lt;p&gt;
What you&amp;#39;re suggesting sounds valid to me and was what I was
considering as the only path forward - basically make the SPI device
look like a regular NAND device and under the hood, do what&amp;#39;s
necessary to translate between the two. I hope I am not trivialising
what turns out to be a complex task.&lt;/p&gt;

&lt;p&gt;
Regards&lt;/p&gt;

&lt;p&gt;
Andy&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item><item><title>RE: Flash-FS on SPI NAND</title><link>https://community.arm.com/thread/61721?ContentTypeID=1</link><pubDate>Wed, 27 Feb 2013 22:07:44 GMT</pubDate><guid isPermaLink="false">dd9e70c8-6d3c-4c71-b136-2456382a7b5c:0d34af86-b56a-4955-ac35-2209d42656f9</guid><dc:creator>Vladimir Umek</dc:creator><description>&lt;p&gt;&lt;p&gt;
There is no direct driver support for SPI NAND, but if you are
able to write a NAND driver (&lt;a href="http://www.keil.com/support/man/docs/rlarm/rlarm_fs_cfgnand.htm"&gt;http://www.keil.com/support/man/docs/rlarm/rlarm_fs_cfgnand.htm&lt;/a&gt;)
for your SPI NAND device there should be no problem using it.&lt;/p&gt;

&lt;p&gt;
Which SPI NAND device is meant to be used?&lt;/p&gt;
&lt;/p&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;</description></item></channel></rss>