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.

Sample NAND Secondary Boot from tech document spraag0d

Hello,

I'm testing Sample NAND Secondary Boot from tech document spraag0d.
There is a problem when I read data from NAND flash.
NAND_WaitForRdy() is always TIMEOUT when read the same block and the same page.
But if I shift one block when I'm writing data into NAND flash.
The TIMEOUT of NAND_WaitForRdy() shifts one block too.
So, I think it's not a bad page problem.

e.g.
        write AIS from                                                        |    block 1 / page 0        block 2 / page 0
        NAND_WaitForRdy() timeout when reading   |    block 5 / page 9        block 6 / page 9


Any ideas?

Thank you.

  • I tried the same job with a smaller AIS which uses only 4 blocks.
    And the result is correct.
    Read timeout will only be occurred when reading 9th page of 5th block from the first block i wrote.
    Once the timeout occurred, the all pages after it will read timeout too.

    Do anyone have experience like this?

    Thank you.

  • Hi, Anders

     I tried the same job on DM6437 nand boot. My problems are very similar to yours.So I wish you could give some advice.

    1.Have you boot from nand flash successful?Can you consistent boot 6437 from nand flash without secondary boot?

    2.Where do you burn nandboot.ais to? eeprom or nand flash ?The file you write into nand flash by NANDWriter projec is *.bin or *.ais?

    3.Which bootloader version you used? 1.3 or other?in the doc SPRAAG0d it is said"NAND flash boot is fully supported on Rev 1.30 of the device,For Rev 1.0 and Rev 1.20 this boot mode was supported thru secondary boot only"

    4.If the NAND bootmode must use FASTBOOT?

    5. How do I burn the nand flash? use NANDWriter project or FlashBurn?

    thanks a lot

  • 1.Have you boot from nand flash successful?Can you consistent boot 6437 from nand flash without secondary boot?

    Yes, I can boot from nand w/o 2nd boot.

    2.Where do you burn nandboot.ais to? eeprom or nand flash ?The file you write into nand flash by NANDWriter projec is *.bin or *.ais? 

    Write *.bin to nand flash.

    3.Which bootloader version you used? 1.3 or other?in the doc SPRAAG0d it is said"NAND flash boot is fully supported on Rev 1.30 of the device,For Rev 1.0 and Rev 1.20 this boot mode was supported thru secondary boot only"

    I'm not sure about my bootloader version. How can I find it?

    4.If the NAND bootmode must use FASTBOOT?

    I tried FASTBOOT only. Document says the both modes work.

    5. How do I burn the nand flash? use NANDWriter project or FlashBurn?

    use NANDWriter.

     

  • Hi, Anders

    Thank you very much! your suggestion is very helpful

    Anders said:

    2.Where do you burn nandboot.ais to? eeprom or nand flash ?The file you write into nand flash by NANDWriter projec is *.bin or *.ais? 

    Write *.bin to nand flash.

     

     

     Do both nand bootloader code and application code need to be converted to .bin?    How do you convert *.out to *.bin? by genAIS.pl which is from spraag0d?  nand bootloader code and application code are in one .bin file or several different .bin files when being burn to nand flash?


    Anders said:

    I'm not sure about my bootloader version. How can I find it?

     

     I don't kown how to find the bootloader version too. In spraag0d we can find the words "The bootloader version can be found by reading the ROM location 0x0101A00." But I can't find bootloader version like this by CCS. Where do you get your nand bootloader? I use the \Sample NAND Secondary Boot\NAND Secondary Boot\nandboot\nandboot.prj which is from spraag0d.zip downloaded in ti.com and convert  *.out to *.bin. Then write *.bin into nand flash by NANDWriter project. But failed.

    Thanks for your answer again.

     

  • Vincent said:

     Do both nand bootloader code and application code need to be converted to .bin?    How do you convert *.out to *.bin? by genAIS.pl which is from spraag0d?  nand bootloader code and application code are in one .bin file or several different .bin files when being burn to nand flash?

    yes, i convert OUT to BIN by genAIS.pl.
    if you want to use 2nd bootloader, they should be two different BIN files.

    nand boot : 
        convert nandboot.out with nand boot mode, write it to 1st block of nand flash.
        And write app.bin from other block.

    eeprom(i2c) boot :
        convert nandboot.out with eeprom mode, write it to eeprom by I2CWriter.
        And write app.bin to nand flash.

    just remember to set the right  "blockNum = START_BLOCK_NUM;" in nandBoot.c which is the start block of app.bin.
    I tried nand boot and successed, and have not tried eeprom boot yet, it is just in theory. ^^

    Vincent said:

     I don't kown how to find the bootloader version too. In spraag0d we can find the words "The bootloader version can be found by reading the ROM location 0x0101A00." But I can't find bootloader version like this by CCS. Where do you get your nand bootloader? I use the \Sample NAND Secondary Boot\NAND Secondary Boot\nandboot\nandboot.prj which is from spraag0d.zip downloaded in ti.com and convert  *.out to *.bin. Then write *.bin into nand flash by NANDWriter project. But failed.



    I don't know about the version of my bootloader.
    Did you try to write app.bin to nand without nandboot?
    Without 2nd bootloader, It should works too, 

  • Hi,

         i am using spraag0d. but i am not able write the data to flash.

     i get following errors..

    [C64XP_0] Starting test of NAND Flash...
    [C64XP_0] Starting NANDWriter.
    [C64XP_0] Initializing NAND flash...
    [C64XP_0] Manufacturer ID  = 0x000000AD
    [C64XP_0] Device ID        = 0x00000079
    [C64XP_0] Pages Per Block  = 0x32
    [C64XP_0] Number of Blocks = 0x8192
    [C64XP_0] Bytes Per Page   = 0x512
    [C64XP_0]      Total blocks: 8192
    [C64XP_0]      Total pages:  262144
    [C64XP_0]      Total bytes:  134217728
    [C64XP_0] Enter the File Name
    nand.bin
    [C64XP_0] Number of blocks needed for writing: 0x00000004
    [C64XP_0] Attempting to start in block number 0x00000001
    [C64XP_0] Erasing blocks 0x00000001 through 0x00000004.
    [C64XP_0] Writing 512 bytes of data:
    [C64XP_0] Data mismatch! Verification failed.
    [C64XP_0] Block   = 1
    [C64XP_0] Page    = 0
    [C64XP_0] i       = 0
    [C64XP_0] src[i]  = 168
    [C64XP_0] dest[i] = 121
    [C64XP_0] NAND_VerifyPage() failed.
    [C64XP_0] Skipping bad block at block number :1:
    [C64XP_0] Attempting to start in block number 0x00000002
    [C64XP_0] Erasing blocks 0x00000002 through 0x00000005.
    [C64XP_0] Writing 512 bytes of data:
    [C64XP_0] Data mismatch! Verification failed.
    [C64XP_0] Block   = 2
    [C64XP_0] Page    = 0
    [C64XP_0] i       = 0
    [C64XP_0] src[i]  = 168
    [C64XP_0] dest[i] = 121
    [C64XP_0] NAND_VerifyPage() failed.
    [C64XP_0] Skipping bad block at block number :2:
    [C64XP_0] Attempting to start in block number 0x00000003
    [C64XP_0] Erasing blocks 0x00000003 through 0x00000006.
    [C64XP_0] Writing 512 bytes of data:
    [C64XP_0] Data mismatch! Verification failed.
    [C64XP_0] Block   = 3
    [C64XP_0] Page    = 0
    [C64XP_0] i       = 0
    [C64XP_0] src[i]  = 168
    [C64XP_0] dest[i] = 121
    [C64XP_0] NAND_VerifyPage() failed.
    [C64XP_0] Skipping bad block at block number :3:
    [C64XP_0] Attempting to start in block number 0x00000004
    [C64XP_0] Erasing blocks 0x00000004 through 0x00000007.
    [C64XP_0] Writing 512 bytes of data:
    [C64XP_0] Data mismatch! Verification failed.
    [C64XP_0] Block   = 4
    [C64XP_0] Page    = 0
    [C64XP_0] i       = 0
    [C64XP_0] src[i]  = 168
    [C64XP_0] dest[i] = 121
    [C64XP_0] NAND_VerifyPage() failed.
    [C64XP_0] Skipping bad block at block number :4:
    [C64XP_0] Attempting to start in block number 0x00000005
    [C64XP_0] Erasing blocks 0x00000005 through 0x00000008.
    [C64XP_0] Writing 512 bytes of data:
    [C64XP_0] Data mismatch! Verification failed.
    [C64XP_0] Block   = 5
    [C64XP_0] Page    = 0
    [C64XP_0] i       = 0
    [C64XP_0] src[i]  = 168
    [C64XP_0] dest[i] = 121
    [C64XP_0] NAND_VerifyPage() failed.
    [C64XP_0] Skipping bad block at block number :5:
    [C64XP_0] Warning! Write Failed
    [C64XP_0]     : Writing data failed!! Error code = 276944144.

    i am converting my *.out to *.bin using genAIS.pl..

    can anyone tell me the problem with this utility?

  • another question is it possible to boot nand flash?? directly using NANDWriter project???