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.

boot from nand, part 2

Dear,

few days ago, i had ever posted the question "boot from nand", and the problem is solved.

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/368885.aspx

this time, we got an extension problem.

las time, we can write program into NAND, and the program size is small than one block size.

this time, the program size is increased, more than one blocks. (the current size are two blocks)

we use the same action to  write program into NAND, and the response of console window is successful (no error)

but, boot from NAND is fail.

we have used JTAG to see L2SRAM or DDR3, and the result is not correct. we don't know what's happened. 

can someone tell us how to check and debug this problem.

thanks a lot.

Jeff

  • Dear,

    update more information,

    NAND flash: MT29F1G08ABAEA

        64 pages = 1 block (64K + 2K) words
        1 page = (1K + 32) words
        1 block = (1K + 32) words x 64 pages = (64K + 2K) words
        1 device = (1K + 32) words x 64 pages x 1024 blocks = 1056Mb

    nandwrite.c

    /* These values are setup at run time */
    unsigned int busWidth = 8;
    unsigned int pageSizeBytes = 2048;
    unsigned int pagesPerBlock = 64;
    unsigned int spareBytesPerSegment = 16;
    unsigned int spareBytesPerPage = 0;

    unsigned int readIdCmd = 0x90;
    unsigned int readPageCmd = 0x00;
    unsigned int readPageDoneCmd = 0x30; /* Not used for small page devices */
    unsigned int readPageRandomCmd = 0x05; /* Not used for small page devices */
    unsigned int readPageRndDoneCmd = 0xE0; /* Not used for small page devices */

    unsigned int smallPageReadEccCmd = 0x50; /* Used only on small page devices */

    is nandwrite.c needed to modify? how to modify it ?

    Jeff

  • Hi Jeff,

    You may need to modify the nandwriter. Please refer below posts from rahul on the same,

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/329841/1183156.aspx#1183156

    http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/p/335996/1174016.aspx#1174016

    Are you working on Custom board or EVM?

    Thank you.

  • Hi Rajasekaran K,

     

    the information that you provided is done, 

        http://e2e.ti.com/support/dsp/c6000_multi-core_dsps/f/639/t/368885.aspx

    you can see the link.

     

    this time, my problem is "code size is more than one block size"

    when code size is more than one block size, i can't boot from nand.

    if code size is small than one block size, i can boot from nand.

     

    the example code size is small than one block size.

    can you try your board with large code size (more than one block)?

     

    thanks a lot.

     

     

    Jeff

  • Jeff,

    Do you have an EVM to give this a try. If not, can you post your large binary so that we can try this on our EVMs. Can you also send the log obtained when you wrote the image using the NAND writer. Did the flash encounter a bad block after the first block was written and skip a block while writing the image.  ihave check the flash_nand function in the NAND writer and I can confirm that it has been designed to handle images that span across multiple blocks.

    I will compare the datasheets of the 2 NAND parts to compare the NAND geometry and will let you know if there is any modification required to the NAND writer. Can you also specify if you are using the defualt NAND wiriter in the MCSDK package or you have made some modifications.

    Regards,

    Rahul

  • Hi Rahul,

    information:

    1. we have an EVM, but we can't boot from nand sucessfully. (we don't know why it is not workable.)

    2. we use our custom board, and we can boot from nand sucessfully. (if the code size is less than one block size)

    test package: 3513.nand.zip

    1. simple.map / simple.out

    -- it is the test code

    -- you can use ccs to run it. (only use L2SRAM)

    -- the result will be the same as console_code_run.png

    2. console_nwrite.png

    -- use nandboot.bat to convert the simple.out / simple.map

    -- use NWrite to program the nand flash

    -- the result is shown as console_nwrite.png

    3. console_read.png

    -- set the switch to boot from nand

    -- POR and reset

    -- connect target and use NWrite to read the nand flash data

    -- the settings is shown as read_settings.png (it will be skipped "write action", and only execute "read action")

    -- the result is show as console_read.png

    issue:

    after use NWrite to read the nand flash data

    -- the result is correct. (it seems to mean that "write action" is workable, and the nand flash is include correct data) 

    -- but the code image is not loaded into L2SRAM after POR and reset (we use JTAG to check L2SRAM)

    this issue is not exist when the code size is less than one block size.

    it is happened when the code size is more than one block size.

    please help, thanks

    if the test package is not enough, please let us know what you need more.

    Jeff

  • Hi Jeff,

    The NANDWrite.c code provided with the example was built for the NAND flash used on the EVM and was created only to validate the boot during EVM bring up. You will need to modify it to match the NAND geometry provided in the datasheet of the NAND that you are using.  the geormetry you have provided for your NAND doesn`t seem to match the NAND geometry that is used on the EVM which is you may be facing this issue. what does words correspond to in your NAND geometry posted in the first post?

    Can you share the datasheet of the NAND flash you are using.

    try to change the  following parameters in nandwrite.c to match the geometry of your NAND and let us know if it helps.

    unsigned int busWidth = 8;
    unsigned int pageSizeBytes = 2048;
    unsigned int pagesPerBlock = 64;
    unsigned int spareBytesPerSegment = 16;
    unsigned int spareBytesPerPage = 0;

    We also provide a NANDWriter with the MCSDK under under C:\ti\mcsdk_2_01_02_06\tools\writer\nand\evmc6657l\bin. Instructions to flash the NAND using the NANDWriter are provided in the ReadMe under C:\ti\mcsdk_2_01_02_06\tools\writer\nand\docs but I ssupect you will need to chnage the NAND geormetry in this as well.

    Regards,

    Rahul

  • Hi Rahul,

    1. the datasheet of NAND flash : MT29F1G08ABBEAH4E

    3005.MT29F1G08ABBEAH4E.pdf

    2. C:\ti\mcsdk_2_01_02_06\tools\writer\nand\evmc6657l\bin. 

    -- in the beginning, we use nandwriter_evmc6657l to do "boot from nand", but it is fail.

    -- after search and study on e2e, we find NWrite and use it. the boot from nand is successful.

    3. do you try large code size on EVM?

    -- the code size of example which is provided in NWrite is small. it is workable for us.

    -- we want to know the result when you boot from nand, the code size is more than one block size. is it workable, too?

    4. the geometry of NAND

    -- the sample of NWrite separate code image into many "512 bytes" segments.

    -- in the datasheet of NAND, we can't find the information about segment, the min unit is page "2048 bytes", is it right?

    -- do you have any suggestion?

    thanks a lot.

    Jeff

  • Hi Rahul,

    the problem is resolved.

    when we check the HW component, there are some thing wrong.

    the boot configuration is impacted.

    thanks for your help.

    Jeff