[SOLVED] Filesystem NAND problem

    This site uses cookies. By continuing to browse this site, you are agreeing to our Cookie Policy.

    • [SOLVED] Filesystem NAND problem

      I am facing with a big problem with my tool based on LP2478 and NAND Flash with FAT Filesystem placed on the EMC bus together with a RAM.
      The emFile version is 3.22a

      My flash was obsolete and I have changed it for a new compatible one.
      In this link I have included the two datasheet, NEW and OLD Nand FLASH.

      I have problem with bad read: I have uploaded a screenshot of my device with the filesystem full LOG enabled.

      the Busy pin is sampled via a GPIO pin in this way:

      OPTIMIZE int FS_NAND_HW_X_WaitWhileBusy(U8 Unit, unsigned us)
      // This function is called to check the busy pin of
      // the NAND flash.
      // When no busy pin is available this function should
      // return 1, so the upper layer can check if NAND
      // flash is busy.

      /* while( FIO1PIN & (1 << 13) );// from high to low once
      while( !(FIO2PIN & (1 << 12)) ); /* from low to high once */
      return 0;


      Verying from this:
      EMC_STA_WAITWEN0 = 0x2;
      EMC_STA_WAITOEN0 = 0x2;
      EMC_STA_WAITRD0 = 0x1f;
      EMC_STA_WAITPAGE0 = 0x1f;
      EMC_STA_WAITWR0 = 0x1f;
      EMC_STA_WAITTURN0 = 0xf;
      EMC_STA_CFG0 = 0x00000081;

      to this:

      EMC_STA_WAITWEN0 = 0x0;
      EMC_STA_WAITOEN0 = 0x0;
      EMC_STA_WAITRD0 = 0x5;
      EMC_STA_WAITPAGE0 = 0x2;
      EMC_STA_WAITWR0 = 0x3;
      EMC_STA_WAITTURN0 = 0x1;
      EMC_STA_CFG0 = 0x00000081;

      i have noticed that varying the EMC timing the problem changed: the problem is translated in the WRITING and the filesystem becomes corrupted and inusable (no more writing allowed). Unfortunately now I do not have screenshot of the error.

      I tried to bypass the ECC error and reading single file I obtained only this error "Too few cluster allocated to file" (you can see this in the attachement file)

      Anyone has some advices?
      Thanks a lot.
      • WhatsApp Image 2019-01-19 at 16.06.24.jpeg

        127.09 kB, 1,600×1,200, viewed 955 times
      • Immagine.jpg

        303.55 kB, 1,076×802, viewed 947 times

      The post was edited 1 time, last by kappah1984 ().

    • Probably we found the problem:

      the OLD NAND flash requires 1 bit ECC correction capabilities instead the ATO NAND flash is not 100% compatibile because requires 4 bit.
      The our old file system version is only able to correct 1 bit.

      We are working to solve this directly with support channel.

      bye bye