/****************************************Copyright (c)**************************************************** ** Guangzhou ZHIYUAN electronics Co.,LTD. ** ** http://www.embedtools.com ** **--------------File Info--------------------------------------------------------------------------------- ** File name: target_cfg.h ** Latest modified Date: 2008-12-22 ** Latest Version: 1.0 ** Descriptions: 目标板配置 ** **-------------------------------------------------------------------------------------------------------- ** Created by: Chenmingji ** Created date: 2008-12-22 ** Version: 1.0 ** Descriptions: The original version ** **-------------------------------------------------------------------------------------------------------- ** Modified by: ** Modified date: ** Version: ** Descriptions: ** *********************************************************************************************************/ #ifndef __TARGET_CFG_H #define __TARGET_CFG_H /********************************************************************************************************* 芯片加密级别定义 *********************************************************************************************************/ #ifdef DEBUG #define CRP_LEVEL 0 /* 0为禁止, 1~3依次提高加密级别*/ /* 注意3级加密为OTP加密,加密后 */ /* 芯片再也不能擦除 */ #endif /* DEBUG */ #ifdef RELEASE #define CRP_LEVEL 2 /* 0为禁止, 1~3依次提高加密级别*/ /* 注意3级加密为OTP加密,加密后 */ /* 芯片再也不能擦除 */ #endif /* RELEASE */ /********************************************************************************************************* 系统时钟配置 *********************************************************************************************************/ #define MAIN_CLKSRCSEL_VALUE 1 /* 0x00:选择IRC振荡器 */ /* 0x01:选择系统振器 */ /* 0x02:选择WDT振荡器 */ #define FOSC 12000000 /* 振荡器频率 */ #define FCCLK 48000000 /* 主时钟频率<=50Mhz */ /* FOSC的整数倍 */ #define FCCO (FCCLK * 2 * (1 << PLL_PVALUE)) /* PLL频率(156Mhz~320Mhz) */ #define SYS_AHB_DIV_VALUE 1 #define FAHBCLK (FCCLK / SYS_AHB_DIV_VALUE) /* AHB CLK分频或与FCCLK相同 */ #define PLL_PVALUE 1 /* 1~256 */ #define PLL_MVALUE (FCCLK / FOSC -1 ) /* 1~256 */ #if ((FCCO < 156000000) || (FCCO > 320000000)) #error target_cfg.h:FCCO must less than 320MHz, more than 156MHz, \ you can change the MAIN_PLL_P_Val #endif /* __FCCO < 156000000 */ /* __FCCO > 320000000 */ /********************************************************************************************************* RAM配置 *********************************************************************************************************/ #define RAM_TOP (0x10000000 + (8 * 1024) - 32) /* 内部RAM的顶端 */ /********************************************************************************************************* 异常向量表 *********************************************************************************************************/ #define VECTOR_TABLE_IN_FLASH 1 /* 异常向量表在FLASH的原始位置 */ #define MAX_VICS 73 /* 异常向量表表项数目 */ #endif /* __TARGET_CFG_H */ /********************************************************************************************************* END FILE *********************************************************************************************************/