www.ti.com
Bootloader Code Listing (V3.0)
// TI File $Revision: /main/3 $
// Checkin $Date: January 10, 2005
15:06:37 $
//###########################################################################
//
// FILE:
SCI_Boot.c
//
// TITLE:
280x SCI Boot mode routines
//
// Functions:
//
//
Uint32 SCI_Boot(void)
//
inline void SCIA_Init(void)
//
inline void SCIA_AutobaudLock(void)
//
Uint32 SCIA_GetWordData(void)
//
// Notes:
//
//###########################################################################
// $TI Release:$
// $Release Date:$
//###########################################################################
#include "DSP280x_Device.h"
#include "280x_Boot.h"
// Private functions
inline void SCIA_Init(void);
inline void SCIA_AutobaudLock(void);
Uint16 SCIA_GetWordData(void);
// External functions
extern void CopyData(void);
Uint32 GetLongData(void);
extern void ReadReservedFn(void);
//#################################################
// Uint32 SCI_Boot(void)
//--------------------------------------------
// This module is the main SCI boot routine.
// It will load code via the SCI-A port.
//
// It will return a entry point address back
// to the InitBoot routine which in turn calls
// the ExitBoot routine.
//--------------------------------------------
Uint32 SCI_Boot()
{
Uint32 EntryAddr;
// Assign GetWordData to the SCI-A version of the
// function.
GetWordData is a pointer to a function.
GetWordData = SCIA_GetWordData;
SCIA_Init();
SCIA_AutobaudLock();
// If the KeyValue was invalid, abort the load
// and return the flash entry point.
if (SCIA_GetWordData() != 0x08AA) return FLASH_ENTRY_POINT;
ReadReservedFn();
EntryAddr = GetLongData();
SPRU722C – November 2004 – Revised October 2006
Bootloader Code Overview
71