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.

DM6437 booting out of NAND

Other Parts Discussed in Thread: TMS320DM6437, TVP5146

 I have  a TMS320DM6437 EVM.  I need to write my application in the NAND flash and boot ouf ot it..
I see the standard procedure to write the application is through the FlashBurn utility, however it only writes and boots out of the NOR flash.

I looked through the TI forums and found out that basically there are alternative ways to boot out from the NAND flash:

  1. According to document spraag0d.pdf ,  Bootloader versions 1.0 and 1.2 support secondary boot only.   
    1.3 version fully supports NAND flash boot , and the way to determine my bootloader version is reading location 0x0101A00 from ROM.
    how do I read that location using CCS ??  ( the only memory access I'm familiar with is looking at the VIEW dropdown menu ->     
    MEMORY and this shows the L1,L2 L3 data, not ROM)
  2. I downloaded code and a document called NAND secondary boot ( from the docs related to spraag0d.pdf ) , as an option to run code out of NAND in case it is not supported by bootloader directly.
    This document indicates a way to upload application code (converted with genAIS utility into AIS format) to NAND,     
    and then write a secondary bootloader to EEPROM, to be accessed by means of I2C bootload mode, which in turn boots out from NAND flash.
    I tried this approach and had problems running the NandWriter code in CCS, it seems that NAND flash ID is not recognized within the valid ID table.
    I suspect a project configuration error or something else rather than that error. I read in the TI forums that NandWriter was causing
    other problems to others users as well, and that the code for NandWriter had flaws and was very poorly written and not even fully tested.
    Is this secondary bootloader approach valid ?  if so, which document and code ( Nandwriter version, AIS utility, etc) should I     
    refer to ? ( I read something about a DVflasher utility but didn't found any solid documentation about it)
  3. Which would be a reliable procedure to be able to write application to / boot out of NAND ?  ( I'm gathering pieces of information here and there from forums )

 

 

  • Rafael,

    1. The ROM area can be viewed (Read only) in the CCS memory window in the same way as L1 and L2 RAM.

    2.
    Usually the boot process is a multiple step process. First ROM bootloader (RBL) downloads UBL (secondary bootloader). Then UBL downloads u-boot which in turn downloads Linux Kernel/application. The user can modify/skip steps as needed.

    Please go through the bootloader document to understand how the ROM bootloader (RBL) works.
    http://focus.ti.com/lit/an/spraas0c/spraas0c.pdf

    Section 3.6 talks about NAND bootloader in detail. Section 3.6.2 lists the NANDs supported by the RBL (ROM Boot Loader). If the NAND ID (device ID) is not in the table or if the parameters are not matching (different NANDs can have same ID), the NAND might not be supported.

    In NAND boot, UBL can be downloaded from the NAND (or even an EEPROM) which will download the application/u-boot from the NAND.

    Either CCS based or serial based flashing utilities can be used to flash the memory. Please see the details at:
    http://processors.wiki.ti.com/index.php/Serial_Boot_and_Flash_Loading_Utility

    3. Depending on the requirement, serial or CCS based flasher can be used to write/flash the application.
    If the application runs on Linux, then the multiple steps process (described above) should be used to download the application (the Linux kernel should download the application from NAND). Otherwise, depending on the size, UBL or u-boot can be used to reliably download the application.

    Thanks,
    Gaurav

  •  

    1.-  Thanks, I was making an error at the memory map

    2.- I checked that document  ( spraas0c.pdf  ). I see the whole process now.
        I strongly doubt that the unrecognized NAND ID error I get  is really what it says it is. The NAND comes integrated in the evaluation board just as another IC chip (as NOR, TVP5146, etc). So my guess is that it has to be supported.     Now I got that error by running the "NANDwriter"  TI application for CCS, then I suspect something is wrong in the application or in the configuration of it.

      I checked  the flashing utilities from the link provided, however, these applications are mentioned to be only currently available for the DM35x, DM644x, and DM646x.  My system is a TMS320DM6437 EVM.. it (DM643x)  doesn't match with any of the above. 

      Is there something specific or compatible with my DSP or video development plataform ?

    3.- Is u-boot and UBL the same thing?  my understanding is that UBL is the secondary boot loader loaded by RBL (rom bootloader) and u-boot the application itself which is loaded by UBL ?

     Thank you!!

  • 2. Can you please provide the details of the EVM, the device and the flashing tools (version). Also can you please provide the details of the NAND?

    3. As you mentioned, UBL is secondary bootloader loaded by RBL. UBL is usually provided by TI. DM6437 is DSP only device and doesn't have a u-boot. Here UBL can load the application.
    u-boot is loaded by UBL (for ARM boot) and is usually maintained by the community (like kernel).

    Thanks,
    Gaurav


  • 2. Yes, it is a TMS320DM6437 DVDP. Information about the DM6437 Evaluation Module can be found in http://c6000.spectrumdigital.com/evmdm6437
        such as components, hardware and schematics.
       
    The flashing tools I used were obtained from TI.com: spraag0d.zip  (which includes spraag0d.pdf and flashing utilites). 
    This .zip file includes 2 main subfolders:  * ais_utility * ( which includes genAIS conversion tool) and * Sample NAND Secondary Boot *  ( which includes several subfolders with applications to flash the NAND [nandWriter], NOR, SPI16, SPI24, and I2C devices   along with a NANDsecondaryboot.doc file).
    Within the "nandWriter" CCS application, one of the source files has a   v1.0 tag and a completion  date of  - Jan-22-2007.

    The NAND is a STMicroelectronics NAND512W3A.  (complete part number: NAND512W3A2BZA6E).
    It's a 512 Mbit  memory with 512+16 bytes as page size, and a block size of 16k+512 bytes.
    The memory array is 32 pages x 4096 blocks.  Its device ID code is 0x76 h.

    3. So, seems like I only need a secondary bootloader (UBL) and my application ,   UBL is supposed to load my application and wouldn't be needing u-boot,  is that correct?

     

  • Rafael,

    2. I tried the Nand writer on the DM6437 EVM  with the same ST NAND. I was able to flash the image successfully.

    I recommend few steps to debug the problem:
       -- Download  "DM6437 EVM Target Content" from spectrum digital (http://c6000.spectrumdigital.com/evmdm6437/) and run the NAND test (nandflash) --> This will verify that the hardware is good. Logs are appended.
       -- Try stepping through CCS/JTAG and see where the problem is. Send the details and error messages.
       
     3. Yes

    -------------------------------------------------------------------------------------------------------------------------------

    Sample logs from nandflash test from Spectrum Digital:

    01  Testing NAND Flash...
         4096 Blocks
         131072 Pages
         64 MBytes
         Reducing test size to [1024 blocks],[32768 pages],[26 bad pages]
         Erasing Flash [0-1024] blocks
         Writing Flash [0-32768] pages
         Reading Flash [0-32768] pages
         Erasing Flash [0-1024] blocks
        PASS

    ***ALL Tests Passed***