EasyManuals 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 #68 background imageLoading...
Page #68 background image
www.ti.com
Bootloader Code Listing (V3.0)
EntryAddr = GetLongData();
// 7. Receive and copy one or more code sections to destination addresses
CopyData();
// 8. Disable EEPROM chip enable - high
// Chip enable - high
GpioDataRegs.GPASET.bit.GPIO19 = 1;
return EntryAddr;
}
//#################################################
// void SPIA_Init(void)
//----------------------------------------------
// Initialize the SPI-A port for communications
// with the host.
//----------------------------------------------
inline void SPIA_Init()
{
// Enable SPI-A clocks
EALLOW;
SysCtrlRegs.PCLKCR0.bit.SPIAENCLK = 1;
SysCtrlRegs.LOSPCP.all = 0x0002;
// Enable FIFO reset bit only
SpiaRegs.SPIFFTX.all=0x8000;
// 8-bit character
SpiaRegs.SPICCR.all = 0x0007;
// Use internal SPICLK master mode and Talk mode
SpiaRegs.SPICTL.all = 0x000E;
// Use the slowest baud rate
SpiaRegs.SPIBRR = 0x007f;
// Relinquish SPI-A from reset
SpiaRegs.SPICCR.all = 0x0087;
// Enable SPISIMO/SPISOMI/SPICLK pins
// Enable pull-ups on SPISIMO/SPISOMI/SPICLK/SPISTE pins
// GpioCtrlRegs.GPAPUD.bit.GPIO16 = 0;
// GpioCtrlRegs.GPAPUD.bit.GPIO17 = 0;
// GpioCtrlRegs.GPAPUD.bit.GPIO18 = 0;
// GpioCtrlRegs.GPAPUD.bit.GPIO19 = 0;
GpioCtrlRegs.GPAPUD.all &= 0xFFF0FFFF;
// GpioCtrlRegs.GPAMUX2.bit.GPIO16 = 1;
// GpioCtrlRegs.GPAMUX2.bit.GPIO17 = 1;
// GpioCtrlRegs.GPAMUX2.bit.GPIO18 = 1;
GpioCtrlRegs.GPAMUX2.all |= 0x00000015;
// SPI-A pins are asynch
// GpioCtrlRegs.GPAQSEL2.bit.GPIO16 = 3;
// GpioCtrlRegs.GPAQSEL2.bit.GPIO17 = 3;
// GpioCtrlRegs.GPAQSEL2.bit.GPIO18 = 3;
GpioCtrlRegs.GPAQSEL2.all |= 0x0000003F;
// IOPORT as output pin instead of SPISTE
GpioCtrlRegs.GPAMUX2.bit.GPIO19 = 0;
GpioCtrlRegs.GPADIR.bit.GPIO19 = 1;
// Chip enable - low
GpioDataRegs.GPACLEAR.bit.GPIO19 = 1;
EDIS;
return;
}
//#################################################
// Uint16 SPIA_Transmit(Uint16 cmdData)
//------------------------------------------------
// Send a byte/words through SPI transmit channel
//------------------------------------------------
inline Uint16 SPIA_Transmit(Uint16 cmdData)
{
68 Bootloader Code Overview SPRU722C November 2004 Revised October 2006
Submit Documentation Feedback

Table of Contents

Questions and Answers:

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

Related product manuals