TMS320C31 Boot Loader Source Code
B-2
************************************************************************
* C31BOOT – TMS320C31 BOOT LOADER PROGRAM
* (C) COPYRIGHT TEXAS INSTRUMENTS INC., 1990
*
* NOTE: 1. AFTER DEVICE RESET, THE PROGRAM IS SET TO WAIT FOR
* THE EXTERNAL INTERRUPTS. THE FUNCTION SELECTION OF
* THE EXTERNAL INTERRUPTS IS AS FOLLOWS:
* –––––––––––––––––––––––––––––––––––––––––––––––––––
* INTERRUPT PIN | FUNCTION
* –––––––––––––––|–––––––––––––––––––––––––––––––––––
* 0 | EPROM boot loader from 1000H
* –––––––––––––––|–––––––––––––––––––––––––––––––––––
* 1 | EPROM boot loader from 400000H
* –––––––––––––––|–––––––––––––––––––––––––––––––––––
* 2 | EPROM boot loader from FFF000H
* –––––––––––––––|–––––––––––––––––––––––––––––––––––
* 3 | Serial port 0 boot loader
* –––––––––––––––––––––––––––––––––––––––––––––––––––
*
* 2. THE EPROM BOOT LOADER LOADS WORD, HALFWORD, OR BYTE-
* WIDE PROGRAMS TO SPECIFIED LOCATIONS. THE
* 8 LSBs OF FIRST MEMORY SPECIFY THE MEMORY WIDTH OF
* THE EPROM. IF THE HALFWORD OR BYTE-WIDE PROGRAM IS
* SELECTED, THE LSBs ARE LOADED FIRST, FOLLOWED BY THE MSBs.
* THE FOLLOWING WORD CONTAINS THE CONTROL WORD FOR
* THE LOCAL MEMORY REGISTER. THE PROGRAM BLOCKS FOLLOW.
* THE FIRST TWO WORDS OF EACH PROGRAM BLOCK CONTAIN
* THE BLOCK SIZE AND MEMORY ADDRESS TO BE LOADED INTO.
* WHEN THE ZERO BLOCK SIZE IS READ, THE PROGRAM BLOCK
* LOADING IS TERMINATED. THE PC WILL BRANCH TO THE
* STARTING ADDRESS OF THE FIRST PROGRAM BLOCK.
*
* 3. IF SERIAL PORT 0 IS SELECTED FOR BOOT LOADING, THE
* PROCESSOR WILL WAIT FOR THE INTERRUPT FROM THE
* RECEIVE SERIAL PORT 0 AND PERFORM THE DOWNLOAD.
* AS WITH THE EPROM LOADER, PROGRAMS CAN BE LOADED
* INTO DIFFERENT MEMORY BLOCKS. THE FIRST TWO WORDS OF EACH
* PROGRAM BLOCK CONTAIN THE BLOCK SIZE AND MEMORY ADDRESS
* TO BE LOADED INTO. WHEN THE ZERO BLOCK SIZE IS READ,
* PROGRAM BLOCK LOADING IS TERMINATED. IN OTHER WORDS,
* IN ORDER TO TERMINATE THE PROGRAM BLOCK LOADING,
* A ZERO HAS TO BE ADDED AT THE END OF THE PROGRAM BLOCK.
* AFTER THE BOOT LOADING IS COMPLETED, THE PC WILL BRANCH
* TO THE STARTING ADDRESS OF THE FIRST PROGRAM BLOCK.
*
************************************************************************