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.

TMS320DM8168: DM8168 and NAND flash boot fail

Part Number: TMS320DM8168
Other Parts Discussed in Thread: PCA9518

Hi

my company use one TMS320DM8168 processor with NAND flash MT29F8G08ABABAWP-IT B.

the processor must start from NAND flash but often it's doesn't work.

often we see at power up, some signal on the !CE of flash but the system don't start (we don't see with minicom the Uboot start print).

after 30/40 seconds, DaVinci retry to read on NAND Flash and often the boot start (we see the UBoot start print).

sometime, the system doesn't work and it retry afer 30/40 seconds.

we use boot configuration like 10011 (NAND, NANDI2C, SD, UART) but we don't have any other memory for boot

if we insert one bootable SD, sometime start from NAND, sometime start from SD (because dont find valid image on NAND flash)

how many time DaVinci wait to retry NAND flash ?

why the DaVinci don't read valid image from NAND flash often (and when retry this image is valid) ?

I see the 

thanks

gianfranco

  • Hi Gian,

    The NAND booting procedure is described in DM816x TRM, chapter 25 ROM Code

    See also below wiki pages, regarding non-booting boards:

    processors.wiki.ti.com/.../Debug_Tips_for_DM81xx_Boot_Fail
    processors.wiki.ti.com/.../AM335x_board_bringup_tips

    The same NAND part is discussed in below e2e threads:

    e2e.ti.com/.../439563
    e2e.ti.com/.../1594969

    You can also run HW diagnostic test on NAND, you can reuse the one coming for DM816x TI EVM:

    support.spectrumdigital.com/.../

    evm816x/tests/nandflash/

    Regards,
    Pavel
  • Hi

    I check the flash and all it's ok.

    the problem continue to exist....

    I have 2 board (different schematic) with the same DaVinci chip (and the same flash) but, in first board all work good and in second often the DaVinci try to read flash (I see the pin nCS0 go down and after go high various time) but after this, i think DaVinci wait....wait....wait....for 40 second and after retry to read the flash.

    the WAIT pin is high (when DaVinci try to read the flash, it go down-up every pulse of nCS0 and after DaVinci stop to read the flash but cannot do it, it remain high).

    I cannot undestand which pin of DaVinci can stop it for 40 seconds.....

    I suppose it trying to boot from another peripheral (the boot sequence is NAND, NANDI2C, SD and UART) but 40 second is really high time between first check of flash and second check of flash.....

    is it possible the DaVinci is lock (I don't know why) and Watchdog reset the CPU after 40 seconds and when CPU restart it can read the flash ?

    which is the default value of watchdog ?

    thanks

    gianfranco

  • gianfranco,

    Your boot config is: NAND -> NANDI2C -> SD -> UART. Seems your boot flow stuck in NAND stage, as if you reach to UART stage, you should see CCCC characters on the console.

    You can check the trace vectors, thus define at which stage the boot flow stuck.

    You can check the "boot parameter structure", thus you can define the reset reason.

    NAND can hold up to four copies of the boot image. Therefore, the ROM Code searches for one valid image out of the four if present by walking over the first four blocks of the NAND mass storage space.

    Regarding Watchdog, check below pointers:

    e2e.ti.com/.../489551
    e2e.ti.com/.../675732

    Regards,
    Pavel
  • Hi
    we make some other test and we have more information :
    - in our board, we have 2 DaVinci chip
    - the I2C0 of this chips are connected via two TI PCA9518 (in PCA9518, pins SCL0/SDA0 are connected to I2C0 SLC/SDA and the EXPSCLx pin of every chip are connected directly to the same pin of other chip)
    - when we isolate one of I2C0 interface, the system work good
    in my opinion, the read of flash fail first time and every Davinci try to read with I2C0 (NAND I2C).
    in this situation, it try con connect with other DaVinci and the system doesn't work good...

    gian
  • If you have no more questions related to the subject, please close/verify/resolve this thread.

    Regards,
    Pavel
  • i have another question...

    in our application we can use SD card.

    if i program NAND flash and insert SD card, when don't start from NAND, DaVinci start always from SD.

    if the problem is I2C, why it start from SD (SD is the 3th boot option and I2C is 2nd).

  • Gian,

    If this NANDI2C boot mode is selected, the ROM code tries to read NAND geometry from an I2C EEPROM. If the read is successful, ROM code then proceeds to next steps of NAND boot, beginning with reading bad blocks information.

    If you don't have EEPROM attached to I2C0, then read is not successful and ROM Code proceed to next boot device in the list.

    Regards,
    Pavel
  • In table 25-7 of Davinci technical reference manual, the first boot peripheral is NAND, the second is NANDI2C, the 3th is SD and 4th is UART.

    if the SD is not in and the 2 DaVinci have I2C connected in same line, often one start from NAND and other start over 40 seconds or some minutes (the situation change, sometime start from NAND DaVinci 1 and sometime start DaVinci 2).

    if the SD is in and the 2 DaVinci have I2C connected in same line, often one start from NAND and other start from SD (the situation change, sometime start from NAND DaVinci 1 and sometime start DaVinci 2).

    if the SD is out and I don't connect the I2C between the chip, all start from NAND (often not in the same time but with difference near to 1-2 seconds).

    I suppose the I2C connection create problem with "restart" of boot sequence....

    could be it correct ?

    thanks

    gianfranco

  • Gianfranco,

    Yes, seems that this I2C connection between two DM816x boards is creating some problems to ROM boot procedure. As the ROM Code is locked and its source is not available, I can not provide you more details.

    Regards,
    Pavel