none
system hangs in the next reboot after copying a big file to NAND flash RRS feed

  • Question

  • Hello,

    I have encountered a strange problem where system hangs in the next reboot after copying a big file (around 233MB) from SDCard to NAND flash.

    The OS is WinCE6.0. CPU is TI AM3715 with Samsung 512MB 8-bit NAND flash.

    Normally system boots without any problem. I can copy small size files (several hundred KB to several MB) from sdcard to NAND flash and can run applications from NAND flash. Powering cycle the device has no problem. However the device hangs in the next reboot after I copy a big file (around 233MB) from sdcard to NAND flash. After copying the big file, I still can browse to different folders and run application without any issue. The problem happens when I power cycle the device. I can see OEMInit retailmsg and after that the system hangs.

    Then I reboot the device and enter EBoot menu. I erase nand blocks belonging to file system (blocks after NK image). The system can boot up to the shell, but files in the NAND flash are gone (since I erase them). So for me, it seems that the file system somehow gets corrupted, but I don't know why.

    Can anybody give me some hints to address this issue?

    Thanks in advance,

    James

    Wednesday, November 27, 2013 5:50 AM

All replies

  • you have to check your NAND flash FMD driver read/write code there may be some issue Print the block addresses by enabling debug messages of your NAND read/Write code to check any overlapping between boundries of filesystem partition is happening.

    Also check the GPMC timing for the NAND flash Interface.


    Please mark as answer, if it is correct.
    Please vote,if it is helpful post.
    All the Best
    Vinoth.R
    www.e-consystems.com
    http://vinoth-vinothblog.blogspot.com

    Wednesday, November 27, 2013 6:03 AM
  • How much size of NAND are you reserving and How much is kept for file system to get mounted ?

    What is the file system type ?

    As per the problem description it looks to  me that you are not correctly reserving the no of flocks for boot image o may be the other parameters like size etc are wrong.

    Can you increase it and check ?

    After NAND is mounted what is size that you are able see ...

    ---- Misbah


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

    Wednesday, November 27, 2013 6:15 AM
  • Hi Vinoth and Misbah,

    Thanks for your help.

    I have put Android JB UBIFS onto my boards and every board works fine. I can adb push the same large file to NAND flash and reboot the device with no problem.

    I have tried WinCE 6.0 OS on 4 boards and 3 are OK and one fails after copying large files.

    The GPMC timing in CE side is the same as that in Android side.

    The EBoot uses bootpart to partition NAND flash.

    The layout of NADN flash is the following:

    Block 0 - 13 (14 blocks) are reserved for x-loader and EBoot.

    Block 14 - 349 (350 blocks) are reserved for 42MB OS image. MBR resides in the first sector of block 14.

    Remaining blocks are assigned to Filesystem. Bootpart reserves 10 blocks for filesystem. Therefore total 235008 sectors are used by filesystem.

    I have tired TFAT and FAT and both showed the same problem.

    Here is some messages from bootpart in eboot:

    WriteMBR: MBR block = 0xe.
    OpenPartition: Partition Exists=0x0 for part 0xb.
    CreatePartition: Enter CreatePartition for 0xb. dwNumSectors = -1
    FindFreeSector: FreeSector is: 0x5400 after processing part 0x20.
    dwReservedBlocks = 10, h1
    dwReservedBlocks = 10, dwLastLogSector = 261247, dwStartSector = 21504
    dwNumMaxSectors = 235008
    CreatePartition: Num sectors set to 0x39600 to allow for compaction blocks.
    CreatePartition: Start = 0x5400, Num = 0x39600.
    WriteMBR: MBR block = 0xe.
    OpenPartition: Partition Exists=0x1 for part 0x20.
    OpenPartition: Partition Exists=0x1 for part 0x20.
    Enter LowLevelFormat [0x0, 0xfff].
    BP_LowLevelFormat: first good starting block is block 14
    BP_LowLevelFormat: g_dwMBRSectorNum = 896
    WriteMBR: MBR block = 0xe.
    Done.

    OpenPartition: Partition Exists=0x0 for part 0x20.
    CreatePartition: Enter CreatePartition for 0x20. dwNumSectors = 21503
    LastLogSector: Last log sector is: 0x3fc7f.
    CreatePartition: Start = 0x1, Num = 0x53ff.
    +WriteLogicalNumbers - dwStartSector = 1, dwNumSectors = 21503, fReadOnly = 1, dwBlockNum = 14
    -WriteLogicalNumbers - dwBlockNum = 350
    WriteMBR: MBR block = 0xe.
    OpenPartition: Partition Exists=0x0 for part 0xb.
    CreatePartition: Enter CreatePartition for 0xb. dwNumSectors = -1
    FindFreeSector: FreeSector is: 0x5400 after processing part 0x20.
    dwReservedBlocks = 10, h1
    dwReservedBlocks = 10, dwLastLogSector = 261247, dwStartSector = 21504
    dwNumMaxSectors = 235008
    CreatePartition: Num sectors set to 0x39600 to allow for compaction blocks.
    CreatePartition: Start = 0x5400, Num = 0x39600.
    WriteMBR: MBR block = 0xe.
    OpenPartition: Partition Exists=0x1 for part 0x20.
    BP_SetDataPointer at 0x2559d50
    BP_SetDataPointer at 0x0

    Thanks again for your help,

    James

    Wednesday, November 27, 2013 6:38 PM