• Not Answered

Using SPI boot mode in C6678 EVM

Hi All ,

I understand from the datasheet that TMS320C6678 processor supports booting from flash devices (using SPI.EMIF16 boot modes). I want to have a single flash device on my system that will hold the application image and i wish to boot directly from this flash device on power on.

If i configure the boot mode pins to select the required boot mode (SPI or EMIF16) and place my application image in the flash device will i be able to achieve the functionality of bootling from Flash device. Does the ROM bootloader have the support to copy the application image from the flash device (depending on the bootmode pins configure) to DDR and execute the same i.e. non XIP (Execute In Place) mode?

I understand from an earlier post that TMS320C6678 Silicaon version 1.0 chipsets have a PLL lock issue and a workaround required to be implemented.

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

In the EVMs shipped by TI the workaround is implemented in a code sitting on the I2C based EEPROM.

In my case (where i have a single flash device and no EEPROM on board) can i have this workaround implemented in the applciation code sitting in my flash device? To Sum up what i essentially expect to happen on power on is:

(assuming that I have interfaced an SPI based  NOR Flash to TMS320C6678 processor)

1) I configure the bootlmode pins of processor to SPI boot.

2) On Power ON ROM bootloader copies the image in the SPI based NOR flash to DDR and executes this. The PLL is in bypass mode .

3) When the application code executes it first implements the PLL Lock up workaround suggested by TI in the errata. It than initializes the PLLS and proceeds.

Can i achieve the above steps? Please let me know if there are any mistakes in my understanding.

Also is there a way to test this on the TMS3206678 EVM ?

-Anil

 

 

 

