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 #73 background imageLoading...
Page #73 background image
www.ti.com
Bootloader Code Listing (V3.0)
// 'A' or 'a' and lock
while(SciaRegs.SCIFFCT.bit.ABD != 1) {}
// After autobaud lock, clear the CDC bit
SciaRegs.SCIFFCT.bit.CDC = 0;
while(SciaRegs.SCIRXST.bit.RXRDY != 1) { }
byteData = SciaRegs.SCIRXBUF.bit.RXDT;
SciaRegs.SCITXBUF = byteData;
return;
}
//#################################################
// Uint16 SCIA_GetWordData(void)
//-----------------------------------------------
// This routine fetches two bytes from the SCI-A
// port and puts them together to form a single
// 16-bit value. It is assumed that the host is
// sending the data in the order LSB followed by MSB.
//-----------------------------------------------
Uint16 SCIA_GetWordData()
{
Uint16 wordData;
Uint16 byteData;
wordData = 0x0000;
byteData = 0x0000;
// Fetch the LSB and verify back to the host
while(SciaRegs.SCIRXST.bit.RXRDY != 1) { }
wordData = (Uint16)SciaRegs.SCIRXBUF.bit.RXDT;
SciaRegs.SCITXBUF = wordData;
// Fetch the MSB and verify back to the host
while(SciaRegs.SCIRXST.bit.RXRDY != 1) { }
byteData = (Uint16)SciaRegs.SCIRXBUF.bit.RXDT;
SciaRegs.SCITXBUF = byteData;
// form the wordData from the MSB:LSB
wordData |= (byteData << 8);
return wordData;
}
// EOF-------
SPRU722C November 2004 Revised October 2006 Bootloader Code Overview 73
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