1
|
/**
|
2
|
* \file regs_upp.h
|
3
|
*
|
4
|
* \brief Register information for the uPP device.
|
5
|
*
|
6
|
* o 0
|
7
|
* | / Copyright (c) 2005-2010
|
8
|
* (CL)---o Critical Link, LLC
|
9
|
* \
|
10
|
* O
|
11
|
*/
|
12
|
|
13
|
#ifndef _REGS_UPP_H_
|
14
|
#define _REGS_UPP_H_
|
15
|
|
16
|
#include <stdint.h>
|
17
|
|
18
|
////////////////////////////////////////////////////////////////////////////
|
19
|
/// @struct tsUppRegs tsUppRegs.h "core/tsUppRegs.h"
|
20
|
/// Private structure for uPP Control Registers.
|
21
|
////////////////////////////////////////////////////////////////////////////
|
22
|
struct tsUppRegs
|
23
|
{
|
24
|
volatile uint32_t UPPID; // 0x00 uPP Peripheral Identification Register Section 3.1
|
25
|
volatile uint32_t UPPCR; // 0x04 uPP Peripheral Control Register Section 3.2
|
26
|
volatile uint32_t UPDLB; // 0x08 uPP Digital Loopback Register Section 3.3
|
27
|
volatile uint32_t EMPT0; // 0x0C
|
28
|
volatile uint32_t UPCTL; // 0x10 uPP Channel Control Register Section 3.4
|
29
|
volatile uint32_t UPICR; // 0x14 uPP Interface Configuration Register Section 3.5
|
30
|
volatile uint32_t UPIVR; // 0x18 uPP Interface Idle Value Register Section 3.6
|
31
|
volatile uint32_t UPTCR; // 0x1C uPP Threshold Configuration Register Section 3.7
|
32
|
volatile uint32_t UPISR; // 0x20 uPP Interrupt Raw Status Register Section 3.8
|
33
|
volatile uint32_t UPIER; // 0x24 uPP Interrupt Enabled Status Register Section 3.9
|
34
|
volatile uint32_t UPIES; // 0x28 uPP Interrupt Enable Set Register Section 3.10
|
35
|
volatile uint32_t UPIEC; // 0x2C uPP Interrupt Enable Clear Register Section 3.11
|
36
|
volatile uint32_t UPEOI; // 0x30 uPP End-of-Interrupt Register Section 3.12
|
37
|
volatile uint32_t EMPT1; // 0x34
|
38
|
volatile uint32_t EMPT2; // 0x38
|
39
|
volatile uint32_t EMPT3; // 0x3C
|
40
|
volatile uint32_t UPID0; // 0x40 uPP DMA Channel I Descriptor 0 Register Section 3.13
|
41
|
volatile uint32_t UPID1; // 0x44 uPP DMA Channel I Descriptor 1 Register Section 3.14
|
42
|
volatile uint32_t UPID2; // 0x48 uPP DMA Channel I Descriptor 2 Register Section 3.15
|
43
|
volatile uint32_t EMPT4; // 0x4C
|
44
|
volatile uint32_t UPIS0; // 0x50 uPP DMA Channel I Status 0 Register Section 3.16
|
45
|
volatile uint32_t UPIS1; // 0x54 uPP DMA Channel I Status 1 Register Section 3.17
|
46
|
volatile uint32_t UPIS2; // 0x58 uPP DMA Channel I Status 2 Register Section 3.18
|
47
|
volatile uint32_t EMPT5; // 0x5C
|
48
|
volatile uint32_t UPQD0; // 0x60 uPP DMA Channel Q Descriptor 0 Register Section 3.19
|
49
|
volatile uint32_t UPQD1; // 0x64 uPP DMA Channel Q Descriptor 1 Register Section 3.20
|
50
|
volatile uint32_t UPQD2; // 0x68 uPP DMA Channel Q Descriptor 2 Register Section 3.21
|
51
|
volatile uint32_t EMPT6; // 0x6C
|
52
|
volatile uint32_t UPQS0; // 0x70 uPP DMA Channel Q Status 0 Register Section 3.22
|
53
|
volatile uint32_t UPQS1; // 0x74 uPP DMA Channel Q Status 1 Register Section 3.23
|
54
|
volatile uint32_t UPQS2; // 0x78 uPP DMA Channel Q Status 2 Register Section 3.24
|
55
|
};
|
56
|
|
57
|
union tuUppcrReg
|
58
|
{
|
59
|
uint32_t nRegWord;
|
60
|
struct
|
61
|
{
|
62
|
uint32_t FREE : 1;
|
63
|
uint32_t SOFT : 1;
|
64
|
uint32_t RTEMU : 1;
|
65
|
uint32_t EN : 1;
|
66
|
uint32_t SWRST : 1;
|
67
|
uint32_t RSVD0 : 2;
|
68
|
uint32_t DB : 1;
|
69
|
uint32_t RSVD1 : 24;
|
70
|
} sRegBits;
|
71
|
};
|
72
|
|
73
|
union tuUpctlReg
|
74
|
{
|
75
|
uint32_t nRegWord;
|
76
|
struct
|
77
|
{
|
78
|
uint32_t MODE : 2;
|
79
|
uint32_t CHN : 1;
|
80
|
uint32_t SDRTXIL : 1;
|
81
|
uint32_t DDRDEMUX : 1;
|
82
|
uint32_t RSVD0 : 11;
|
83
|
uint32_t DRA : 1;
|
84
|
uint32_t IWA : 1;
|
85
|
uint32_t DPWA : 3;
|
86
|
uint32_t DPFA : 2;
|
87
|
uint32_t RSVD1 : 1;
|
88
|
uint32_t DRB : 1;
|
89
|
uint32_t IWB : 1;
|
90
|
uint32_t DPWB : 3;
|
91
|
uint32_t DPFB : 2;
|
92
|
uint32_t RSVD2 : 1;
|
93
|
} sRegBits;
|
94
|
};
|
95
|
|
96
|
// MODE bits in UPCTL register.
|
97
|
enum teUppMode
|
98
|
{
|
99
|
eeAllRcv = 0,
|
100
|
eeAllXmit = 1,
|
101
|
eeARcvBXmit = 2,
|
102
|
eeAXmitBRcv = 3
|
103
|
};
|
104
|
|
105
|
// Data Packing Format. DPFA and DPFB bits in UPCTL register.
|
106
|
enum teUppDpf
|
107
|
{
|
108
|
eeRJZE = 0, // Right-justified, zero extended
|
109
|
eeRJSE = 1, // Right-justified, sign extended
|
110
|
eeLJZF = 2 // Left-justified, zero filled
|
111
|
};
|
112
|
|
113
|
union tuUpicrReg
|
114
|
{
|
115
|
uint32_t nRegWord;
|
116
|
struct
|
117
|
{
|
118
|
uint32_t STARTPOLA : 1;
|
119
|
uint32_t ENAPOLA : 1;
|
120
|
uint32_t WAITPOLA : 1;
|
121
|
uint32_t STARTA : 1;
|
122
|
uint32_t ENAA : 1;
|
123
|
uint32_t WAITA : 1;
|
124
|
uint32_t RSVD0 : 2;
|
125
|
uint32_t CLKDIVA : 4;
|
126
|
uint32_t CLKINVA : 1;
|
127
|
uint32_t TRISA : 1;
|
128
|
uint32_t RSVD1 : 2;
|
129
|
uint32_t STARTPOLB : 1;
|
130
|
uint32_t ENAPOLB : 1;
|
131
|
uint32_t WAITPOLB : 1;
|
132
|
uint32_t STARTB : 1;
|
133
|
uint32_t ENAB : 1;
|
134
|
uint32_t WAITB : 1;
|
135
|
uint32_t RSVD2 : 2;
|
136
|
uint32_t CLKDIVB : 4;
|
137
|
uint32_t CLKINVB : 1;
|
138
|
uint32_t TRISB : 1;
|
139
|
uint32_t RSVD3 : 2;
|
140
|
} sRegBits;
|
141
|
};
|
142
|
|
143
|
union tuUpivrReg
|
144
|
{
|
145
|
uint32_t nRegWord;
|
146
|
struct
|
147
|
{
|
148
|
uint32_t VALA : 16;
|
149
|
uint32_t VALB : 16;
|
150
|
} sRegBits;
|
151
|
};
|
152
|
|
153
|
union tuUptcrReg
|
154
|
{
|
155
|
uint32_t nRegWord;
|
156
|
struct
|
157
|
{
|
158
|
uint32_t RDSIZEI : 2;
|
159
|
uint32_t RSVD0 : 6;
|
160
|
uint32_t RDSIZEQ : 2;
|
161
|
uint32_t RSVD1 : 6;
|
162
|
uint32_t TXSIZEA : 2;
|
163
|
uint32_t RSVD2 : 6;
|
164
|
uint32_t TXSIZEB : 2;
|
165
|
uint32_t RSVD3 : 6;
|
166
|
} sRegBits;
|
167
|
};
|
168
|
|
169
|
union tuUpisrReg
|
170
|
{
|
171
|
uint32_t nRegWord;
|
172
|
struct
|
173
|
{
|
174
|
uint32_t DPEI : 1;
|
175
|
uint32_t UORI : 1;
|
176
|
uint32_t ERRI : 1;
|
177
|
uint32_t EOWI : 1;
|
178
|
uint32_t EOLI : 1;
|
179
|
uint32_t RSVD0 : 3;
|
180
|
uint32_t DPEQ : 1;
|
181
|
uint32_t UORQ : 1;
|
182
|
uint32_t ERRQ : 1;
|
183
|
uint32_t EOWQ : 1;
|
184
|
uint32_t EOLQ : 1;
|
185
|
uint32_t RSVD1 : 19;
|
186
|
} sRegBits;
|
187
|
};
|
188
|
|
189
|
typedef tuUpisrReg tuUpierReg;
|
190
|
typedef tuUpisrReg tuUpiesReg;
|
191
|
typedef tuUpisrReg tuUpiecReg;
|
192
|
|
193
|
union tuUpiqd1Reg
|
194
|
{
|
195
|
uint32_t nRegWord;
|
196
|
struct
|
197
|
{
|
198
|
uint32_t BCNT : 16;
|
199
|
uint32_t LNCNT : 16;
|
200
|
} sRegBits;
|
201
|
};
|
202
|
|
203
|
union tuUpiqs2Reg
|
204
|
{
|
205
|
uint32_t nRegWord;
|
206
|
struct
|
207
|
{
|
208
|
uint32_t ACT : 1;
|
209
|
uint32_t PEND : 1;
|
210
|
uint32_t RSVD0 : 2;
|
211
|
uint32_t WM : 4;
|
212
|
uint32_t RSVD1 : 24;
|
213
|
} sRegBits;
|
214
|
};
|
215
|
|
216
|
#endif
|