www.ti.com
Bootloader Code Listing (V3.0)
// TI File $Revision: /main/2 $
// Checkin $Date: January 10, 2005
14:39:37 $
//###########################################################################
//
// FILE:
Parallel_Boot.c
//
// TITLE:
280x Parallel Port I/O boot routines
//
// Functions:
//
//
Uint32 Parallel_Boot(void)
//
inline void Parallel_GPIOSelect(void)
//
inline Uint16 Parallel_CheckKeyVal(void)
//
Uint16 Parallel_GetWordData_8bit()
//
Uint16 Parallel_GetWordData_16bit()
//
void Parallel_WaitHostRdy(void)
//
void Parallel_HostHandshake(void)
// Notes:
//
//###########################################################################
// $TI Release:$
// $Release Date:$
//###########################################################################
#include "DSP280x_Device.h"
#include "280x_Boot.h"
// Private function definitions
inline void Parallel_GPIOSelect(void);
inline Uint16 Parallel_CheckKeyVal(void);
Uint16 Parallel_GetWordData_8bit(void);
Uint16 Parallel_GetWordData_16bit(void);
void Parallel_WaitHostRdy(void);
void Parallel_HostHandshake(void);
// External function definitions
extern void CopyData(void);
extern Uint32 GetLongData(void);
extern void ReadReservedFn(void);
#define HOST_CTRL
GPIO27
// GPIO27 is the host control signal
#define DSP_CTRL
GPIO26
// GPIO26 is the DSP's control signal
#define HOST_DATA_NOT_RDY
GpioDataRegs.GPADAT.bit.HOST_CTRL!=0
#define WAIT_HOST_ACK
GpioDataRegs.GPADAT.bit.HOST_CTRL!=1
// Set (DSP_ACK) or Clear (DSP_RDY) GPIO 17
#define DSP_ACK
GpioDataRegs.GPASET.bit.DSP_CTRL = 1;
#define DSP_RDY
GpioDataRegs.GPACLEAR.bit.DSP_CTRL = 1;
#define DATA
GpioDataRegs.GPADAT.all
//#################################################
// Uint32 Parallel_Boot(void)
//--------------------------------------------
// This module is the main Parallel boot routine.
// It will load code via GP I/O port B.
//
// This boot mode accepts 8-bit or 16-bit data.
// 8-bit data is expected to be the order LSB
// followed by MSB.
//
// This function returns a entry point address back
// to the InitBoot routine which in turn calls
// the ExitBoot routine.
//--------------------------------------------
74
Bootloader Code Overview
SPRU722C – November 2004 – Revised October 2006