83 Replies

  • Hi Anil,

    You can do that with both this mode by using the PLL fix that we provided in the link below.

    http://processors.wiki.ti.com/index.php/C66x

    Even though this is for only PCIe, Ethernet or SRIO, you can expand to your desired boot mode.

     

    Thanks,

    Arun.

  • In reply to ArunMani:

    Arun ,

    Thanks for the info. If i have understood correctly the code snippet pointed by you will help me to programm an I2C based EEPROM with the required botoloader and boot configuration tables to boot from a desired mode (SPI,Ethernet.PCIe e.t.c) via the I2C EEPROM. i.e. on power on by default the code in the I2C EEPROM gets executed which inturn copies the code from an external memory(ex.SPI) to the DDR, depending on the boot mode setting and the boot configuration table programmed on the EEPROM. Please correct me if i am worng.

    I am looking at a scheme wherein , on power on the control jumps directly to an external memory. For example , if i place the secondary bootloader and boot parameter tables on an SPI based NOR Flash and set the boot mode pin settings for SPI boot mode (BOOT[2:0] = "110" : SPI) i would expect the bootloader on the NOR Flash to execute.Will i be able to achieve this functionality. I intend to put the PLL fix in the code sitting on the NOR Flash.

    If the above scheme is possible ,what modifications should i do in the EVM to achive this. I believe that EVM supports only booting via I2C :

    -NOR boot via IBL over I2C

    -NAND boot via IBL over I2C

    -EMAC boot via IBL over I2C

    Also the EVM provides applciation to write boot configurations to I2C based EEPROM on board (Step 2 "Programing "IBL Configuration"" in the file "evmc6678-instructions.txt" present under ../bootloader/ibl/docs

    Steps to use IBL on the c6678 EVM

    1. Programing "IBL" on the EEPROM at bus address 0x51
       (a) Use the I2C EEPROM writer for c6678 EVM from the MCSDK distribution.
       (b) Program i2crom_0x51_c6678_le.dat (IBL image) to the EEPROM at I2C BUS
           address 0x51 following the EEPROM writer's procedure.

    2. Programing "IBL Configuration"
       NOTE: For an understanding of the IBL configuration parameters used in this step,
             please refer to the IBL-Configuration documentation. The configuration
             data structure is ibl_s.  
       (a) Make sure that the boot mode dip switch is set to no boot/EMIF16
           boot mode on the EVM (please refer to the EVM technical reference manual
        on how to set the boot mode dip switches.
       (b) Open CCSv5 and launch the evmc66xx emulator target configuration and connect to core 0.
       (c) Load the program i2cparam_c6678_le.out to CCS.
       (d) Run the program and a message "Run the GEL for the device to be configured,
           press return to program the I2C" will be printed on the CCS console.
       (e) Load i2cConfig.gel (in CCSv5 Tools->GEL Files, right click mouse in GEL Files
           window and select "Load GEL"
       (f) Run the GEL script "EVM c6678 IBL"->setConfig_c6678_main, this will set the
           default boot parameters for booting application images from NOR, NAND and
           Ethernet.
       (g) Now press "Enter" in the CCS console window, and the program will write the
           boot parameter table to the EEPROM. On success the message "I2c table write complete"
        will be printed on the CCS console.

    3. Programming the application on NAND or NOR flash
       NOTE: This step is not needed if the application is booted from Ethernet.
       (a) Use the NAND or NOR writer c6678 EVM from the tools directory.
       (a) Flash the Application to NAND or NOR. For instructions please follow
           the instructions given along with the NAND/NOR writer.

    4. Booting the Application using IBL
       Supported boot modes:
       IBL supports three I2C boot modes: NOR boot, NAND boot and EMAC boot.
       Both NOR boot and NAND boot support maximum 2 images, EMAC boot supports only 1 image.
       For all the I2C boot modes, user needs to set the boot dip switches to I2C master, bus address 0x51.

       NOR Boot:
       Set the dip switches (pin1, pin2, pin3, pin4) to:
        SW3(off, off, on, off),
        SW4(on, on, on, on),
        SW5(on, on, on, off),
        SW6(on, on, on, on)
       This will set the boot para index to 0 to boot the NOR image, by default
       the boot configuration table sets the NOR offset address to be 0 and
       image format to be ELF for image 0.
      
       NAND Boot:
       Set the dip switches (pin1, pin2, pin3, pin4) to:
        SW3(off, off, on, off),
        SW4(on, off, on, on),
        SW5(on, on, on, off),
        SW6(on, on, on, on)
       This will set the boot para index to 2 to boot the NAND image, by default
       the boot configuration table sets the NAND offset address to be 16384
       (start of block 1) and image format to be BBLOB for image 0.

       EMAC Boot:
       Set the dip switches (pin1, pin2, pin3, pin4) to:
        SW3(off, off, on, off),
        SW4(on, on, off, on),
        SW5(on, on, on, off),
        SW6(on, on, on, on)
       This will set the boot para index to 4 to boot an image from a remote TFTP
       server, by default the boot configuration table sets the server IP to be
       192.168.2.101, board IP to be 192.168.2.100 and image format to be BBLOB.

     If i have to achieve a boot from SPI based NOR flash directly , i would have to load the boot configurations to the SPI NOR Flash. Is there a similar applciation avaliable to load the boot configurations onto the SPI based NOR Flash on board ?

    -Anil

     

  • In reply to maril:

    Anil,

    Let me see if I can help.  There's a lot of info here, but I want to make sure I understand your REAL problem.  Reading the thread it would seem you are ultimately trying to boot the 6678 from a single flash device, i.e. you do not want to purchase/populate multiple flash devices.  Is that correct?  If so, yes, you can definitely achieve this goal.  The way you go about doing this will vary slightly depending on the type of memory (i.e. depending on the boot mode).  That said, you have referenced all kinds of memory in this thread.  Please choose one, i.e. what is your preferred nonvolatile memory to use in this device?  Once we narrow this down to a single mode we can move forward in terms of how you actually boot.

    Brad

  • In reply to Brad Griffis:

    Hi Brad,

    Yes, your assumption is correct . We intend to have a single flash on our system and we would like to boot the system directly via this flash i.e. without using an I2C EEPROM. To be more specific , we intend to populate an SPI based NOR flash on our system. We are planning to use the same part that has been mounted on the eval kit (N25Q128A21BSF40F).

    We would like to know if this is possible .

    -Anil

  • In reply to maril:

    Yes, you can boot directly from SPI flash.  This is discussed in Section 3.6 "SPI Boot Operation" of the 66x Bootloader User Guide.

  • In reply to Brad Griffis:

    Hi Brad ,

    Thanks for the info. I understand that this option (booting directly from SPI based NOR flash) is not supported in the EVM. Please confirm.

    If so, is there a way we can test this on the EVM ? What modification are to be done in hardware/software with respect to the EVM to support this ?

    The EVM that i am referring to is the TMSDXEVM6678L Rev 0.2 and software package is BIOS MCSDK 2.00.00 (BETA2).

    -Anil

  • In reply to maril:

    maril
    I understand that this option (booting directly from SPI based NOR flash) is not supported in the EVM. Please confirm.

    It looks like the examples provided in the MCSDK are based off I2C boot.  I see absolutely no reason why you cannot boot directly from SPI flash though.

  • In reply to Brad Griffis:

    Anil/Brad,

    The SPI boot from NOR is indeed supported directly. But since the PLL lockup issue exsist in Shanon, the EVM designer has programmed the FPGA in such a way that no matter what boot you set in the boot pins, the DSP boots in I2C runs the IBL fix for the PLL issue and then re-enters the boot ROM based on the boot mode set in the pins. So if you want to use SPI, please go ahead and set it in SPI boot and boot the board.

     

    Thanks,

    Arun.

  • In reply to ArunMani:

    Arun ,Brad,

    Thanks for the details .

    Arun ,

    From this I understand that it is possible to achieve boot directly from SPI memory using the following steps :

    1) Load the bootloader file  to SPI memory using the NOR Flash writer appliaction provided in the MCSDK package. (This bootloader file will contain the PLL workaround code)

    2) Load the Appliaction file to SPI memory using NOR Flash writer appliaction provided in the MCSDK package.

    3) Change the boot mode switch settings to SPI boot .

    4) Power ON the board.

    Please confirm.

    -Anil

     

     

  • In reply to maril:

    maril

    From this I understand that it is possible to achieve boot directly from SPI memory using the following steps :

    1) Load the bootloader file  to SPI memory using the NOR Flash writer appliaction provided in the MCSDK package. (This bootloader file will contain the PLL workaround code)

    2) Load the Appliaction file to SPI memory using NOR Flash writer appliaction provided in the MCSDK package.

    3) Change the boot mode switch settings to SPI boot .

    4) Power ON the board.

    Please confirm.

    Correct.