NOTICE: The Processors Wiki will End-of-Life on January 15, 2021. It is recommended to download any files or other content you may need that are hosted on processors.wiki.ti.com. The site is now set to read only.

SPI Boot on 5502 EVM

From Texas Instruments Wiki
Jump to: navigation, search

Introduction[edit]

The TMS320VC5502 supports several boot modes as documented in the Boot Configuration section of the data sheet. This article is intended to help demonstrate the SPI flash/EEPROM boot mode with an example that runs on the 5502 EVM.

The primary source for documentation on this boot mode is the app note called Using the TMS320VC5501/C5502 Bootloader.

Creating the Image for Burning to Flash[edit]

First, it's important to note that when your application boots from flash it will be responsible for things like setting up the PLL and EMIF. These items frequently are configured by CCS as part of the gel file. You must not depend on that behavior for booting from flash so be sure you have code in your application to set those up at run-time.

To take a .out file and convert to an image suitable for burning to flash we use a tool called the hex conversion utility, which is documented in the Assembly Language Tools Reference Guide.

An efficient way to invoke the hex conversion utility is by utilizing a "post build step" in your project.

Setting up a post build step in CCS 4

  • Right-click on your project and select "Build Properties..."
  • Go to the "Build Steps" tab
  • Under "Post-build step" enter a command and description

For example, the command used in this project was:

"${CG_TOOL_ROOT}/bin/hex${CG_TOOL_SUFFIX}.exe" -boot -v5510:2 -serial8 -b -o 5502_starter.bin 5502_starter.out
Build options Screenshot

The result of the above post-build step is a binary image called 5502_starter.bin which can be burned to the SPI flash.

Burning the Image to SPI Flash[edit]

There are several methods in general that can be used for burning an application to flash:

  1. Use a socket-based flash programmer prior to soldering the flash onto the board.
    • Pros: Easy
    • Cons: Requires special equipment; updates require removing the flash from the board!
  2. Use "bed of nails" type programming where the flash pins are toggled appropriately by the test equipment.
    • Pros: Easy; allows for easy reprogramming (put back on bed of nails)
    • Cons: Requires special test equipment
  3. DSP-based programming, i.e. write a program the configures the McBSP and writes the program into flash.
    • Pros: Great for developers because it works over JTAG which is something they would generally be using any way.
    • Cons: Not great for production as it requires JTAG emulator and associated software on production line.

Generally speaking, option 2 is great for high volume production and option 3 is great for development.

Examples[edit]

Creating the Application Image[edit]

Here is an application that was created for demonstration purposes on the 5502 EVM. It is a very simple application that configures the stack mode, configures the interrupt vector table, sets up the PLL, and then blinks the LEDs. The project is setup to use a post-build step for generating a binary file that can be written to flash.

Writing the Image[edit]

The 5502 SPI flash/EEPROM boot mode uses McBSP0 in SPI ("clockstop") mode to read data from an external SPI flash/EEPROM. In the case of the 5502 EVM it is connected to a AT25F512N SPI flash.

This program uses file I/O to read a binary file (5502_starter.bin) off the host PC and write it to the serial flash. In order to boot from the flash the jumpers must be set correctly. Specifically, JP4 has jumpers to control the boot mode. You must make sure that the jumpers corresponding to GPIO2 and GPIO1 are populated. The jumper for GPIO0 should NOT be populated. A populated jumper sets the logic level of that pin to 0. Therefore this configuration sets the logical level of GPIO[2:0] = 001b (SPI boot).

References[edit]

TMS320VC5502 Data Sheet
Using the TMS320VC5501/C5502 Bootloader
EVM5502 Technical Reference
Assembly Language Tools Reference Guide

E2e.jpg {{
  1. switchcategory:MultiCore=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article SPI Boot on 5502 EVM here.

Keystone=
  • For technical support on MultiCore devices, please post your questions in the C6000 MultiCore Forum
  • For questions related to the BIOS MultiCore SDK (MCSDK), please use the BIOS Forum

Please post only comments related to the article SPI Boot on 5502 EVM here.

C2000=For technical support on the C2000 please post your questions on The C2000 Forum. Please post only comments about the article SPI Boot on 5502 EVM here. DaVinci=For technical support on DaVincoplease post your questions on The DaVinci Forum. Please post only comments about the article SPI Boot on 5502 EVM here. MSP430=For technical support on MSP430 please post your questions on The MSP430 Forum. Please post only comments about the article SPI Boot on 5502 EVM here. OMAP35x=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article SPI Boot on 5502 EVM here. OMAPL1=For technical support on OMAP please post your questions on The OMAP Forum. Please post only comments about the article SPI Boot on 5502 EVM here. MAVRK=For technical support on MAVRK please post your questions on The MAVRK Toolbox Forum. Please post only comments about the article SPI Boot on 5502 EVM here. For technical support please post your questions at http://e2e.ti.com. Please post only comments about the article SPI Boot on 5502 EVM here.

}}

Hyperlink blue.png Links

Amplifiers & Linear
Audio
Broadband RF/IF & Digital Radio
Clocks & Timers
Data Converters

DLP & MEMS
High-Reliability
Interface
Logic
Power Management

Processors

Switches & Multiplexers
Temperature Sensors & Control ICs
Wireless Connectivity