startup.h

来自「dsp转换USB通讯程序样例」· C头文件 代码 · 共 47 行

H
47
字号
/********************************************************************************
 Startup Define Section
********************************************************************************/

// Comment out (please don't delete) the ones that do not apply
// to your code.

//#define STARTUP_SECTION L1_program_block1
#define STARTUP_SECTION SECTION_Code_Start	//?????????? this is a must

#define PLL_MSEL 16     // default = 0xA
//ZTZ comment: 25M*16=400MHz,  2.5ns cycle period time

// #define PLL_D    0x0     // default = 0x0
//#define PLL_LOCK_COUNT 0x300 //default = 0x200

// #define PLL_CSEL 0x0     // default = 0x0
//#define PLL_SSEL 0x4     // default = 0x5
//ZTZ comment: 25M*16/4=100MHz,  100MHz, system clock
#define PLL_SSEL 5     // default = 0x5
//ZTZ comment: 25M*16/5=80MHz,  80MHz, system clock

#define EN_EXC_FAIL_LED  0x2 // Got an exception in your code

#define EN_PASS_LED 0x0  	// Final Test Passed
#define EN_FAIL_LED 0x1  	// Final Test Failed

// #define RUN_USER		 // Otherwise code is run in supervisor mode
						//  ISR15 by default.

#define CFG_FLASH 0x1      // configure flash flag
#define en_async_mem 0xf   // field in asynch mem ctrl reg
#define amb0_timing 0x7bb0
#define amb1_timing 0x7bb0
#define amb2_timing 0x7bb0
#define amb3_timing 0x7bb0

#define flashA_sram 0x20240000	// base addr
#define flashA_csio 0x20270000	// base addr
#define portA_data_out 0x04	// offset
#define portB_data_out 0x05	// offset
#define portA_data_dir 0x06	// offset
#define portB_data_dir 0x07	// offset


// #define EN_SDRAM

⌨️ 快捷键说明

复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?