Colibri T20 Flash smart parameters

We use a Colibri T20 with WEC7.
Due to intermittent flash crashes we are looking for a tool to read the smart parameters of the flash (bad clock count, number of write cyles and so on).

Do anybody know such a tool for WEC7?

Toni

SMART is a monitoring system included in hard disk drives, solid-state drives and eMMC drives. Colibri T20 has no one of listed above. It uses a raw NAND as a storage. So no SMART attributes are available.

Hi Alex.tx,

thank you for your answer.

I am not a specialist in flash management, but the wear leveling and badblock mangement layer of the T20 NANDFLASH must store it’s information somewhere within the flash, isn’t it?
There is no way to find and read this information?

Regards,
Toni

Hi @Toni ,

The wear leveling and badblock management is very complex and we don’t have tools ready to analyze that. There is an option to dump out more internal information, but it will not help you much if you don’t know all the details of the internal workings.
Can you maybe specify a bit better what kind of flash crashes you see? Flashdisk file corruption? files disappearing, intermittent wrong readed data?
Can you also spicify what BSP version you’re using? We did some fixes in newer versions… but maybe you’re already using the newest version?

Hi Germano.tx,

I don’t know exactly what happens and how often the user software writes to the flash.
According to our customer, in the event of an error the display remains dark after power on. Unfortunately, I do not know yet whether the bootloader is running or not.
After reprogramming the flash using the recovery mode (via USB) everthing works without any errors - until the next crash.

The BSP version is 1.4.

Now I have some more Information about the flash issue:

  1. The BSP version is 1.3
  2. The Bootloader (V1.3 beta 3) is running
  3. Setting the configuration dbg.serial to 1 results in following boot messages:

    Colibri T20 512MB V1.2A SerialNo: 6338604
    RAM: 512 MB, CarveOut: 64 MB
    Locating kernel image in flash…Done(3702)
    Jumping to image at 0x80016000…:
    :

    Toradex Windows CE 7.0 IMAGE 1.3 for Tegra Built Nov 27 2014
    L2 cache enabled
    MainMemoryEndAddress adjusted from 0x86000000 to 0x9C000000
    Main Phys Mem: 0x00000000:0x1BFFFFFF
    Carveout Phys: 0x1C000000:0x1FFFFFFF
    Cold boot selected
    SMP: Active CPUs = 2
    Chip Id: 0x20 (Handheld SOC) Major: 0x1 Minor: 0x4 SKU: 0x8
    NVRM Initialized shmoo database
    PllClocks(Mhz): X=1000, M=666, C=600, P=216, A=24.576
    SysClocks(Mhz): CPU=1000, AVP=240, SysBus=240, Mem=333, EMem=666
    GraphicClocks(Mhz): Host=108, 3D=111, 2D=111, Epp=111, Mpe=111, Vde=240
    Loading FlashFileSystem(eMMC)…Failed
    Loading FlashFileSystem(NAND)…
    Ecc.Err pgoffset: 0, status: 0xff02
    BchDecResult: 0x101, BchDecStatusBuf: 0xff000000
    Chip: 0, Page = 260642

    NandRead failed, retrying (1)
    Ecc.Err pgoffset: 0, status: 0xff02
    BchDecResult: 0x101, BchDecStatusBuf: 0xff000000
    Chip: 0, Page = 260642

    NandRead failed, retrying (2)
    Ecc.Err pgoffset: 0, status: 0xff02
    BchDecResult: 0x101, BchDecStatusBuf: 0xff000000
    Chip: 0, Page = 260642

    NandRead failed, retrying (3)
    Ecc.Err pgoffset: 0, status: 0xff02
    BchDecResult: 0x101, BchDecStatusBuf: 0xff000000
    Chip: 0, Page = 260642

    NandRead failed, retrying (4)
    Ecc.Err pgoffset: 0, status: 0xff02
    BchDecResult: 0x101, BchDecStatusBuf: 0xff000000
    Chip: 0, Page = 260642

    NandRead failed, retrying (5)
    Ecc.Err pgoffset: 0, status: 0xff02
    BchDecResult: 0x101, BchDecStatusBuf: 0xff000000
    Chip: 0, Page = 260642

    Failed Ddk Rd. Bad block Error code=0xb0010 at chip=0,block=4072 CheckForTAT: Error=b0010 on Blk=4072 PageOffset=34 RevNum=-779849596
    BBs: 13
    No TAT bad block found.
    No TT bad block found.
    Done(275)

    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (1)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (2)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (3)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (4)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (5)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    Failed Ddk Rd. Bad block Error code=0xb0010 at chip=0,block=1924
    TlRead failed Status:720912, No free blocks Available-find out the reason, bank = 0
    ERROR: FreeBlocks = 0 (FreeBeforeFlush = -1)

    RETURNING ERROR FROM NvNandReadSector TL error=720896,Sector Start=0x0,Count=0x1
    Nand block driver: Read Error = 0xb0000, PartId=13, Read: start=0x0, sector count=0x1
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (1)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (2)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (3)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (4)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    NandRead failed, retrying (5)
    Ecc.Err pgoffset: 0, status: 0x102
    BchDecResult: 0x101, BchDecStatusBuf: 0x1000000
    Chip: 0, Page = 123136

    Failed Ddk Rd. Bad block Error code=0xb0010 at chip=0,block=1924
    TlRead failed Status:720912, No free blocks Available-find out the reason, bank = 0
    ERROR: FreeBlocks = 0 (FreeBeforeFlush = -1)

    RETURNING ERROR FROM NvNandReadSector TL error=720896,Sector Start=0x0,Count=0x1
    Nand block driver: Read Error = 0xb0000, PartId=13, Read: start=0x0, sector count=0x1

What does these messages mean?
Is the NAND flash full or are there no free blocks for wear leveling?
Is there any chance to recover from this boot error and find out whether there is for example a very large file?

Regards,
Toni

It means that a new bad block was found but system cant find a free one to do a recovery.
How much free space you have on your “FlashDisk”?
How often your application writes to it and what is a data size for each writing?

Now I have some more informations about the flash:

After installation of the BSP 1.3 based WEC7-image, the “FlashDisk” will be divided into 2 partitions “Part01” and “Part02” with following code:

hStore = OpenStore(_T("DSK1:"));
DismountStore(hStore);
FormatStore(hStore);
CreatePartition(hStore, _T("Part00"), 218240);
CreatePartition(hStore, _T("Part01"), 191);
	
hPartition = OpenPartition(hStore, _T("Part00"));
MountPartition(hPartition);
CloseHandle(hPartition);
	
hPartition = OpenPartition(hStore, _T("Part01"));
if (hPartition != INVALID_HANDLE_VALUE)
MountPartition(hPartition);

CloseHandle(hPartition);
CloseHandle(hStore);

In “Part02” the operating hours are saved, once an hour.
In “Part01” resides the user application. Currently I don’t know whether the user application writes into the flash and if so how often.

Unfortunately I can not find out how much free space is in each partition, since WEC7 does not boot.

Would “nvflash” be a possibility to determine the free space?

Regards,
Toni

You are using very old image (v1.3). We have a lot of fixes including NAND ECC corrections. Could you please flash V2.3 image using latest NVflash tool (v2.6) or an Update tool v6.0.19 ? When use the Update tool you should select ce7.cfg file not a kernel only. In any case it wipe out the whole NAND and you will need to re-install your app.

Our customer now decided to swich to the latest BSP.
What will happen to Colibri modules with previous flash errors after updating to the new image with NVflash tool (V2.6) or Update toll (v6.0.19)?
Are the flashes damaged or is their condition as if the latest BSP had always been in use?

During update bad blocks get marked as a good ones. Blocks will be marked as bad if they continue to generate CRC errors due to flash wearing.