📄 sep4020.h
字号:
/*************************************************************************************
* Copyright (c) 2007 by PROCHIP Limited.
* PROPRIETARY RIGHTS of PROCHIP Limited are involved in the subject matter of this
* material. All manufacturing, reproduction, use, and sales rights
* pertaining to this subject matter are governed by the license agreement.
* The recipient of this software implicitly accepts the terms of the license.
*
* File Name: sep4020.h
*
* File Description: sep4020全部寄存器地址的定义.
*
* Version Date Author
*------------------------------------------------------------------------------------
* 0.0.1 2007.12.25 Zhang Yang
* 0.0.2 2008.04.25 QI Haochun
*
*************************************************************************************
*/
#ifndef __SEP4020_H
#define __SEP4020_H
/*************************************
macros for INTC
*************************************/
/*interrupt resources */
#define INT_DMA 31
#define INT_EMI 30
#define INT_TIMER1 29
#define INT_TIMER2 28
#define INT_TIMER3 27
#define INT_WATCHDOG 26
#define INT_SSI 25
#define INT_UART0 24
#define INT_UART1 23
#define INT_UART2 22
#define INT_UART3 21
#define INT_EXT19 20
#define INT_EXT18 19
#define INT_EXT17 18
#define INT_EXT16 17
#define INT_EXT15 16
#define INT_EXT14 15
#define INT_EXT13 14
#define INT_EXT12 13
#define INT_EXT11 12
#define INT_EXT10 11
#define INT_EXT9 10
#define INT_EXT8 9
#define INT_EXT7 8
#define INT_EXT6 7
#define INT_EXT5 6
#define INT_EXT4 5
#define INT_EXT3 4
#define INT_EXT2 3
#define INT_EXT1 2
#define INT_EXT0 1
#define INT_NULL 0
/*
* 各模块寄存器基值
*/
#define ESRAM_BASE 0x04000000
#define INTC_BASE 0x10000000
#define PMU_BASE 0x10001000
#define RTC_BASE 0x10002000
#define WD_BASE 0x10002000
#define TIMER_BASE 0x10003000
#define PWM_BASE 0x10004000
#define UART0_BASE 0X10005000
#define UART1_BASE 0X10006000
#define UART2_BASE 0X10007000
#define UART3_BASE 0X10008000
#define SSI_BASE 0X10009000
#define I2S_BASE 0x1000A000
#define MMC_BASE 0x1000B000
#define SMC0_BASE 0x1000C000
#define SMC1_BASE 0x1000D000
#define USBD_BASE 0x1000E000
#define GPIO_BASE 0x1000F000
#define EMI_BASE 0x11000000
#define DMAC_BASE 0x11001000
#define LCDC_BASE 0x11002000
#define MAC_BASE 0x11003000
#define AMBA_BASE 0x11005000
/*
* INTC模块
* 基址: 0x10000000
*/
#define INTC_IER (INTC_BASE+0X000) /* IRQ中断允许寄存器 */
#define INTC_IMR (INTC_BASE+0X008) /* IRQ中断屏蔽寄存器 */
#define INTC_IFR (INTC_BASE+0X010) /* IRQ软件强制中断寄存器 */
#define INTC_IRSR (INTC_BASE+0X018) /* IRQ未处理中断状态寄存器 */
#define INTC_ISR (INTC_BASE+0X020) /* IRQ中断状态寄存器 */
#define INTC_IMSR (INTC_BASE+0X028) /* IRQ屏蔽中断状态寄存器 */
#define INTC_IFSR (INTC_BASE+0X030) /* IRQ中断最终状态寄存器 */
#define INTC_FIER (INTC_BASE+0X0C0) /* FIQ中断允许寄存器 */
#define INTC_FIMR (INTC_BASE+0X0C4) /* FIQ中断屏蔽寄存器 */
#define INTC_FIFR (INTC_BASE+0X0C8) /* FIQ软件强制中断寄存器 */
#define INTC_FIRSR (INTC_BASE+0X0CC) /* FIQ未处理中断状态寄存器 */
#define INTC_FISR (INTC_BASE+0X0D0) /* FIQ中断状态寄存器 */
#define INTC_FIFSR (INTC_BASE+0X0D4) /* FIQ中断最终状态寄存器 */
#define INTC_IPLR (INTC_BASE+0X0D8) /* IRQ中断优先级寄存器 */
#define INTC_ICR1 (INTC_BASE+0X0DC) /* IRQ内部中断优先级控制寄存器1 */
#define INTC_ICR2 (INTC_BASE+0X0E0) /* IRQ内部中断优先级控制寄存器2 */
#define INTC_EXICR1 (INTC_BASE+0X0E4) /* IRQ外部中断优先级控制寄存器1 */
#define INTC_EXICR2 (INTC_BASE+0X0E8) /* IRQ外部中断优先级控制寄存器2 */
/*
* PMU模块
* 基址: 0x10001000
*/
#define PMU_PLTR (PMU_BASE+0X000) /* PLL的稳定过渡时间 */
#define PMU_PMCR (PMU_BASE+0X004) /* 系统主时钟PLL的控制寄存器 */
#define PMU_PUCR (PMU_BASE+0X008) /* USB时钟PLL的控制寄存器 */
#define PMU_PCSR (PMU_BASE+0X00C) /* 内部模块时钟源供给的控制寄存器 */
#define PMU_PDSLOW (PMU_BASE+0X010) /* SLOW状态下时钟的分频因子 */
#define PMU_PMDR (PMU_BASE+0X014) /* 芯片工作模式寄存器 */
#define PMU_RCTR (PMU_BASE+0X018) /* Reset控制寄存器 */
#define PMU_CLRWAKUP (PMU_BASE+0X01C) /* WakeUp清除寄存器 */
#define PMU_PDAPB (PMU_BASE+0X020) /* 保留未用(用于扩展总线时钟分频比寄存器) */
#define PMU_PLLTS (PMU_BASE+0X024) /* PLL时钟外部测试输出控制寄存器 */
/*
* RTC模块
* 基址: 0x10002000
*/
#define RTC_STA_YMD (RTC_BASE+0X000) /* 年, 月, 日计数寄存器 */
#define RTC_STA_HMS (RTC_BASE+0X004) /* 小时, 分钟, 秒寄存器 */
#define RTC_ALARM_ALL (RTC_BASE+0X008) /* 定时月, 日, 时, 分寄存器 */
#define RTC_CTR (RTC_BASE+0X00C) /* 控制寄存器 */
#define RTC_INT_EN (RTC_BASE+0X010) /* 中断使能寄存器 */
#define RTC_INT_STS (RTC_BASE+0X014) /* 中断状态寄存器 */
#define RTC_SAMP (RTC_BASE+0X018) /* 采样周期寄存器 */
#define RTC_WD_CNT (RTC_BASE+0X01C) /* Watch-Dog计数值寄存器 */
#define RTC_WD_SEV (RTC_BASE+0X020) /* Watch-Dog服务寄存器 */
#define RTC_CONFIG_CHECK (RTC_BASE+0X024) /* 配置时间确认寄存器 (在配置时间之前先写0xaaaaaaaa) */
#define RTC_SOFTRESET (RTC_BASE+0X028) /* 软件复位控制寄存器, 4020中被去掉了 */
#define RTC_KEY0 (RTC_BASE+0X02C) /* 密钥寄存器0, 4020中只有这一个寄存器 */
#define RTC_KEY1 (RTC_BASE+0X030) /* 密钥寄存器1 */
#define RTC_KEY2 (RTC_BASE+0X034) /* 密钥寄存器2 */
#define RTC_KEY3 (RTC_BASE+0X038) /* 密钥寄存器3 */
#define RTC_KEY4 (RTC_BASE+0X03C) /* 密钥寄存器4 */
#define RTC_KEY5 (RTC_BASE+0X040) /* 密钥寄存器5 */
/*
* TIMER模块
* 基址: 0x10003000
*/
#define TIMER_T1LCR (TIMER_BASE+0X000) /* 通道1加载计数寄存器 */
#define TIMER_T1CCR (TIMER_BASE+0X004) /* 通道1当前计数值寄存器 */
#define TIMER_T1CR (TIMER_BASE+0X008) /* 通道1控制寄存器 */
#define TIMER_T1ISCR (TIMER_BASE+0X00C) /* 通道1中断状态清除寄存器 */
#define TIMER_T1IMSR (TIMER_BASE+0X010) /* 通道1中断屏蔽状态寄存器 */
#define TIMER_T2LCR (TIMER_BASE+0X020) /* 通道2加载计数寄存器 */
#define TIMER_T2CCR (TIMER_BASE+0X024) /* 通道2当前计数值寄存器 */
#define TIMER_T2CR (TIMER_BASE+0X028) /* 通道2控制寄存器 */
#define TIMER_T2ISCR (TIMER_BASE+0X02C) /* 通道2中断状态清除寄存器 */
#define TIMER_T2IMSR (TIMER_BASE+0X030) /* 通道2中断屏蔽状态寄存器 */
#define TIMER_T3LCR (TIMER_BASE+0X040) /* 通道3加载计数寄存器 */
#define TIMER_T3CCR (TIMER_BASE+0X044) /* 通道3当前计数值寄存器 */
#define TIMER_T3CR (TIMER_BASE+0X048) /* 通道3控制寄存器 */
#define TIMER_T3ISCR (TIMER_BASE+0X04C) /* 通道3中断状态清除寄存器 */
#define TIMER_T3IMSR (TIMER_BASE+0X050) /* 通道3中断屏蔽状态寄存器 */
#define TIMER_T3CAPR (TIMER_BASE+0X054) /* 通道3捕获寄存器 */
#define TIMER_T4LCR (TIMER_BASE+0X060) /* 通道4加载计数寄存器 */
#define TIMER_T4CCR (TIMER_BASE+0X064) /* 通道4当前计数值寄存器 */
#define TIMER_T4CR (TIMER_BASE+0X068) /* 通道4控制寄存器 */
#define TIMER_T4ISCR (TIMER_BASE+0X06C) /* 通道4中断状态清除寄存器 */
#define TIMER_T4IMSR (TIMER_BASE+0X070) /* 通道4中断屏蔽状态寄存器 */
#define TIMER_T4CAPR (TIMER_BASE+0X074) /* 通道4捕获寄存器 */
#define TIMER_T5LCR (TIMER_BASE+0X080) /* 通道5加载计数寄存器 */
#define TIMER_T5CCR (TIMER_BASE+0X084) /* 通道5当前计数值寄存器 */
#define TIMER_T5CR (TIMER_BASE+0X088) /* 通道5控制寄存器 */
#define TIMER_T5ISCR (TIMER_BASE+0X08C) /* 通道5中断状态清除寄存器 */
#define TIMER_T5IMSR (TIMER_BASE+0X090) /* 通道5中断屏蔽状态寄存器 */
#define TIMER_T5CAPR (TIMER_BASE+0X094) /* 通道5捕获寄存器 */
#define TIMER_T6LCR (TIMER_BASE+0X0A0) /* 通道6加载计数寄存器 */
#define TIMER_T6CCR (TIMER_BASE+0X0A4) /* 通道6当前计数值寄存器 */
#define TIMER_T6CR (TIMER_BASE+0X0A8) /* 通道6控制寄存器 */
#define TIMER_T6ISCR (TIMER_BASE+0X0AC) /* 通道6中断状态清除寄存器 */
#define TIMER_T6IMSR (TIMER_BASE+0X0B0) /* 通道6中断屏蔽状态寄存器 */
#define TIMER_T6CAPR (TIMER_BASE+0X0B4) /* 通道6捕获寄存器 */
#define TIMER_T7LCR (TIMER_BASE+0X0C0) /* 通道7加载计数寄存器 */
#define TIMER_T7CCR (TIMER_BASE+0X0C4) /* 通道7当前计数值寄存器 */
#define TIMER_T7CR (TIMER_BASE+0X0C8) /* 通道7控制寄存器 */
#define TIMER_T7ISCR (TIMER_BASE+0X0CC) /* 通道7中断状态清除寄存器 */
#define TIMER_T7IMSR (TIMER_BASE+0X0D0) /* 通道7中断屏蔽状态寄存器 */
#define TIMER_T8LCR (TIMER_BASE+0X0E0) /* 通道8加载计数寄存器 */
#define TIMER_T8CCR (TIMER_BASE+0X0E4) /* 通道8当前计数值寄存器 */
#define TIMER_T8CR (TIMER_BASE+0X0E8) /* 通道8控制寄存器 */
#define TIMER_T8ISCR (TIMER_BASE+0X0EC) /* 通道8中断状态清除寄存器 */
#define TIMER_T8IMSR (TIMER_BASE+0X0F0) /* 通道8中断屏蔽状态寄存器 */
#define TIMER_T9LCR (TIMER_BASE+0X100) /* 通道9加载计数寄存器 */
#define TIMER_T9CCR (TIMER_BASE+0X104) /* 通道9当前计数值寄存器 */
#define TIMER_T9CR (TIMER_BASE+0X108) /* 通道9控制寄存器 */
#define TIMER_T9ISCR (TIMER_BASE+0X10C) /* 通道9中断状态清除寄存器 */
#define TIMER_T9IMSR (TIMER_BASE+0X110) /* 通道9中断屏蔽状态寄存器 */
#define TIMER_T10LCR (TIMER_BASE+0X120) /* 通道10加载计数寄存器 */
#define TIMER_T10CCR (TIMER_BASE+0X124) /* 通道10当前计数值寄存器 */
#define TIMER_T10CR (TIMER_BASE+0X128) /* 通道10控制寄存器 */
#define TIMER_T10ISCR (TIMER_BASE+0X12C) /* 通道10中断状态清除寄存器 */
#define TIMER_T10IMSR (TIMER_BASE+0X130) /* 通道10中断屏蔽状态寄存器 */
#define TIMER_TIMSR (TIMER_BASE+0X140) /* TIMER中断屏蔽状态寄存器 */
#define TIMER_TISCR (TIMER_BASE+0X144) /* TIMER中断状态清除寄存器 */
#define TIMER_TISR (TIMER_BASE+0X148) /* TIMER中断状态寄存器 */
/*
* PWM模块
* 基址: 0x10004000
*/
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -