EasyManua.ls Logo

Texas Instruments TMS320*2801 Series User Manual

Texas Instruments TMS320*2801 Series
94 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #81 background imageLoading...
Page #81 background image
www.ti.com
Bootloader Code Listing (V3.0)
// The remaining reserved words are read and discarded
// and then program execution returns to the main routine.
//-------------------------------------------------
inline void I2C_ReservedFn(void)
{
Uint16 I2CPrescaler;
Uint16 I2cClkHData;
Uint16 I2cClkLData;
Uint16 I;
// Get I2CPSC, I2CCLKH, and I2CCLKL values
I2CPrescaler = I2C_GetWord();
I2cClkHData = I2C_GetWord();
I2cClkLData = I2C_GetWord();
// Store I2C clock prescalers
I2caRegs.I2CMDR.bit.IRS = 0;
I2caRegs.I2CCLKL = I2cClkLData;
I2caRegs.I2CCLKH = I2cClkHData;
I2caRegs.I2CPSC.all = I2CPrescaler;
I2caRegs.I2CMDR.bit.IRS = 1;
// Read and discard the next 5 reserved words
for (I=1; I<=5; I++)
{
I2cClkHData = I2C_GetWord();
}
return;
}
//#################################################
// Uint16 I2C_GetWord(void)
//-----------------------------------------------
// This routine fetches two bytes from the I2C-A
// port and puts them together little endian style
// to form a single 16-bit value.
//-----------------------------------------------
Uint16 I2C_GetWord(void)
{
Uint16 LowByte;
I2caRegs.I2CCNT = 2; // Setup how many bytes to expect
I2caRegs.I2CMDR.all = 0x2C20; // Send start as master receiver
// Wait until communication done
while (I2caRegs.I2CMDR.bit.STP == 1) {}
// Combine two bytes to one word & return
LowByte = I2caRegs.I2CDRR;
return (LowByte | (I2caRegs.I2CDRR<<8));
}
//===========================================================================
// No more.
//===========================================================================
SPRU722C November 2004 Revised October 2006 Bootloader Code Overview 81
Submit Documentation Feedback

Table of Contents

Question and Answer IconNeed help?

Do you have a question about the Texas Instruments TMS320*2801 Series and is the answer not in the manual?

Texas Instruments TMS320*2801 Series Specifications

General IconGeneral
BrandTexas Instruments
ModelTMS320*2801 Series
CategoryComputer Hardware
LanguageEnglish

Summary

Chapter 1 Boot ROM Overview

Boot ROM Memory Map

Defines the memory map of the on-chip boot ROM, detailing locations for math tables and bootloader functions.

On-Chip Boot ROM IQ Math Tables

Lists and describes the IQ math tables within the boot ROM, essential for optimized calculations.

Chapter 2 Bootloader Features

Bootloader Functional Operation

Outlines the bootloader's primary function: transferring external code into internal memory for execution.

Bootloader Device Configuration

Details device operating modes (27x, 28x, C2xLP) configured by boot ROM software.

Bootloader Modes

Lists and explains various boot modes selected via GPIO pin configurations.

Bootloader Data Stream Structure

Describes the format and content of the data stream used for code loading by bootloaders.

SelectBootMode Function

Details how the SelectBootMode function reads GPIO pins to determine the boot mode.

SCI_Boot Function

Describes the SCI boot mode for asynchronous code transfer via the SCI-A port.

SPI_Boot Function

Details the SPI boot mode for loading code from SPI-compatible serial EEPROMs.

I2C Boot Function

Describes the I2C boot mode for loading code from an I2C EEPROM.

eCAN Boot Function

Explains the eCAN boot mode for asynchronous code transfer via the eCAN-A port.

Chapter 3 Building the Boot Table

The C2000 Hex Utility

Guides users on using the hex2000 utility to generate bootable data streams and boot tables.

Chapter 4 Bootloader Code Overview

Boot ROM Version and Checksum Information

Explains how to find the boot ROM version number, release date, and checksum.

Bootloader Code Revision History

Details the changes and improvements made across different bootloader code revisions.

Appendix A Revision History

Related product manuals