summaryrefslogtreecommitdiff
path: root/bsp/ti/c28x/libraries/tms320f28379d/headers/include/F2837xD_upp.h
blob: c33bcc90f2e77d4a773e2f6838860b936ec99d0d (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
//###########################################################################
//
// FILE:    F2837xD_upp.h
//
// TITLE:   UPP Register Definitions.
//
//###########################################################################
// $TI Release: F2837xD Support Library v3.05.00.00 $
// $Release Date: Tue Jun 26 03:15:23 CDT 2018 $
// $Copyright:
// Copyright (C) 2013-2018 Texas Instruments Incorporated - http://www.ti.com/
//
// Redistribution and use in source and binary forms, with or without 
// modification, are permitted provided that the following conditions 
// are met:
// 
//   Redistributions of source code must retain the above copyright 
//   notice, this list of conditions and the following disclaimer.
// 
//   Redistributions in binary form must reproduce the above copyright
//   notice, this list of conditions and the following disclaimer in the 
//   documentation and/or other materials provided with the   
//   distribution.
// 
//   Neither the name of Texas Instruments Incorporated nor the names of
//   its contributors may be used to endorse or promote products derived
//   from this software without specific prior written permission.
// 
// THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS 
// "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT 
// LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR
// A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT 
// OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, 
// SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT 
// LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE,
// DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY
// THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT 
// (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE 
// OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
// $
//###########################################################################

#ifndef __F2837xD_UPP_H__
#define __F2837xD_UPP_H__

#ifdef __cplusplus
extern "C" {
#endif


//---------------------------------------------------------------------------
// UPP Individual Register Bit Definitions:

struct PERCTL_BITS {                    // bits description
    Uint16 FREE:1;                      // 0 Emulation control.
    Uint16 SOFT:1;                      // 1 Emulation control.
    Uint16 RTEMU:1;                     // 2 Realtime emulation control.
    Uint16 PEREN:1;                     // 3 Peripheral Enable
    Uint16 SOFTRST:1;                   // 4 Software Reset
    Uint16 rsvd1:2;                     // 6:5 Reserved
    Uint16 DMAST:1;                     // 7 DMA Burst transaction status
    Uint16 rsvd2:8;                     // 15:8 Reserved
    Uint16 rsvd3:16;                    // 31:16 Reserved
};

union PERCTL_REG {
    Uint32  all;
    struct  PERCTL_BITS  bit;
};

struct CHCTL_BITS {                     // bits description
    Uint16 MODE:2;                      // 1:0 Operating mode
    Uint16 rsvd1:1;                     // 2 Reserved
    Uint16 SDRTXILA:1;                  // 3 SDR TX Interleve mode
    Uint16 DEMUXA:1;                    // 4 DDR de-multiplexing mode
    Uint16 rsvd2:11;                    // 15:5 Reserved
    Uint16 DRA:1;                       // 16 Data rate
    Uint16 rsvd3:14;                    // 30:17 Reserved
    Uint16 rsvd4:1;                     // 31 Reserved
};

union CHCTL_REG {
    Uint32  all;
    struct  CHCTL_BITS  bit;
};

struct IFCFG_BITS {                     // bits description
    Uint16 STARTPOLA:1;                 // 0 Polarity of START(SELECT) signal
    Uint16 ENAPOLA:1;                   // 1 Polarity of ENABLE(WRITE) signal
    Uint16 WAITPOLA:1;                  // 2 Polarity of WAIT signal.
    Uint16 STARTA:1;                    // 3 Enable Usage of START (SELECT) signal
    Uint16 ENAA:1;                      // 4 Enable Usage of ENABLE (WRITE) signal
    Uint16 WAITA:1;                     // 5 Enable Usage of WAIT signal
    Uint16 rsvd1:2;                     // 7:6 Reserved
    Uint16 CLKDIVA:4;                   // 11:8 Clock divider for tx mode
    Uint16 CLKINVA:1;                   // 12 Clock inversion
    Uint16 TRISENA:1;                   // 13 Pin Tri-state Control
    Uint16 rsvd2:2;                     // 15:14 Reserved
    Uint16 rsvd3:6;                     // 21:16 Reserved
    Uint16 rsvd4:2;                     // 23:22 Reserved
    Uint16 rsvd5:6;                     // 29:24 Reserved
    Uint16 rsvd6:2;                     // 31:30 Reserved
};

union IFCFG_REG {
    Uint32  all;
    struct  IFCFG_BITS  bit;
};

struct IFIVAL_BITS {                    // bits description
    Uint16 VALA:9;                      // 8:0 Idle Value
    Uint16 rsvd1:7;                     // 15:9 Reserved
    Uint16 rsvd2:16;                    // 31:16 Reserved
};

union IFIVAL_REG {
    Uint32  all;
    struct  IFIVAL_BITS  bit;
};

struct THCFG_BITS {                     // bits description
    Uint16 RDSIZEI:2;                   // 1:0 DMA Read Threshold for DMA Channel I
    Uint16 rsvd1:6;                     // 7:2 Reserved
    Uint16 RDSIZEQ:2;                   // 9:8 DMA Read Threshold for DMA Channel Q
    Uint16 rsvd2:6;                     // 15:10 Reserved
    Uint16 TXSIZEA:2;                   // 17:16 I/O Transmit Threshold Value
    Uint16 rsvd3:6;                     // 23:18 Reserved
    Uint16 rsvd4:2;                     // 25:24 Reserved
    Uint16 rsvd5:6;                     // 31:26 Reserved
};

union THCFG_REG {
    Uint32  all;
    struct  THCFG_BITS  bit;
};

struct RAWINTST_BITS {                  // bits description
    Uint16 DPEI:1;                      // 0 Interrupt raw status for DMA programming error
    Uint16 UOEI:1;                      // 1 Interrupt raw status for DMA under-run or over-run
    Uint16 rsvd1:1;                     // 2 Reserved
    Uint16 EOWI:1;                      // 3 Interrupt raw status for end-of window condition
    Uint16 EOLI:1;                      // 4 Interrupt raw status for end-of-line condition
    Uint16 rsvd2:3;                     // 7:5 Reserved
    Uint16 DPEQ:1;                      // 8 Interrupt raw status for DMA programming error
    Uint16 UOEQ:1;                      // 9 Interrupt raw status for DMA under-run or over-run
    Uint16 rsvd3:1;                     // 10 Reserved
    Uint16 EOWQ:1;                      // 11 Interrupt raw status for end-of window condition
    Uint16 EOLQ:1;                      // 12 Interrupt raw status for end-of-line condition
    Uint16 rsvd4:3;                     // 15:13 Reserved
    Uint16 rsvd5:16;                    // 31:16 Reserved
};

union RAWINTST_REG {
    Uint32  all;
    struct  RAWINTST_BITS  bit;
};

struct ENINTST_BITS {                   // bits description
    Uint16 DPEI:1;                      // 0 Interrupt enable status for DMA programming error
    Uint16 UOEI:1;                      // 1 Interrupt enable status for DMA under-run or over-run
    Uint16 rsvd1:1;                     // 2 Reserved
    Uint16 EOWI:1;                      // 3 Interrupt enable status for end-of window condition
    Uint16 EOLI:1;                      // 4 Interrupt enable status for end-of-line condition
    Uint16 rsvd2:3;                     // 7:5 Reserved
    Uint16 DPEQ:1;                      // 8 Interrupt enable status for DMA programming error
    Uint16 UOEQ:1;                      // 9 Interrupt enable status for DMA under-run or over-run
    Uint16 rsvd3:1;                     // 10 Reserved
    Uint16 EOWQ:1;                      // 11 Interrupt enable status for end-of window condition
    Uint16 EOLQ:1;                      // 12 Interrupt enable status for end-of-line condition
    Uint16 rsvd4:3;                     // 15:13 Reserved
    Uint16 rsvd5:16;                    // 31:16 Reserved
};

union ENINTST_REG {
    Uint32  all;
    struct  ENINTST_BITS  bit;
};

struct INTENSET_BITS {                  // bits description
    Uint16 DPEI:1;                      // 0 Interrupt enable for DMA programming error
    Uint16 UOEI:1;                      // 1 Interrupt enable for DMA under-run or over-run
    Uint16 rsvd1:1;                     // 2 Reserved
    Uint16 EOWI:1;                      // 3 Interrupt enable for end-of window condition
    Uint16 EOLI:1;                      // 4 Interrupt enable for end-of-line condition
    Uint16 rsvd2:3;                     // 7:5 Reserved
    Uint16 DPEQ:1;                      // 8 Interrupt enable for DMA programming error
    Uint16 UOEQ:1;                      // 9 Interrupt enable for DMA under-run or over-run
    Uint16 rsvd3:1;                     // 10 Reserved
    Uint16 EOWQ:1;                      // 11 Interrupt enable for end-of window condition
    Uint16 EOLQ:1;                      // 12 Interrupt enable for end-of-line condition
    Uint16 rsvd4:3;                     // 15:13 Reserved
    Uint16 rsvd5:16;                    // 31:16 Reserved
};

union INTENSET_REG {
    Uint32  all;
    struct  INTENSET_BITS  bit;
};

struct INTENCLR_BITS {                  // bits description
    Uint16 DPEI:1;                      // 0 Interrupt clear for DMA programming error
    Uint16 UOEI:1;                      // 1 Interrupt clear for DMA under-run or over-run
    Uint16 rsvd1:1;                     // 2 Reserved
    Uint16 EOWI:1;                      // 3 Interrupt clear for end-of window condition
    Uint16 EOLI:1;                      // 4 Interrupt clear for end-of-line condition
    Uint16 rsvd2:3;                     // 7:5 Reserved
    Uint16 DPEQ:1;                      // 8 Interrupt clear for DMA programming error
    Uint16 UOEQ:1;                      // 9 Interrupt clear for DMA under-run or over-run
    Uint16 rsvd3:1;                     // 10 Reserved
    Uint16 EOWQ:1;                      // 11 Interrupt clear for end-of window condition
    Uint16 EOLQ:1;                      // 12 Interrupt clear for end-of-line condition
    Uint16 rsvd4:3;                     // 15:13 Reserved
    Uint16 rsvd5:16;                    // 31:16 Reserved
};

union INTENCLR_REG {
    Uint32  all;
    struct  INTENCLR_BITS  bit;
};

struct CHIDESC1_BITS {                  // bits description
    Uint16 BCNT:16;                     // 15:0 Number of bytes in a line for DMA Channel I transfer.
    Uint16 LCNT:16;                     // 31:16 Number of lines in a window for DMA Channel I transfer.
};

union CHIDESC1_REG {
    Uint32  all;
    struct  CHIDESC1_BITS  bit;
};

struct CHIDESC2_BITS {                  // bits description
    Uint16 LOFFSET:16;                  // 15:0 Current start address to next start address offset.
    Uint16 rsvd1:16;                    // 31:16 Reserved
};

union CHIDESC2_REG {
    Uint32  all;
    struct  CHIDESC2_BITS  bit;
};

struct CHIST1_BITS {                    // bits description
    Uint16 BCNT:16;                     // 15:0 Current byte number.
    Uint16 LCNT:16;                     // 31:16 Current line number.
};

union CHIST1_REG {
    Uint32  all;
    struct  CHIST1_BITS  bit;
};

struct CHIST2_BITS {                    // bits description
    Uint16 ACT:1;                       // 0 Status of DMA descriptor.
    Uint16 PEND:1;                      // 1 Status of DMA.
    Uint16 rsvd1:2;                     // 3:2 Reserved
    Uint16 WM:4;                        // 7:4 Watermark for FIFO block count for DMA Channel I tranfer.
    Uint16 rsvd2:8;                     // 15:8 Reserved
    Uint16 rsvd3:16;                    // 31:16 Reserved
};

union CHIST2_REG {
    Uint32  all;
    struct  CHIST2_BITS  bit;
};

struct CHQDESC1_BITS {                  // bits description
    Uint16 BCNT:16;                     // 15:0 Number of bytes in a line for DMA Channel Q transfer.
    Uint16 LCNT:16;                     // 31:16 Number of lines in a window for DMA Channel Q transfer.
};

union CHQDESC1_REG {
    Uint32  all;
    struct  CHQDESC1_BITS  bit;
};

struct CHQDESC2_BITS {                  // bits description
    Uint16 LOFFSET:16;                  // 15:0 Current start address to next start address offset.
    Uint16 rsvd1:16;                    // 31:16 Reserved
};

union CHQDESC2_REG {
    Uint32  all;
    struct  CHQDESC2_BITS  bit;
};

struct CHQST1_BITS {                    // bits description
    Uint16 BCNT:16;                     // 15:0 Current byte number.
    Uint16 LCNT:16;                     // 31:16 Current line number.
};

union CHQST1_REG {
    Uint32  all;
    struct  CHQST1_BITS  bit;
};

struct CHQST2_BITS {                    // bits description
    Uint16 ACT:1;                       // 0 Status of DMA descriptor.
    Uint16 PEND:1;                      // 1 Status of DMA.
    Uint16 rsvd1:2;                     // 3:2 Reserved
    Uint16 WM:4;                        // 7:4 Watermark for FIFO block count for DMA Channel Q tranfer.
    Uint16 rsvd2:8;                     // 15:8 Reserved
    Uint16 rsvd3:16;                    // 31:16 Reserved
};

union CHQST2_REG {
    Uint32  all;
    struct  CHQST2_BITS  bit;
};

struct GINTEN_BITS {                    // bits description
    Uint16 GINTEN:1;                    // 0 Global Interrupt Enable
    Uint16 rsvd1:15;                    // 15:1 Reserved
    Uint16 rsvd2:16;                    // 31:16 Reserved
};

union GINTEN_REG {
    Uint32  all;
    struct  GINTEN_BITS  bit;
};

struct GINTFLG_BITS {                   // bits description
    Uint16 GINTFLG:1;                   // 0 Global Interrupt Flag
    Uint16 rsvd1:15;                    // 15:1 Reserved
    Uint16 rsvd2:16;                    // 31:16 Reserved
};

union GINTFLG_REG {
    Uint32  all;
    struct  GINTFLG_BITS  bit;
};

struct GINTCLR_BITS {                   // bits description
    Uint16 GINTCLR:1;                   // 0 Global Interrupt Clear
    Uint16 rsvd1:15;                    // 15:1 Reserved
    Uint16 rsvd2:16;                    // 31:16 Reserved
};

union GINTCLR_REG {
    Uint32  all;
    struct  GINTCLR_BITS  bit;
};

struct DLYCTL_BITS {                    // bits description
    Uint16 DLYDIS:1;                    // 0 IO dealy control disable.
    Uint16 DLYCTL:2;                    // 2:1 IO delay control.
    Uint16 rsvd1:13;                    // 15:3 Reserved
    Uint16 rsvd2:16;                    // 31:16 Reserved
};

union DLYCTL_REG {
    Uint32  all;
    struct  DLYCTL_BITS  bit;
};

struct UPP_REGS {
    Uint32                                   PID;                          // Peripheral ID Register
    union   PERCTL_REG                       PERCTL;                       // Peripheral Control Register
    Uint16                                   rsvd1[4];                     // Reserved
    union   CHCTL_REG                        CHCTL;                        // General Control Register
    union   IFCFG_REG                        IFCFG;                        // Interface Configuration Register
    union   IFIVAL_REG                       IFIVAL;                       // Interface Idle Value Register
    union   THCFG_REG                        THCFG;                        // Threshold Configuration Register
    union   RAWINTST_REG                     RAWINTST;                     // Raw Interrupt Status Register
    union   ENINTST_REG                      ENINTST;                      // Enable Interrupt Status Register
    union   INTENSET_REG                     INTENSET;                     // Interrupt Enable Set Register
    union   INTENCLR_REG                     INTENCLR;                     // Interrupt Enable Clear Register
    Uint16                                   rsvd2[8];                     // Reserved
    Uint32                                   CHIDESC0;                     // DMA Channel I Descriptor 0 Register
    union   CHIDESC1_REG                     CHIDESC1;                     // DMA Channel I Descriptor 1 Register
    union   CHIDESC2_REG                     CHIDESC2;                     // DMA Channel I Descriptor 2 Register
    Uint16                                   rsvd3[2];                     // Reserved
    Uint32                                   CHIST0;                       // DMA Channel I Status 0 Register
    union   CHIST1_REG                       CHIST1;                       // DMA Channel I Status 1 Register
    union   CHIST2_REG                       CHIST2;                       // DMA Channel I Status 2 Register
    Uint16                                   rsvd4[2];                     // Reserved
    Uint32                                   CHQDESC0;                     // DMA Channel Q Descriptor 0 Register
    union   CHQDESC1_REG                     CHQDESC1;                     // DMA Channel Q Descriptor 1 Register
    union   CHQDESC2_REG                     CHQDESC2;                     // DMA Channel Q Descriptor 2 Register
    Uint16                                   rsvd5[2];                     // Reserved
    Uint32                                   CHQST0;                       // DMA Channel Q Status 0 Register
    union   CHQST1_REG                       CHQST1;                       // DMA Channel Q Status 1 Register
    union   CHQST2_REG                       CHQST2;                       // DMA Channel Q Status 2 Register
    Uint16                                   rsvd6[2];                     // Reserved
    union   GINTEN_REG                       GINTEN;                       // Global Peripheral Interrupt Enable Register
    union   GINTFLG_REG                      GINTFLG;                      // Global Peripheral Interrupt Flag Register
    union   GINTCLR_REG                      GINTCLR;                      // Global Peripheral Interrupt Clear Register
    union   DLYCTL_REG                       DLYCTL;                       // IO clock data skew control Register
};

//---------------------------------------------------------------------------
// UPP External References & Function Declarations:
//
#ifdef CPU1
extern volatile struct UPP_REGS UppRegs;
#endif
#ifdef __cplusplus
}
#endif                                  /* extern "C" */

#endif

//===========================================================================
// End of file.
//===========================================================================