none
nandflash data erasing after reset RRS feed

  • Question

  • Hi,

    OS: Windows Embedded compact 7

    Processor: AM335x

    I am facing a sever problem with Nand Flash data retention after boot. Nandflash we are using for data storage.

    I am using FATFS file system as default file system and enebled the Hive based registry (RAM and ROM file system).

    Also enebled IMGREGHIVE, PRJ_ENABLE_REG_FLUSH_THREAD, BSP_SAVED_REGISTRY_NAND,  PRJ_ENABLE_FSREGHIVE environmental variables.

    HKEY_LOCAL_MACHINE\init\BootVars  values

    Flags 3

    BootFSMount Folder NandFlash

    SystemHive Documents and Settings\system.hive

    ProfileDir Documents and Settings

    Hive registry files also created on NandFlash\Document and Settings folder but i will get fresh hive on every bootup.

    If I copy any data on nandflash, after reboot the data will disapear.

    Also i found "Bootcount" and "boottype" registry variable also not found at comm and performance respectively.

    what might be the reason?

    I will appreciate suggestions on above annoying behavior.


    rakesh


    • Edited by raacha Thursday, June 5, 2014 12:46 PM added additional info
    Thursday, June 5, 2014 12:37 PM

Answers

  • Are you able to format and partition the nand ? 

    Under the bspcfg.c file check whether your nand flash is supported or not if not then add the entry for your nand device as :

    NAND_INFO SupportedNands[] = {
    { // MT29F2G08ABAEA   --( MT29F2G16AADWP THAT IS FROM HW MANUAL )
    0x2C,   //manufacturerId
    0xDA,   //deviceId
            2048,   //blocks
    64,     //sectorsPerBlock
    2048,   //sectorSize - pageSize
    1       //wordData
    }
    ,
    { // MT29F2G08ABAEAH4-E  --
    0x2C,   //manufacturerId
    0xAC,   //deviceId
            4096,   //blocks
    64,     //sectorsPerBlock
    2048,   //sectorSize - pageSize
    1       //wordData
    }
    };

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    • Marked as answer by raacha Monday, June 9, 2014 6:41 AM
    Monday, June 9, 2014 6:30 AM

All replies

  • Dear Sir,

    The problem what you are facing I also faced the similar issue. All things what you shared in the post are very much correct. And same thing happened with me. I checked the NAND info structure and simle made changes for block form 4096 to 1024.. As, our board NAND has 1024 block..... I suggest you to check nand info structure.

    If this post is the answer of your query then please select as an answer. :)

    ~Thanks & Regards

    V Partap Singh  

    Friday, June 6, 2014 6:21 AM
  • Write a code in bootloader to make sure the NAND Flash read/write is working good by comparing the read data from the data you have used for write. Hope you already have source code in bootloader for NAND Read/write. if this is test is passed then Jump in to the the NAND driver code,

    check the NAND Flash information you have passed to the MPP layer is correct (in this sense, the data related to your Nand flash) through FMD_GetInfo() function.

    Then check whether the Read/Write of data and spare area is correctly implemented.


    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    Vinoth.R

    http://vinoth-vinothblog.blogspot.com
    http://www.e-consystems.com/windowsce.asp

    Friday, June 6, 2014 6:31 AM
  • Thanks for your reply.

    We have both bootloaders and kernel image on nandflash.

    we are able to read and write boot loader and os partitions. (confirmed with loading kernel image to Nand via ethernet. and tested by write and read bytes with eboot config menu).

    only the user area getting erased after boot.

    the registry variables "HKEY_LOCAL_MACHINE\comm\bootcount" and "HKEY_CURRENT_USER\performace\last boot type" are not present. are these variables available in WEC7? (in WinCE 6.0 i used these variables to find the clean boot event).

    And as mention i will also check FMD_GetInfo() once.

    Thanks again

     


    rakesh

    Friday, June 6, 2014 8:28 AM
  • Are you able to format and partition the nand ? 

    Under the bspcfg.c file check whether your nand flash is supported or not if not then add the entry for your nand device as :

    NAND_INFO SupportedNands[] = {
    { // MT29F2G08ABAEA   --( MT29F2G16AADWP THAT IS FROM HW MANUAL )
    0x2C,   //manufacturerId
    0xDA,   //deviceId
            2048,   //blocks
    64,     //sectorsPerBlock
    2048,   //sectorSize - pageSize
    1       //wordData
    }
    ,
    { // MT29F2G08ABAEAH4-E  --
    0x2C,   //manufacturerId
    0xAC,   //deviceId
            4096,   //blocks
    64,     //sectorsPerBlock
    2048,   //sectorSize - pageSize
    1       //wordData
    }
    };

    --- Misbah


    Senior Design Engineer T.E.S Electroni Solutions (Bangalore-India) www.tes-dst.com email-misbah.khan@tes-dst.com

    • Marked as answer by raacha Monday, June 9, 2014 6:41 AM
    Monday, June 9, 2014 6:30 AM
  • Hi Misbah,

    Thanks for your reply, because of mismatch in nand info values i got this problem.

    Thanks again


    rakesh

    Monday, June 9, 2014 6:43 AM