TI中文支持网
TI专业的中文技术问题搜集分享网站

volatile uint16_t resvd_1[26096]; //!< Reserved

typedef struct _ADC_Obj_
{
volatile uint16_t ADCRESULT[16]; //!< ADC result registers
volatile uint16_t resvd_1[26096]; //!< Reserved
volatile uint16_t ADCCTL1; //!< ADC Control Register 1
volatile uint16_t ADCCTL2; //!< ADC Control Register 1
volatile uint16_t rsvd_2[2]; //!< Reserved
volatile uint16_t ADCINTFLG; //!< ADC Interrupt Flag Register
volatile uint16_t ADCINTFLGCLR; //!< ADC Interrupt Flag Clear Register
volatile uint16_t ADCINTOVF; //!< ADC Interrupt Overflow Register
volatile uint16_t ADCINTOVFCLR; //!< ADC Interrupt Overflow Clear Register
volatile uint16_t INTSELxNy[5]; //!< ADC Interrupt Select x and y Register
volatile uint16_t rsvd_3[3]; //!< Reserved
volatile uint16_t SOCPRICTRL; //!< ADC Start Of Conversion Priority Control Register
volatile uint16_t rsvd_4; //!< Reserved
volatile uint16_t ADCSAMPLEMODE; //!< ADC Sample Mode Register
volatile uint16_t rsvd_5; //!< Reserved
volatile uint16_t ADCINTSOCSEL1; //!< ADC Interrupt Trigger SOC Select 1 Register
volatile uint16_t ADCINTSOCSEL2; //!< ADC Interrupt Trigger SOC Select 2 Register
volatile uint16_t rsvd_6[2]; //!< Reserved
volatile uint16_t ADCSOCFLG1; //!< ADC SOC Flag 1 Register
volatile uint16_t rsvd_7; //!< Reserved
volatile uint16_t ADCSOCFRC1; //!< ADC SOC Force 1 Register
volatile uint16_t rsvd_8; //!< Reserved
volatile uint16_t ADCSOCOVF1; //!< ADC SOC Overflow 1 Register
volatile uint16_t rsvd_9; //!< Reserved
volatile uint16_t ADCSOCOVFCLR1; //!< ADC SOC Overflow Clear 1 Register
volatile uint16_t rsvd_10; //!< Reserved
volatile uint16_t ADCSOCxCTL[16]; //!< ADC SOCx Control Registers
volatile uint16_t rsvd_11[16]; //!< Reserved
volatile uint16_t ADCREFTRIM; //!< ADC Reference/Gain Trim Register
volatile uint16_t ADCOFFTRIM; //!< ADC Offset Trim Register
volatile uint16_t resvd_12[13]; //!< Reserved
volatile uint16_t ADCREV; //!< ADC Revision Register
} ADC_Obj;

//! \brief Defines the analog-to-digital converter (ADC) handle
//!
typedef struct ADC_Obj *ADC_Handle;

volatile uint16_t resvd_1[26096]; //!< Reserved

这个保留项 为什么要 这么大的数组,还是编译器不编译它,(不在内存存在)。

Johnson Chen1:

楼主你好!

你说的应该是motorware中的adc.h头文件定义吧。

为什么保留那么大的数组,原因在于ADC结果寄存器的结束地址是0xb0f,而 ADCCTL1的地址是0x7100. 因此0x7100-(0xbof+1)=26096.

赞(0)
未经允许不得转载:TI中文支持网 » volatile uint16_t resvd_1[26096]; //!< Reserved
分享到: 更多 (0)