/*H*************************************************************************** * * $Archive:: $ * $Revision:: $ * $Date:: $ * $Author:: $ * * DESCRIPTION: * Definitions for Phase Lock Loop to change the DSP frequency for the * TMS320C54XX * USAGE/LIMITATIONS: * * NOTES: * * AUTHOR: Patrick Cresap, 2000 * *H***************************************************************************/ #ifndef C54Xppl #define C54Xppl /*---- compilation control switches ----------------------------------------*/ /***************************************************************************** * INCLUDE FILES (minimize nesting of header files) *****************************************************************************/ /*---- system and platform files -------------------------------------------*/ /*---- program files -------------------------------------------------------*/ /***************************************************************************** * FILE CONTENT *****************************************************************************/ /***************************************************************************** * FUNCTIONAL AREA DETAIL *****************************************************************************/ /*A*************************************************************************** * NAME: * * USAGE: * * NOTES: * *A***************************************************************************/ /*---- context -------------------------------------------------------------*/ /*---- data descriptions ---------------------------------------------------*/ /*---- global data declarations --------------------------------------------*/ /*-- Interrupt macros-------------------------------------------------*/ #define GLOBAL_INT_ENABLE asm( " rsbx intm ") /* enables interrupts*/ #define GLOBAL_INT_DISABLE asm( " ssbx intm ") /* disable interrupts*/ #define PLL_DIV_INIT 0x6004 #define PLL_LOCK_INIT10 0x07fb #define PLL_LOCK_INIT20 0x17fb #define PLL_LOCK_INIT30 0x27fb #define PLL_LOCK_INIT40 0x37fb #define PLL_LOCK_INIT50 0x47fb #define PLL_LOCK_INIT60 0x57fb #define PLL_LOCK_INIT70 0x67fb #define PLL_LOCK_INIT80 0x77fb #define PLL_LOCK_INIT90 0x87fb #define PLL_LOCK_INIT100 0x97fb #define NOP asm( " nop "); /*---- Define macros to set program, data, and io wait states --------------*/ #define PLOW_WAIT(x,y) x = ((x & 0xfff8) + ( y )); NOP; #define PHIGH_WAIT(x,y) x = ((x & 0xffc7) + ( y << 3 )); NOP; #define DLOW_WAIT(x,y) x = ((x & 0xfe3f) + ( y << 6 )); NOP; #define DHIGH_WAIT(x,y) x = ((x & 0xf1ff) + ( y << 9 )); NOP; #define IOALL_WAIT(x,y) x = ((x & 0x8fff) + ( y << 12)); NOP; /*---- global function prototypes ------------------------------------------*/ /*----- Protos for assembly functions from evm5410.c --------------------*/ void InitCPU(unsigned short frequency); unsigned short waitloop( volatile unsigned short loopval ); int C5XX_PllSetFrequency( int Frequency ); void SetWaitStates( unsigned short *waitval ); void SetBankSwitch( unsigned short *bankval ); void SetXF(void ); void ClrXF(void ); void ToggleXF( void ); #endif /* evm5410.h ------ END OF FILE -------------------------------------*/