📄 c5402reg.h
字号:
/*=============================================================================*/
/*All software and related documentation is provided "AS IS" and without */
/*warranty or support of any kind and Texas Instruments expressly disclaims */
/*all other warranties,express or implied, including, but not limited to, the */
/*implied warranties of merchantability and fitness for a particular purpose. */
/*Under no circumstances shall Texas Instruments be liable for any incidental, */
/*special or consequential damages that result from the use or inability to */
/*use the software or related documentation, even if Texas Instruments has */
/*been advised of the liability. */
/* */
/*Unless otherwise stated, software written and copyrighted by Texas */
/*Instruments is distributed as "freeware". You may use and modify this */
/*software without any charge or restriction. You may distribute to others, */
/*as long as the original author is acknowledged. */
/*=============================================================================*/
/***********************************************************************/
/*Function: None */
/*file name: c5402Reg.h */
/*Description: File defines ONLY those DSP, McBSP1, and DMA Registers */
/* objects used in conjunction with this Application Note.*/
/*Inputs: None */
/*Outputs: None */
/*Returns: None */
/* AUTHOR : AAP Application Group, L. Philipose, Dallas */
/* CREATED 2000(C) BY TEXAS INSTRUMENTS INCORPORATED. */
/***********************************************************************/
/******************************************************************/
/* Define Interrupt Flag and Interrupt Mask Registers */
/******************************************************************/
#define IMR_BASE 0x00
#define IMR_ADDR ((volatile IMR_REG *) ((char *) IMR_BASE))
#define IFR_BASE 0x01
#define IFR_ADDR ((volatile IFR_REG *) ((char *) IFR_BASE))
typedef union {
struct {
unsigned int res :2;
unsigned int dmac5 :1;
unsigned int dmac4 :1;
unsigned int bxint1 :1;
unsigned int brint1 :1;
unsigned int hint :1;
unsigned int int3 :1;
unsigned int tint1 :1;
unsigned int dmac0 :1;
unsigned int bxint0 :1;
unsigned int brint0 :1;
unsigned int tint0 :1;
unsigned int int2 :1;
unsigned int int1 :1;
unsigned int int0 :1;
} bitval;
unsigned int value;
} IFR_REG;
typedef union {
struct {
unsigned int res :2;
unsigned int dmac5 :1;
unsigned int dmac4 :1;
unsigned int bxint1 :1;
unsigned int brint1 :1;
unsigned int hint :1;
unsigned int int3 :1;
unsigned int tint1 :1;
unsigned int dmac0 :1;
unsigned int bxint0 :1;
unsigned int brint0 :1;
unsigned int tint0 :1;
unsigned int int2 :1;
unsigned int int1 :1;
unsigned int int0 :1;
} bitval;
unsigned int value;
} IMR_REG;
/******************************************************************/
/*Status Registers */
/******************************************************************/
#define ST0_BASE 0x06
#define ST1_BASE 0x07
#define ST0_ADDR ((volatile ST0_REG *) ((char *) ST0_BASE))
#define ST1_ADDR ((volatile ST1_REG *) ((char *) ST1_BASE))
typedef union {
struct {
unsigned int arp :3;
unsigned int tc :1;
unsigned int c :1;
unsigned int ova :1;
unsigned int ovb :1;
unsigned int dp :9;
} bitval;
unsigned int value;
} ST0_REG;
typedef union {
struct {
unsigned int braf :1;
unsigned int cpl :1;
unsigned int xf :1;
unsigned int hm :1;
unsigned int intm :1;
unsigned int zero :1;
unsigned int ovm :1;
unsigned int sxm :1;
unsigned int c16 :1;
unsigned int frct :1;
unsigned int cmpt :1;
unsigned int asmm :5;
} bitval;
unsigned int value;
} ST1_REG;
/******************************************************************/
/*PMST */
/******************************************************************/
#define PMST_BASE 0x1d
#define PMST_ADDR ((volatile PMST_REG *) ((char *) PMST_BASE))
typedef union {
struct {
unsigned int iptr :9;
unsigned int mpmc :1;
unsigned int ovly :1;
unsigned int avis :1;
unsigned int drom :1;
unsigned int clkoff :1;
unsigned int smul :1;
unsigned int sst :1;
} bitval;
unsigned int value;
} PMST_REG;
/*********************************************************************/
/* Structure for McBSP */
/*********************************************************************/
/*-------------------------------------------------------------------*/
/* McBSP 1 */
/*-------------------------------------------------------------------*/
#define DRR21_BASE 0x40
#define DRR11_BASE 0x41
#define DXR21_BASE 0x42
#define DXR11_BASE 0x43
#define SPSA1_BASE 0x48
#define SPCR11_BASE 0x49
#define SPCR21_BASE 0x49
#define RCR11_BASE 0x49
#define RCR21_BASE 0x49
#define XCR11_BASE 0x49
#define XCR21_BASE 0x49
#define SRGR11_BASE 0x49
#define SRGR21_BASE 0x49
#define MCR11_BASE 0x49
#define MCR21_BASE 0x49
#define RCERA1_BASE 0x49
#define RCERB1_BASE 0x49
#define XCERA1_BASE 0x49
#define XCERB1_BASE 0x49
#define PCR1_BASE 0x49
#define SPCR11_SUB 0x00
#define SPCR21_SUB 0x01
#define RCR11_SUB 0x02
#define RCR21_SUB 0x03
#define XCR11_SUB 0x04
#define XCR21_SUB 0x05
#define SRGR11_SUB 0x06
#define SRGR21_SUB 0x07
#define MCR11_SUB 0x08
#define MCR21_SUB 0x09
#define RCERA1_SUB 0x0A
#define RCERB1_SUB 0x0B
#define XCERA1_SUB 0x0C
#define XCERB1_SUB 0x0D
#define PCR1_SUB 0x0E
#define DRR21_ADDR (*(volatile unsigned int *)DRR21_BASE)
#define DRR11_ADDR (*(volatile unsigned int *)DRR11_BASE)
#define DXR21_ADDR (*(volatile unsigned int *)DXR21_BASE)
#define DXR11_ADDR (*(volatile unsigned int *)DXR11_BASE)
#define SPSA1_ADDR (*(volatile unsigned int *)SPSA1_BASE)
#define SPCR11_ADDR ((volatile SPCR1_REG *) ((char *) SPCR11_BASE))
#define SPCR21_ADDR ((volatile SPCR2_REG *) ((char *) SPCR21_BASE))
#define RCR11_ADDR ((volatile RCR1_REG *) ((char *) RCR11_BASE))
#define RCR21_ADDR ((volatile RCR2_REG *) ((char *) RCR21_BASE))
#define XCR11_ADDR ((volatile XCR1_REG *) ((char *) XCR11_BASE))
#define XCR21_ADDR ((volatile XCR2_REG *) ((char *) XCR21_BASE))
#define SRGR11_ADDR ((volatile SRGR1_REG *) ((char *) SRGR11_BASE))
#define SRGR21_ADDR ((volatile SRGR2_REG *) ((char *) SRGR21_BASE))
#define MCR11_ADDR ((volatile MCR1_REG *) ((char *) MCR11_BASE))
#define MCR21_ADDR ((volatile MCR2_REG *) ((char *) MCR21_BASE))
#define RCERA1_ADDR ((volatile RCERA_REG *) ((char *) RCERA1_BASE))
#define RCERB1_ADDR ((volatile RCERB_REG *) ((char *) RCERB1_BASE))
#define XCERA1_ADDR ((volatile XCERA_REG *) ((char *) XCERA1_BASE))
#define XCERB1_ADDR ((volatile XCERB_REG *) ((char *) XCERB1_BASE))
#define PCR1_ADDR ((volatile PCR_REG *) ((char *) PCR1_BASE))
/*-------------------------------------------------------------------*/
/* SPCR1 */
/*-------------------------------------------------------------------*/
typedef union {
struct {
unsigned int dlb:1;
unsigned int rjust:2;
unsigned int clkstp:2;
unsigned int rsrvd:3;
unsigned int dxena:1;
unsigned int abis:1;
unsigned int rintm:2;
unsigned int rsyncerr:1;
unsigned int rfull:1;
unsigned int rrdy:1;
unsigned int rrst:1;
} bitval;
unsigned int value;
} SPCR1_REG;
/*-------------------------------------------------------------------*/
/* SPCR2 */
/*-------------------------------------------------------------------*/
typedef union {
struct {
unsigned int rsrvd:6;
unsigned int free:1;
unsigned int soft:1;
unsigned int frst:1;
unsigned int grst:1;
unsigned int xintm:2;
unsigned int xsyncerr:1;
unsigned int xempty:1;
unsigned int xrdy:1;
unsigned int xrst:1;
} bitval;
unsigned int value;
} SPCR2_REG;
/*-------------------------------------------------------------------*/
/* PCR */
/*-------------------------------------------------------------------*/
typedef union {
struct {
unsigned int rsrvd1:2;
unsigned int xioen:1;
unsigned int rioen:1;
unsigned int fsxm:1;
unsigned int fsrm:1;
unsigned int clkxm:1;
unsigned int clkrm:1;
unsigned int rsrvd2:1;
unsigned int clks_stat:1;
unsigned int dx_stat:1;
unsigned int dr_stat:1;
unsigned int fsxp:1;
unsigned int fsrp:1;
unsigned int clkxp:1;
unsigned int clkrp:1;
} bitval;
unsigned int value;
} PCR_REG;
/*-------------------------------------------------------------------*/
/* RCR1 */
/*-------------------------------------------------------------------*/
typedef union {
struct {
unsigned int rsrvd1:1;
unsigned int rfrlen1:7;
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -