This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

NAND write utility failure TCI6630K2L

Other Parts Discussed in Thread: TCI6630K2L

Hi all,

I am trying to program an application into NAND flash and I am running into some issues. Here are the steps I followed:

1. I created a simple Hello World program. Generated a bin file from out file.

2. I connected the board (in DSP no boot mode pin config 0001) using the Blackhawk XDS560 system trace emulator, loaded the tcievmk2l.gel onto DSP  core0 and connected the target.

3. Loaded the nand writer program onto the DSP core (from ti\mcsdk_bios_3_01_04_07\tools\writer\nand\evmk2l\bin).

4. Copied my bin file to the above folder.

5. From memory browser->load memory, selected my bin file (memory contents are not consistent with the expected contents, what am I doing wrong here?).

6. Run the nand writer utility. I get these errors.

[C66xx_0] NAND Writer Utility Version 01.00.00.05

Flashing block 0 (0 bytes of 139676)
Reading and verifying block 0 (0 bytes of 139676)
Failure in reading block 0
Returned platform error number is 2
Flashing block 0 (0 bytes of 139676)
Reading and verifying block 0 (0 bytes of 139676)
Failure in reading block 0
Returned platform error number is 2
Flashing block 0 (0 bytes of 139676)
Reading and verifying block 0 (0 bytes of 139676)
Failure in reading block 0
Returned platform error number is 2
Flashing block 0 (0 bytes of 139676)
Reading and verifying block 0 (0 bytes of 139676)
Failure in reading block 0
Returned platform error number is 2
Flashing block 0 (0 bytes of 139676)
Reading and verifying block 0 (0 bytes of 139676)
Failure in reading block 0
Returned platform error number is 2
NAND write failed (maximum retries reached)

Could someone please explain what am I missing?

Thanks

Regards, Yunas

  • Hi Yunas,

    Please ensure that the pre-built nand binary available in ~:\ti\mcsdk_bios_3_0x_0x_0x\tools\program_evm\binaries\evmk2l works fine with nand writer.

    Also can you please share the procedure followed to convert .out to .bin?

    armhex nand.out $(LOCAL_BUILD_FOLDER)/singleStage.rmd
    b2ccs.exe Stage1.hex nand.ccs.dat
    ccsAddGphdr.exe -infile nand.ccs.dat -outfile nand.ccs.dat.gphdr -headerEndian BE
    ccsAddGptlr.exe -infile nand.ccs.dat.gphdr -outfile nand.ccs.dat.gphdr.gptlr
    cp nand.ccs.dat.gphdr.gptlr ./bin/nandImage.dat
    

    Thank you.

  • Hi Yunas,

    I've alerted the TCI66xx team. They should respond directly here.

    Best Regards,
    Yordan
  • Hi Yunas,

    Have you been through the Keystone Boot Examples document? Found here: processors.wiki.ti.com/.../KeystoneII_Boot_Examples

    This is for K2H/K and K2E so the boot images may not be compatible, but the steps to flash images should be the same.

    Regards,
    Mike
  • Hello Mike,

    Yes I tried the procedure mentioned in the keystone II boot examples. I was able to write to NOR and run a simple program from NOR. The write was successful and I could see prints from the board. But trying the same procedure for NAND fails.

    Regards, Yunas
  • Yunas,

    Are you running on a TCI6630K2L EVM?

    Regards,

    Mike

  • Hi Mike,

    Yes I am using TCI6630K2L EVM. I used a prebuilt dat file for the 6630K2L. The NOR write is completed successfully, but NAND write is failing with the mentioned errors.

    Regards, Yunas
  • Hi Yunas,

    I found a bug that occurs only with the K2L EVM (the other EVMs use identical code). It is actually writing fine and I was able to read-back the beginning of the data I was writing.

    What is going wrong is during the read-back of the data.

    It fails because:

    1. In find_file_length() it goes to calculate the NAND readback address to be stored in nandWriterInfo.readData.

    2. It adds the base of DDR (0x8000_0000) + NAND size (Lamarr is 2GB, 0x8000_0000)

    3. This is equal to 0x1_0000_0000, causing the MSB to drop off, giving us a readback buffer address of 0x0.

    4. In flash_verify(), at function platform_device_read(), the argument scrach_block is based off of nandWriterInfo.readData, which is 0x0.

    5. It fails in platform_device_read() when it checks for (buf == NULL) and gives an error.

    This fails only on the K2L EVM because it has 2GB NAND, where the K2H has 512MB.

    At this point I am not aware of this software being re-released. But as a workaround for now, you can overwrite the readback address, nandWriterInfo.readData at the end of function find_file_length().

    You can use an address such as 0xA000_0000, but your images won't be able to extend past the 512MB boundary.

    Regards,
    Mike
  • Hi MIke,

    Thanks for the update. I did try the same procedure of writing to NAND with K2H device and yes it did work fine. The issue is with K2L devices only. I will do the changes that you mentioned for K2L devices and let you know the results. Also please update me if you come across any information on a re-release of this package with the bug removed.

    Regards, Yunas