Subversion Repositories DevTools

Rev

Details | Last modification | View Log | RSS feed

Rev Author Line No. Line
2850 dpurdie 1
/********************************************************************
2
*
3
* Standard register and bit definitions for the Texas Instruments
4
* MSP430 microcontroller.
5
*
6
* This file supports assembler and C development for
7
* MSP430F5509 devices.
8
*
9
* Texas Instruments, Version 1.4
10
*
11
* Rev. 1.0, Setup
12
* Rev. 1.1, Fixed Error in DMA Trigger Definitons
13
* Rev. 1.2, fixed SYSUNIV_BUSIFG definition
14
*           fixed wrong bit definition in PM5CTL0 (LOCKLPM5)
15
* Rev. 1.3, Changed access type of DMAxSZ registers to word only
16
* Rev. 1.4  Changed access type of TimerA/B registers to word only
17
*
18
********************************************************************/
19
 
20
#ifndef __MSP430F5509
21
#define __MSP430F5509
22
 
23
#ifdef __cplusplus
24
extern "C" {
25
#endif
26
 
27
 
28
/*----------------------------------------------------------------------------*/
29
/* PERIPHERAL FILE MAP                                                        */
30
/*----------------------------------------------------------------------------*/
31
 
32
/* External references resolved by a device-specific linker command file */
33
#define SFR_8BIT(address)   extern volatile unsigned char address
34
#define SFR_16BIT(address)  extern volatile unsigned int address
35
//#define SFR_20BIT(address)  extern volatile unsigned int address
36
typedef void (* __SFR_FARPTR)();
37
#define SFR_20BIT(address) extern __SFR_FARPTR address
38
#define SFR_32BIT(address)  extern volatile unsigned long address
39
 
40
 
41
 
42
/************************************************************
43
* STANDARD BITS
44
************************************************************/
45
 
46
#define BIT0                   (0x0001)
47
#define BIT1                   (0x0002)
48
#define BIT2                   (0x0004)
49
#define BIT3                   (0x0008)
50
#define BIT4                   (0x0010)
51
#define BIT5                   (0x0020)
52
#define BIT6                   (0x0040)
53
#define BIT7                   (0x0080)
54
#define BIT8                   (0x0100)
55
#define BIT9                   (0x0200)
56
#define BITA                   (0x0400)
57
#define BITB                   (0x0800)
58
#define BITC                   (0x1000)
59
#define BITD                   (0x2000)
60
#define BITE                   (0x4000)
61
#define BITF                   (0x8000)
62
 
63
/************************************************************
64
* STATUS REGISTER BITS
65
************************************************************/
66
 
67
#define C                      (0x0001)
68
#define Z                      (0x0002)
69
#define N                      (0x0004)
70
#define V                      (0x0100)
71
#define GIE                    (0x0008)
72
#define CPUOFF                 (0x0010)
73
#define OSCOFF                 (0x0020)
74
#define SCG0                   (0x0040)
75
#define SCG1                   (0x0080)
76
 
77
/* Low Power Modes coded with Bits 4-7 in SR */
78
 
79
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
80
#define LPM0                   (CPUOFF)
81
#define LPM1                   (SCG0+CPUOFF)
82
#define LPM2                   (SCG1+CPUOFF)
83
#define LPM3                   (SCG1+SCG0+CPUOFF)
84
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
85
/* End #defines for assembler */
86
 
87
#else /* Begin #defines for C */
88
#define LPM0_bits              (CPUOFF)
89
#define LPM1_bits              (SCG0+CPUOFF)
90
#define LPM2_bits              (SCG1+CPUOFF)
91
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
92
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
93
 
94
#include "in430.h"
95
 
96
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
97
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
98
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
99
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
100
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
101
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
102
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
103
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
104
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
105
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
106
#endif /* End #defines for C */
107
 
108
/************************************************************
109
* CPU
110
************************************************************/
111
#define __MSP430_HAS_MSP430XV2_CPU__                /* Definition to show that it has MSP430XV2 CPU */
112
 
113
/************************************************************
114
* PERIPHERAL FILE MAP
115
************************************************************/
116
 
117
/************************************************************
118
* ADC10_A
119
************************************************************/
120
#define __MSP430_HAS_ADC10_A__                /* Definition to show that Module is available */
121
#define __MSP430_BASEADDRESS_ADC10_A__ 0x0740
122
 
123
SFR_16BIT(ADC10CTL0);                         /* ADC10 Control 0 */
124
SFR_8BIT(ADC10CTL0_L);                        /* ADC10 Control 0 */
125
SFR_8BIT(ADC10CTL0_H);                        /* ADC10 Control 0 */
126
SFR_16BIT(ADC10CTL1);                         /* ADC10 Control 1 */
127
SFR_8BIT(ADC10CTL1_L);                        /* ADC10 Control 1 */
128
SFR_8BIT(ADC10CTL1_H);                        /* ADC10 Control 1 */
129
SFR_16BIT(ADC10CTL2);                         /* ADC10 Control 2 */
130
SFR_8BIT(ADC10CTL2_L);                        /* ADC10 Control 2 */
131
SFR_8BIT(ADC10CTL2_H);                        /* ADC10 Control 2 */
132
SFR_16BIT(ADC10LO);                           /* ADC10 Window Comparator High Threshold */
133
SFR_8BIT(ADC10LO_L);                          /* ADC10 Window Comparator High Threshold */
134
SFR_8BIT(ADC10LO_H);                          /* ADC10 Window Comparator High Threshold */
135
SFR_16BIT(ADC10HI);                           /* ADC10 Window Comparator High Threshold */
136
SFR_8BIT(ADC10HI_L);                          /* ADC10 Window Comparator High Threshold */
137
SFR_8BIT(ADC10HI_H);                          /* ADC10 Window Comparator High Threshold */
138
SFR_16BIT(ADC10MCTL0);                        /* ADC10 Memory Control 0 */
139
SFR_8BIT(ADC10MCTL0_L);                       /* ADC10 Memory Control 0 */
140
SFR_8BIT(ADC10MCTL0_H);                       /* ADC10 Memory Control 0 */
141
SFR_16BIT(ADC10MEM0);                         /* ADC10 Conversion Memory 0 */
142
SFR_8BIT(ADC10MEM0_L);                        /* ADC10 Conversion Memory 0 */
143
SFR_8BIT(ADC10MEM0_H);                        /* ADC10 Conversion Memory 0 */
144
SFR_16BIT(ADC10IE);                           /* ADC10 Interrupt Enable */
145
SFR_8BIT(ADC10IE_L);                          /* ADC10 Interrupt Enable */
146
SFR_8BIT(ADC10IE_H);                          /* ADC10 Interrupt Enable */
147
SFR_16BIT(ADC10IFG);                          /* ADC10 Interrupt Flag */
148
SFR_8BIT(ADC10IFG_L);                         /* ADC10 Interrupt Flag */
149
SFR_8BIT(ADC10IFG_H);                         /* ADC10 Interrupt Flag */
150
SFR_16BIT(ADC10IV);                           /* ADC10 Interrupt Vector Word */
151
SFR_8BIT(ADC10IV_L);                          /* ADC10 Interrupt Vector Word */
152
SFR_8BIT(ADC10IV_H);                          /* ADC10 Interrupt Vector Word */
153
 
154
/* ADC10CTL0 Control Bits */
155
#define ADC10SC                (0x0001)       /* ADC10 Start Conversion */
156
#define ADC10ENC               (0x0002)       /* ADC10 Enable Conversion */
157
#define ADC10ON                (0x0010)       /* ADC10 On/enable */
158
#define ADC10MSC               (0x0080)       /* ADC10 Multiple SampleConversion */
159
#define ADC10SHT0              (0x0100)       /* ADC10 Sample Hold Select Bit: 0 */
160
#define ADC10SHT1              (0x0200)       /* ADC10 Sample Hold Select Bit: 1 */
161
#define ADC10SHT2              (0x0400)       /* ADC10 Sample Hold Select Bit: 2 */
162
#define ADC10SHT3              (0x0800)       /* ADC10 Sample Hold Select Bit: 3 */
163
 
164
/* ADC10CTL0 Control Bits */
165
#define ADC10SC_L              (0x0001)       /* ADC10 Start Conversion */
166
#define ADC10ENC_L             (0x0002)       /* ADC10 Enable Conversion */
167
#define ADC10ON_L              (0x0010)       /* ADC10 On/enable */
168
#define ADC10MSC_L             (0x0080)       /* ADC10 Multiple SampleConversion */
169
 
170
/* ADC10CTL0 Control Bits */
171
#define ADC10SHT0_H            (0x0001)       /* ADC10 Sample Hold Select Bit: 0 */
172
#define ADC10SHT1_H            (0x0002)       /* ADC10 Sample Hold Select Bit: 1 */
173
#define ADC10SHT2_H            (0x0004)       /* ADC10 Sample Hold Select Bit: 2 */
174
#define ADC10SHT3_H            (0x0008)       /* ADC10 Sample Hold Select Bit: 3 */
175
 
176
#define ADC10SHT_0             (0*0x100u)     /* ADC10 Sample Hold Select 0 */
177
#define ADC10SHT_1             (1*0x100u)     /* ADC10 Sample Hold Select 1 */
178
#define ADC10SHT_2             (2*0x100u)     /* ADC10 Sample Hold Select 2 */
179
#define ADC10SHT_3             (3*0x100u)     /* ADC10 Sample Hold Select 3 */
180
#define ADC10SHT_4             (4*0x100u)     /* ADC10 Sample Hold Select 4 */
181
#define ADC10SHT_5             (5*0x100u)     /* ADC10 Sample Hold Select 5 */
182
#define ADC10SHT_6             (6*0x100u)     /* ADC10 Sample Hold Select 6 */
183
#define ADC10SHT_7             (7*0x100u)     /* ADC10 Sample Hold Select 7 */
184
#define ADC10SHT_8             (8*0x100u)     /* ADC10 Sample Hold Select 8 */
185
#define ADC10SHT_9             (9*0x100u)     /* ADC10 Sample Hold Select 9 */
186
#define ADC10SHT_10            (10*0x100u)    /* ADC10 Sample Hold Select 10 */
187
#define ADC10SHT_11            (11*0x100u)    /* ADC10 Sample Hold Select 11 */
188
#define ADC10SHT_12            (12*0x100u)    /* ADC10 Sample Hold Select 12 */
189
#define ADC10SHT_13            (13*0x100u)    /* ADC10 Sample Hold Select 13 */
190
#define ADC10SHT_14            (14*0x100u)    /* ADC10 Sample Hold Select 14 */
191
#define ADC10SHT_15            (15*0x100u)    /* ADC10 Sample Hold Select 15 */
192
 
193
/* ADC10CTL1 Control Bits */
194
#define ADC10BUSY              (0x0001)       /* ADC10 Busy */
195
#define ADC10CONSEQ0           (0x0002)       /* ADC10 Conversion Sequence Select 0 */
196
#define ADC10CONSEQ1           (0x0004)       /* ADC10 Conversion Sequence Select 1 */
197
#define ADC10SSEL0             (0x0008)       /* ADC10 Clock Source Select 0 */
198
#define ADC10SSEL1             (0x0010)       /* ADC10 Clock Source Select 1 */
199
#define ADC10DIV0              (0x0020)       /* ADC10 Clock Divider Select 0 */
200
#define ADC10DIV1              (0x0040)       /* ADC10 Clock Divider Select 1 */
201
#define ADC10DIV2              (0x0080)       /* ADC10 Clock Divider Select 2 */
202
#define ADC10ISSH              (0x0100)       /* ADC10 Invert Sample Hold Signal */
203
#define ADC10SHP               (0x0200)       /* ADC10 Sample/Hold Pulse Mode */
204
#define ADC10SHS0              (0x0400)       /* ADC10 Sample/Hold Source 0 */
205
#define ADC10SHS1              (0x0800)       /* ADC10 Sample/Hold Source 1 */
206
 
207
/* ADC10CTL1 Control Bits */
208
#define ADC10BUSY_L            (0x0001)       /* ADC10 Busy */
209
#define ADC10CONSEQ0_L         (0x0002)       /* ADC10 Conversion Sequence Select 0 */
210
#define ADC10CONSEQ1_L         (0x0004)       /* ADC10 Conversion Sequence Select 1 */
211
#define ADC10SSEL0_L           (0x0008)       /* ADC10 Clock Source Select 0 */
212
#define ADC10SSEL1_L           (0x0010)       /* ADC10 Clock Source Select 1 */
213
#define ADC10DIV0_L            (0x0020)       /* ADC10 Clock Divider Select 0 */
214
#define ADC10DIV1_L            (0x0040)       /* ADC10 Clock Divider Select 1 */
215
#define ADC10DIV2_L            (0x0080)       /* ADC10 Clock Divider Select 2 */
216
 
217
/* ADC10CTL1 Control Bits */
218
#define ADC10ISSH_H            (0x0001)       /* ADC10 Invert Sample Hold Signal */
219
#define ADC10SHP_H             (0x0002)       /* ADC10 Sample/Hold Pulse Mode */
220
#define ADC10SHS0_H            (0x0004)       /* ADC10 Sample/Hold Source 0 */
221
#define ADC10SHS1_H            (0x0008)       /* ADC10 Sample/Hold Source 1 */
222
 
223
#define ADC10CONSEQ_0          (0*2u)         /* ADC10 Conversion Sequence Select: 0 */
224
#define ADC10CONSEQ_1          (1*2u)         /* ADC10 Conversion Sequence Select: 1 */
225
#define ADC10CONSEQ_2          (2*2u)         /* ADC10 Conversion Sequence Select: 2 */
226
#define ADC10CONSEQ_3          (3*2u)         /* ADC10 Conversion Sequence Select: 3 */
227
 
228
#define ADC10SSEL_0            (0*8u)         /* ADC10 Clock Source Select: 0 */
229
#define ADC10SSEL_1            (1*8u)         /* ADC10 Clock Source Select: 1 */
230
#define ADC10SSEL_2            (2*8u)         /* ADC10 Clock Source Select: 2 */
231
#define ADC10SSEL_3            (3*8u)         /* ADC10 Clock Source Select: 3 */
232
 
233
#define ADC10DIV_0             (0*0x20u)      /* ADC10 Clock Divider Select: 0 */
234
#define ADC10DIV_1             (1*0x20u)      /* ADC10 Clock Divider Select: 1 */
235
#define ADC10DIV_2             (2*0x20u)      /* ADC10 Clock Divider Select: 2 */
236
#define ADC10DIV_3             (3*0x20u)      /* ADC10 Clock Divider Select: 3 */
237
#define ADC10DIV_4             (4*0x20u)      /* ADC10 Clock Divider Select: 4 */
238
#define ADC10DIV_5             (5*0x20u)      /* ADC10 Clock Divider Select: 5 */
239
#define ADC10DIV_6             (6*0x20u)      /* ADC10 Clock Divider Select: 6 */
240
#define ADC10DIV_7             (7*0x20u)      /* ADC10 Clock Divider Select: 7 */
241
 
242
#define ADC10SHS_0             (0*0x400u)     /* ADC10 Sample/Hold Source: 0 */
243
#define ADC10SHS_1             (1*0x400u)     /* ADC10 Sample/Hold Source: 1 */
244
#define ADC10SHS_2             (2*0x400u)     /* ADC10 Sample/Hold Source: 2 */
245
#define ADC10SHS_3             (3*0x400u)     /* ADC10 Sample/Hold Source: 3 */
246
 
247
/* ADC10CTL2 Control Bits */
248
#define ADC10REFBURST          (0x0001)       /* ADC10 Reference Burst */
249
#define ADC10SR                (0x0004)       /* ADC10 Sampling Rate */
250
#define ADC10DF                (0x0008)       /* ADC10 Data Format */
251
#define ADC10RES               (0x0010)       /* ADC10 Resolution Bit */
252
#define ADC10PDIV0             (0x0100)       /* ADC10 predivider Bit: 0 */
253
#define ADC10PDIV1             (0x0200)       /* ADC10 predivider Bit: 1 */
254
 
255
/* ADC10CTL2 Control Bits */
256
#define ADC10REFBURST_L        (0x0001)       /* ADC10 Reference Burst */
257
#define ADC10SR_L              (0x0004)       /* ADC10 Sampling Rate */
258
#define ADC10DF_L              (0x0008)       /* ADC10 Data Format */
259
#define ADC10RES_L             (0x0010)       /* ADC10 Resolution Bit */
260
 
261
/* ADC10CTL2 Control Bits */
262
#define ADC10PDIV0_H           (0x0001)       /* ADC10 predivider Bit: 0 */
263
#define ADC10PDIV1_H           (0x0002)       /* ADC10 predivider Bit: 1 */
264
 
265
#define ADC10PDIV_0            (0x0000)       /* ADC10 predivider /1 */
266
#define ADC10PDIV_1            (0x0100)       /* ADC10 predivider /2 */
267
#define ADC10PDIV_2            (0x0200)       /* ADC10 predivider /64 */
268
#define ADC10PDIV_3            (0x0300)       /* ADC10 predivider reserved */
269
 
270
#define ADC10PDIV__1           (0x0000)       /* ADC10 predivider /1 */
271
#define ADC10PDIV__4           (0x0100)       /* ADC10 predivider /2 */
272
#define ADC10PDIV__64          (0x0200)       /* ADC10 predivider /64 */
273
 
274
/* ADC10MCTL0 Control Bits */
275
#define ADC10INCH0             (0x0001)       /* ADC10 Input Channel Select Bit 0 */
276
#define ADC10INCH1             (0x0002)       /* ADC10 Input Channel Select Bit 1 */
277
#define ADC10INCH2             (0x0004)       /* ADC10 Input Channel Select Bit 2 */
278
#define ADC10INCH3             (0x0008)       /* ADC10 Input Channel Select Bit 3 */
279
#define ADC10SREF0             (0x0010)       /* ADC10 Select Reference Bit 0 */
280
#define ADC10SREF1             (0x0020)       /* ADC10 Select Reference Bit 1 */
281
#define ADC10SREF2             (0x0040)       /* ADC10 Select Reference Bit 2 */
282
 
283
/* ADC10MCTL0 Control Bits */
284
#define ADC10INCH0_L           (0x0001)       /* ADC10 Input Channel Select Bit 0 */
285
#define ADC10INCH1_L           (0x0002)       /* ADC10 Input Channel Select Bit 1 */
286
#define ADC10INCH2_L           (0x0004)       /* ADC10 Input Channel Select Bit 2 */
287
#define ADC10INCH3_L           (0x0008)       /* ADC10 Input Channel Select Bit 3 */
288
#define ADC10SREF0_L           (0x0010)       /* ADC10 Select Reference Bit 0 */
289
#define ADC10SREF1_L           (0x0020)       /* ADC10 Select Reference Bit 1 */
290
#define ADC10SREF2_L           (0x0040)       /* ADC10 Select Reference Bit 2 */
291
 
292
/* ADC10MCTL0 Control Bits */
293
 
294
#define ADC10INCH_0            (0)            /* ADC10 Input Channel 0 */
295
#define ADC10INCH_1            (1)            /* ADC10 Input Channel 1 */
296
#define ADC10INCH_2            (2)            /* ADC10 Input Channel 2 */
297
#define ADC10INCH_3            (3)            /* ADC10 Input Channel 3 */
298
#define ADC10INCH_4            (4)            /* ADC10 Input Channel 4 */
299
#define ADC10INCH_5            (5)            /* ADC10 Input Channel 5 */
300
#define ADC10INCH_6            (6)            /* ADC10 Input Channel 6 */
301
#define ADC10INCH_7            (7)            /* ADC10 Input Channel 7 */
302
#define ADC10INCH_8            (8)            /* ADC10 Input Channel 8 */
303
#define ADC10INCH_9            (9)            /* ADC10 Input Channel 9 */
304
#define ADC10INCH_10           (10)           /* ADC10 Input Channel 10 */
305
#define ADC10INCH_11           (11)           /* ADC10 Input Channel 11 */
306
#define ADC10INCH_12           (12)           /* ADC10 Input Channel 12 */
307
#define ADC10INCH_13           (13)           /* ADC10 Input Channel 13 */
308
#define ADC10INCH_14           (14)           /* ADC10 Input Channel 14 */
309
#define ADC10INCH_15           (15)           /* ADC10 Input Channel 15 */
310
 
311
#define ADC10SREF_0            (0*0x10u)      /* ADC10 Select Reference 0 */
312
#define ADC10SREF_1            (1*0x10u)      /* ADC10 Select Reference 1 */
313
#define ADC10SREF_2            (2*0x10u)      /* ADC10 Select Reference 2 */
314
#define ADC10SREF_3            (3*0x10u)      /* ADC10 Select Reference 3 */
315
#define ADC10SREF_4            (4*0x10u)      /* ADC10 Select Reference 4 */
316
#define ADC10SREF_5            (5*0x10u)      /* ADC10 Select Reference 5 */
317
#define ADC10SREF_6            (6*0x10u)      /* ADC10 Select Reference 6 */
318
#define ADC10SREF_7            (7*0x10u)      /* ADC10 Select Reference 7 */
319
 
320
/* ADC10IE Interrupt Enable Bits */
321
#define ADC10IE0               (0x0001)       /* ADC10_A Interrupt enable */
322
#define ADC10INIE              (0x0002)       /* ADC10_A Interrupt enable for the inside of window of the Window comparator */
323
#define ADC10LOIE              (0x0004)       /* ADC10_A Interrupt enable for lower threshold of the Window comparator */
324
#define ADC10HIIE              (0x0008)       /* ADC10_A Interrupt enable for upper threshold of the Window comparator */
325
#define ADC10OVIE              (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt enable */
326
#define ADC10TOVIE             (0x0020)       /* ADC10_A conversion-time-overflow Interrupt enable */
327
 
328
/* ADC10IE Interrupt Enable Bits */
329
#define ADC10IE0_L             (0x0001)       /* ADC10_A Interrupt enable */
330
#define ADC10INIE_L            (0x0002)       /* ADC10_A Interrupt enable for the inside of window of the Window comparator */
331
#define ADC10LOIE_L            (0x0004)       /* ADC10_A Interrupt enable for lower threshold of the Window comparator */
332
#define ADC10HIIE_L            (0x0008)       /* ADC10_A Interrupt enable for upper threshold of the Window comparator */
333
#define ADC10OVIE_L            (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt enable */
334
#define ADC10TOVIE_L           (0x0020)       /* ADC10_A conversion-time-overflow Interrupt enable */
335
 
336
/* ADC10IE Interrupt Enable Bits */
337
 
338
/* ADC10IFG Interrupt Flag Bits */
339
#define ADC10IFG0              (0x0001)       /* ADC10_A Interrupt Flag */
340
#define ADC10INIFG             (0x0002)       /* ADC10_A Interrupt Flag for the inside of window of the Window comparator */
341
#define ADC10LOIFG             (0x0004)       /* ADC10_A Interrupt Flag for lower threshold of the Window comparator */
342
#define ADC10HIIFG             (0x0008)       /* ADC10_A Interrupt Flag for upper threshold of the Window comparator */
343
#define ADC10OVIFG             (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt Flag */
344
#define ADC10TOVIFG            (0x0020)       /* ADC10_A conversion-time-overflow Interrupt Flag */
345
 
346
/* ADC10IFG Interrupt Flag Bits */
347
#define ADC10IFG0_L            (0x0001)       /* ADC10_A Interrupt Flag */
348
#define ADC10INIFG_L           (0x0002)       /* ADC10_A Interrupt Flag for the inside of window of the Window comparator */
349
#define ADC10LOIFG_L           (0x0004)       /* ADC10_A Interrupt Flag for lower threshold of the Window comparator */
350
#define ADC10HIIFG_L           (0x0008)       /* ADC10_A Interrupt Flag for upper threshold of the Window comparator */
351
#define ADC10OVIFG_L           (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt Flag */
352
#define ADC10TOVIFG_L          (0x0020)       /* ADC10_A conversion-time-overflow Interrupt Flag */
353
 
354
/* ADC10IFG Interrupt Flag Bits */
355
 
356
/* ADC10IV Definitions */
357
#define ADC10IV_NONE           (0x0000)       /* No Interrupt pending */
358
#define ADC10IV_ADC10OVIFG     (0x0002)       /* ADC10OVIFG */
359
#define ADC10IV_ADC10TOVIFG    (0x0004)       /* ADC10TOVIFG */
360
#define ADC10IV_ADC10HIIFG     (0x0006)       /* ADC10HIIFG */
361
#define ADC10IV_ADC10LOIFG     (0x0008)       /* ADC10LOIFG */
362
#define ADC10IV_ADC10INIFG     (0x000A)       /* ADC10INIFG */
363
#define ADC10IV_ADC10IFG       (0x000C)       /* ADC10IFG */
364
 
365
/************************************************************
366
* Comparator B
367
************************************************************/
368
#define __MSP430_HAS_COMPB__                  /* Definition to show that Module is available */
369
#define __MSP430_BASEADDRESS_COMPB__ 0x08C0
370
 
371
SFR_16BIT(CBCTL0);                            /* Comparator B Control Register 0 */
372
SFR_8BIT(CBCTL0_L);                           /* Comparator B Control Register 0 */
373
SFR_8BIT(CBCTL0_H);                           /* Comparator B Control Register 0 */
374
SFR_16BIT(CBCTL1);                            /* Comparator B Control Register 1 */
375
SFR_8BIT(CBCTL1_L);                           /* Comparator B Control Register 1 */
376
SFR_8BIT(CBCTL1_H);                           /* Comparator B Control Register 1 */
377
SFR_16BIT(CBCTL2);                            /* Comparator B Control Register 2 */
378
SFR_8BIT(CBCTL2_L);                           /* Comparator B Control Register 2 */
379
SFR_8BIT(CBCTL2_H);                           /* Comparator B Control Register 2 */
380
SFR_16BIT(CBCTL3);                            /* Comparator B Control Register 3 */
381
SFR_8BIT(CBCTL3_L);                           /* Comparator B Control Register 3 */
382
SFR_8BIT(CBCTL3_H);                           /* Comparator B Control Register 3 */
383
SFR_16BIT(CBINT);                             /* Comparator B Interrupt Register */
384
SFR_8BIT(CBINT_L);                            /* Comparator B Interrupt Register */
385
SFR_8BIT(CBINT_H);                            /* Comparator B Interrupt Register */
386
SFR_16BIT(CBIV);                              /* Comparator B Interrupt Vector Word */
387
 
388
/* CBCTL0 Control Bits */
389
#define CBIPSEL0               (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
390
#define CBIPSEL1               (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
391
#define CBIPSEL2               (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
392
#define CBIPSEL3               (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
393
//#define RESERVED            (0x0010)  /* Comp. B */
394
//#define RESERVED            (0x0020)  /* Comp. B */
395
//#define RESERVED            (0x0040)  /* Comp. B */
396
#define CBIPEN                 (0x0080)       /* Comp. B Pos. Channel Input Enable */
397
#define CBIMSEL0               (0x0100)       /* Comp. B Neg. Channel Input Select 0 */
398
#define CBIMSEL1               (0x0200)       /* Comp. B Neg. Channel Input Select 1 */
399
#define CBIMSEL2               (0x0400)       /* Comp. B Neg. Channel Input Select 2 */
400
#define CBIMSEL3               (0x0800)       /* Comp. B Neg. Channel Input Select 3 */
401
//#define RESERVED            (0x1000)  /* Comp. B */
402
//#define RESERVED            (0x2000)  /* Comp. B */
403
//#define RESERVED            (0x4000)  /* Comp. B */
404
#define CBIMEN                 (0x8000)       /* Comp. B Neg. Channel Input Enable */
405
 
406
/* CBCTL0 Control Bits */
407
#define CBIPSEL0_L             (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
408
#define CBIPSEL1_L             (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
409
#define CBIPSEL2_L             (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
410
#define CBIPSEL3_L             (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
411
//#define RESERVED            (0x0010)  /* Comp. B */
412
//#define RESERVED            (0x0020)  /* Comp. B */
413
//#define RESERVED            (0x0040)  /* Comp. B */
414
#define CBIPEN_L               (0x0080)       /* Comp. B Pos. Channel Input Enable */
415
//#define RESERVED            (0x1000)  /* Comp. B */
416
//#define RESERVED            (0x2000)  /* Comp. B */
417
//#define RESERVED            (0x4000)  /* Comp. B */
418
 
419
/* CBCTL0 Control Bits */
420
//#define RESERVED            (0x0010)  /* Comp. B */
421
//#define RESERVED            (0x0020)  /* Comp. B */
422
//#define RESERVED            (0x0040)  /* Comp. B */
423
#define CBIMSEL0_H             (0x0001)       /* Comp. B Neg. Channel Input Select 0 */
424
#define CBIMSEL1_H             (0x0002)       /* Comp. B Neg. Channel Input Select 1 */
425
#define CBIMSEL2_H             (0x0004)       /* Comp. B Neg. Channel Input Select 2 */
426
#define CBIMSEL3_H             (0x0008)       /* Comp. B Neg. Channel Input Select 3 */
427
//#define RESERVED            (0x1000)  /* Comp. B */
428
//#define RESERVED            (0x2000)  /* Comp. B */
429
//#define RESERVED            (0x4000)  /* Comp. B */
430
#define CBIMEN_H               (0x0080)       /* Comp. B Neg. Channel Input Enable */
431
 
432
#define CBIPSEL_0              (0x0000)       /* Comp. B V+ terminal Input Select: Channel 0 */
433
#define CBIPSEL_1              (0x0001)       /* Comp. B V+ terminal Input Select: Channel 1 */
434
#define CBIPSEL_2              (0x0002)       /* Comp. B V+ terminal Input Select: Channel 2 */
435
#define CBIPSEL_3              (0x0003)       /* Comp. B V+ terminal Input Select: Channel 3 */
436
#define CBIPSEL_4              (0x0004)       /* Comp. B V+ terminal Input Select: Channel 4 */
437
#define CBIPSEL_5              (0x0005)       /* Comp. B V+ terminal Input Select: Channel 5 */
438
#define CBIPSEL_6              (0x0006)       /* Comp. B V+ terminal Input Select: Channel 6 */
439
#define CBIPSEL_7              (0x0007)       /* Comp. B V+ terminal Input Select: Channel 7 */
440
#define CBIPSEL_8              (0x0008)       /* Comp. B V+ terminal Input Select: Channel 8 */
441
#define CBIPSEL_9              (0x0009)       /* Comp. B V+ terminal Input Select: Channel 9 */
442
#define CBIPSEL_10             (0x000A)       /* Comp. B V+ terminal Input Select: Channel 10 */
443
#define CBIPSEL_11             (0x000B)       /* Comp. B V+ terminal Input Select: Channel 11 */
444
#define CBIPSEL_12             (0x000C)       /* Comp. B V+ terminal Input Select: Channel 12 */
445
#define CBIPSEL_13             (0x000D)       /* Comp. B V+ terminal Input Select: Channel 13 */
446
#define CBIPSEL_14             (0x000E)       /* Comp. B V+ terminal Input Select: Channel 14 */
447
#define CBIPSEL_15             (0x000F)       /* Comp. B V+ terminal Input Select: Channel 15 */
448
 
449
#define CBIMSEL_0              (0x0000)       /* Comp. B V- Terminal Input Select: Channel 0 */
450
#define CBIMSEL_1              (0x0100)       /* Comp. B V- Terminal Input Select: Channel 1 */
451
#define CBIMSEL_2              (0x0200)       /* Comp. B V- Terminal Input Select: Channel 2 */
452
#define CBIMSEL_3              (0x0300)       /* Comp. B V- Terminal Input Select: Channel 3 */
453
#define CBIMSEL_4              (0x0400)       /* Comp. B V- Terminal Input Select: Channel 4 */
454
#define CBIMSEL_5              (0x0500)       /* Comp. B V- Terminal Input Select: Channel 5 */
455
#define CBIMSEL_6              (0x0600)       /* Comp. B V- Terminal Input Select: Channel 6 */
456
#define CBIMSEL_7              (0x0700)       /* Comp. B V- Terminal Input Select: Channel 7 */
457
#define CBIMSEL_8              (0x0800)       /* Comp. B V- terminal Input Select: Channel 8 */
458
#define CBIMSEL_9              (0x0900)       /* Comp. B V- terminal Input Select: Channel 9 */
459
#define CBIMSEL_10             (0x0A00)       /* Comp. B V- terminal Input Select: Channel 10 */
460
#define CBIMSEL_11             (0x0B00)       /* Comp. B V- terminal Input Select: Channel 11 */
461
#define CBIMSEL_12             (0x0C00)       /* Comp. B V- terminal Input Select: Channel 12 */
462
#define CBIMSEL_13             (0x0D00)       /* Comp. B V- terminal Input Select: Channel 13 */
463
#define CBIMSEL_14             (0x0E00)       /* Comp. B V- terminal Input Select: Channel 14 */
464
#define CBIMSEL_15             (0x0F00)       /* Comp. B V- terminal Input Select: Channel 15 */
465
 
466
/* CBCTL1 Control Bits */
467
#define CBOUT                  (0x0001)       /* Comp. B Output */
468
#define CBOUTPOL               (0x0002)       /* Comp. B Output Polarity */
469
#define CBF                    (0x0004)       /* Comp. B Enable Output Filter */
470
#define CBIES                  (0x0008)       /* Comp. B Interrupt Edge Select */
471
#define CBSHORT                (0x0010)       /* Comp. B Input Short */
472
#define CBEX                   (0x0020)       /* Comp. B Exchange Inputs */
473
#define CBFDLY0                (0x0040)       /* Comp. B Filter delay Bit 0 */
474
#define CBFDLY1                (0x0080)       /* Comp. B Filter delay Bit 1 */
475
#define CBPWRMD0               (0x0100)       /* Comp. B Power Mode Bit 0 */
476
#define CBPWRMD1               (0x0200)       /* Comp. B Power Mode Bit 1 */
477
#define CBON                   (0x0400)       /* Comp. B enable */
478
#define CBMRVL                 (0x0800)       /* Comp. B CBMRV Level */
479
#define CBMRVS                 (0x1000)       /* Comp. B Output selects between VREF0 or VREF1*/
480
//#define RESERVED            (0x2000)  /* Comp. B */
481
//#define RESERVED            (0x4000)  /* Comp. B */
482
//#define RESERVED            (0x8000)  /* Comp. B */
483
 
484
/* CBCTL1 Control Bits */
485
#define CBOUT_L                (0x0001)       /* Comp. B Output */
486
#define CBOUTPOL_L             (0x0002)       /* Comp. B Output Polarity */
487
#define CBF_L                  (0x0004)       /* Comp. B Enable Output Filter */
488
#define CBIES_L                (0x0008)       /* Comp. B Interrupt Edge Select */
489
#define CBSHORT_L              (0x0010)       /* Comp. B Input Short */
490
#define CBEX_L                 (0x0020)       /* Comp. B Exchange Inputs */
491
#define CBFDLY0_L              (0x0040)       /* Comp. B Filter delay Bit 0 */
492
#define CBFDLY1_L              (0x0080)       /* Comp. B Filter delay Bit 1 */
493
//#define RESERVED            (0x2000)  /* Comp. B */
494
//#define RESERVED            (0x4000)  /* Comp. B */
495
//#define RESERVED            (0x8000)  /* Comp. B */
496
 
497
/* CBCTL1 Control Bits */
498
#define CBPWRMD0_H             (0x0001)       /* Comp. B Power Mode Bit 0 */
499
#define CBPWRMD1_H             (0x0002)       /* Comp. B Power Mode Bit 1 */
500
#define CBON_H                 (0x0004)       /* Comp. B enable */
501
#define CBMRVL_H               (0x0008)       /* Comp. B CBMRV Level */
502
#define CBMRVS_H               (0x0010)       /* Comp. B Output selects between VREF0 or VREF1*/
503
//#define RESERVED            (0x2000)  /* Comp. B */
504
//#define RESERVED            (0x4000)  /* Comp. B */
505
//#define RESERVED            (0x8000)  /* Comp. B */
506
 
507
#define CBFDLY_0               (0x0000)       /* Comp. B Filter delay 0 : 450ns */
508
#define CBFDLY_1               (0x0040)       /* Comp. B Filter delay 1 : 900ns */
509
#define CBFDLY_2               (0x0080)       /* Comp. B Filter delay 2 : 1800ns */
510
#define CBFDLY_3               (0x00C0)       /* Comp. B Filter delay 3 : 3600ns */
511
 
512
#define CBPWRMD_0              (0x0000)       /* Comp. B Power Mode 0 : High speed */
513
#define CBPWRMD_1              (0x0100)       /* Comp. B Power Mode 1 : Normal */
514
#define CBPWRMD_2              (0x0200)       /* Comp. B Power Mode 2 : Ultra-Low*/
515
#define CBPWRMD_3              (0x0300)       /* Comp. B Power Mode 3 : Reserved */
516
 
517
/* CBCTL2 Control Bits */
518
#define CBREF00                (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
519
#define CBREF01                (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
520
#define CBREF02                (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
521
#define CBREF03                (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
522
#define CBREF04                (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
523
#define CBRSEL                 (0x0020)       /* Comp. B Reference select */
524
#define CBRS0                  (0x0040)       /* Comp. B Reference Source Bit : 0 */
525
#define CBRS1                  (0x0080)       /* Comp. B Reference Source Bit : 1 */
526
#define CBREF10                (0x0100)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
527
#define CBREF11                (0x0200)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
528
#define CBREF12                (0x0400)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
529
#define CBREF13                (0x0800)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
530
#define CBREF14                (0x1000)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
531
#define CBREFL0                (0x2000)       /* Comp. B Reference voltage level Bit : 0 */
532
#define CBREFL1                (0x4000)       /* Comp. B Reference voltage level Bit : 1 */
533
#define CBREFACC               (0x8000)       /* Comp. B Reference Accuracy */
534
 
535
/* CBCTL2 Control Bits */
536
#define CBREF00_L              (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
537
#define CBREF01_L              (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
538
#define CBREF02_L              (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
539
#define CBREF03_L              (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
540
#define CBREF04_L              (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
541
#define CBRSEL_L               (0x0020)       /* Comp. B Reference select */
542
#define CBRS0_L                (0x0040)       /* Comp. B Reference Source Bit : 0 */
543
#define CBRS1_L                (0x0080)       /* Comp. B Reference Source Bit : 1 */
544
 
545
/* CBCTL2 Control Bits */
546
#define CBREF10_H              (0x0001)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
547
#define CBREF11_H              (0x0002)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
548
#define CBREF12_H              (0x0004)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
549
#define CBREF13_H              (0x0008)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
550
#define CBREF14_H              (0x0010)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
551
#define CBREFL0_H              (0x0020)       /* Comp. B Reference voltage level Bit : 0 */
552
#define CBREFL1_H              (0x0040)       /* Comp. B Reference voltage level Bit : 1 */
553
#define CBREFACC_H             (0x0080)       /* Comp. B Reference Accuracy */
554
 
555
#define CBREF0_0               (0x0000)       /* Comp. B Int. Ref.0 Select 0 : 1/32 */
556
#define CBREF0_1               (0x0001)       /* Comp. B Int. Ref.0 Select 1 : 2/32 */
557
#define CBREF0_2               (0x0002)       /* Comp. B Int. Ref.0 Select 2 : 3/32 */
558
#define CBREF0_3               (0x0003)       /* Comp. B Int. Ref.0 Select 3 : 4/32 */
559
#define CBREF0_4               (0x0004)       /* Comp. B Int. Ref.0 Select 4 : 5/32 */
560
#define CBREF0_5               (0x0005)       /* Comp. B Int. Ref.0 Select 5 : 6/32 */
561
#define CBREF0_6               (0x0006)       /* Comp. B Int. Ref.0 Select 6 : 7/32 */
562
#define CBREF0_7               (0x0007)       /* Comp. B Int. Ref.0 Select 7 : 8/32 */
563
#define CBREF0_8               (0x0008)       /* Comp. B Int. Ref.0 Select 0 : 9/32 */
564
#define CBREF0_9               (0x0009)       /* Comp. B Int. Ref.0 Select 1 : 10/32 */
565
#define CBREF0_10              (0x000A)       /* Comp. B Int. Ref.0 Select 2 : 11/32 */
566
#define CBREF0_11              (0x000B)       /* Comp. B Int. Ref.0 Select 3 : 12/32 */
567
#define CBREF0_12              (0x000C)       /* Comp. B Int. Ref.0 Select 4 : 13/32 */
568
#define CBREF0_13              (0x000D)       /* Comp. B Int. Ref.0 Select 5 : 14/32 */
569
#define CBREF0_14              (0x000E)       /* Comp. B Int. Ref.0 Select 6 : 15/32 */
570
#define CBREF0_15              (0x000F)       /* Comp. B Int. Ref.0 Select 7 : 16/32 */
571
#define CBREF0_16              (0x0010)       /* Comp. B Int. Ref.0 Select 0 : 17/32 */
572
#define CBREF0_17              (0x0011)       /* Comp. B Int. Ref.0 Select 1 : 18/32 */
573
#define CBREF0_18              (0x0012)       /* Comp. B Int. Ref.0 Select 2 : 19/32 */
574
#define CBREF0_19              (0x0013)       /* Comp. B Int. Ref.0 Select 3 : 20/32 */
575
#define CBREF0_20              (0x0014)       /* Comp. B Int. Ref.0 Select 4 : 21/32 */
576
#define CBREF0_21              (0x0015)       /* Comp. B Int. Ref.0 Select 5 : 22/32 */
577
#define CBREF0_22              (0x0016)       /* Comp. B Int. Ref.0 Select 6 : 23/32 */
578
#define CBREF0_23              (0x0017)       /* Comp. B Int. Ref.0 Select 7 : 24/32 */
579
#define CBREF0_24              (0x0018)       /* Comp. B Int. Ref.0 Select 0 : 25/32 */
580
#define CBREF0_25              (0x0019)       /* Comp. B Int. Ref.0 Select 1 : 26/32 */
581
#define CBREF0_26              (0x001A)       /* Comp. B Int. Ref.0 Select 2 : 27/32 */
582
#define CBREF0_27              (0x001B)       /* Comp. B Int. Ref.0 Select 3 : 28/32 */
583
#define CBREF0_28              (0x001C)       /* Comp. B Int. Ref.0 Select 4 : 29/32 */
584
#define CBREF0_29              (0x001D)       /* Comp. B Int. Ref.0 Select 5 : 30/32 */
585
#define CBREF0_30              (0x001E)       /* Comp. B Int. Ref.0 Select 6 : 31/32 */
586
#define CBREF0_31              (0x001F)       /* Comp. B Int. Ref.0 Select 7 : 32/32 */
587
 
588
#define CBRS_0                 (0x0000)       /* Comp. B Reference Source 0 : Off */
589
#define CBRS_1                 (0x0040)       /* Comp. B Reference Source 1 : Vcc */
590
#define CBRS_2                 (0x0080)       /* Comp. B Reference Source 2 : Shared Ref. */
591
#define CBRS_3                 (0x00C0)       /* Comp. B Reference Source 3 : Shared Ref. / Off */
592
 
593
#define CBREF1_0               (0x0000)       /* Comp. B Int. Ref.1 Select 0 : 1/32 */
594
#define CBREF1_1               (0x0100)       /* Comp. B Int. Ref.1 Select 1 : 2/32 */
595
#define CBREF1_2               (0x0200)       /* Comp. B Int. Ref.1 Select 2 : 3/32 */
596
#define CBREF1_3               (0x0300)       /* Comp. B Int. Ref.1 Select 3 : 4/32 */
597
#define CBREF1_4               (0x0400)       /* Comp. B Int. Ref.1 Select 4 : 5/32 */
598
#define CBREF1_5               (0x0500)       /* Comp. B Int. Ref.1 Select 5 : 6/32 */
599
#define CBREF1_6               (0x0600)       /* Comp. B Int. Ref.1 Select 6 : 7/32 */
600
#define CBREF1_7               (0x0700)       /* Comp. B Int. Ref.1 Select 7 : 8/32 */
601
#define CBREF1_8               (0x0800)       /* Comp. B Int. Ref.1 Select 0 : 9/32 */
602
#define CBREF1_9               (0x0900)       /* Comp. B Int. Ref.1 Select 1 : 10/32 */
603
#define CBREF1_10              (0x0A00)       /* Comp. B Int. Ref.1 Select 2 : 11/32 */
604
#define CBREF1_11              (0x0B00)       /* Comp. B Int. Ref.1 Select 3 : 12/32 */
605
#define CBREF1_12              (0x0C00)       /* Comp. B Int. Ref.1 Select 4 : 13/32 */
606
#define CBREF1_13              (0x0D00)       /* Comp. B Int. Ref.1 Select 5 : 14/32 */
607
#define CBREF1_14              (0x0E00)       /* Comp. B Int. Ref.1 Select 6 : 15/32 */
608
#define CBREF1_15              (0x0F00)       /* Comp. B Int. Ref.1 Select 7 : 16/32 */
609
#define CBREF1_16              (0x1000)       /* Comp. B Int. Ref.1 Select 0 : 17/32 */
610
#define CBREF1_17              (0x1100)       /* Comp. B Int. Ref.1 Select 1 : 18/32 */
611
#define CBREF1_18              (0x1200)       /* Comp. B Int. Ref.1 Select 2 : 19/32 */
612
#define CBREF1_19              (0x1300)       /* Comp. B Int. Ref.1 Select 3 : 20/32 */
613
#define CBREF1_20              (0x1400)       /* Comp. B Int. Ref.1 Select 4 : 21/32 */
614
#define CBREF1_21              (0x1500)       /* Comp. B Int. Ref.1 Select 5 : 22/32 */
615
#define CBREF1_22              (0x1600)       /* Comp. B Int. Ref.1 Select 6 : 23/32 */
616
#define CBREF1_23              (0x1700)       /* Comp. B Int. Ref.1 Select 7 : 24/32 */
617
#define CBREF1_24              (0x1800)       /* Comp. B Int. Ref.1 Select 0 : 25/32 */
618
#define CBREF1_25              (0x1900)       /* Comp. B Int. Ref.1 Select 1 : 26/32 */
619
#define CBREF1_26              (0x1A00)       /* Comp. B Int. Ref.1 Select 2 : 27/32 */
620
#define CBREF1_27              (0x1B00)       /* Comp. B Int. Ref.1 Select 3 : 28/32 */
621
#define CBREF1_28              (0x1C00)       /* Comp. B Int. Ref.1 Select 4 : 29/32 */
622
#define CBREF1_29              (0x1D00)       /* Comp. B Int. Ref.1 Select 5 : 30/32 */
623
#define CBREF1_30              (0x1E00)       /* Comp. B Int. Ref.1 Select 6 : 31/32 */
624
#define CBREF1_31              (0x1F00)       /* Comp. B Int. Ref.1 Select 7 : 32/32 */
625
 
626
#define CBREFL_0               (0x0000)       /* Comp. B Reference voltage level 0 : None */
627
#define CBREFL_1               (0x2000)       /* Comp. B Reference voltage level 1 : 1.5V */
628
#define CBREFL_2               (0x4000)       /* Comp. B Reference voltage level 2 : 2.0V  */
629
#define CBREFL_3               (0x6000)       /* Comp. B Reference voltage level 3 : 2.5V  */
630
 
631
#define CBPD0                  (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
632
#define CBPD1                  (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
633
#define CBPD2                  (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
634
#define CBPD3                  (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
635
#define CBPD4                  (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
636
#define CBPD5                  (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
637
#define CBPD6                  (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
638
#define CBPD7                  (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
639
#define CBPD8                  (0x0100)       /* Comp. B Disable Input Buffer of Port Register .8 */
640
#define CBPD9                  (0x0200)       /* Comp. B Disable Input Buffer of Port Register .9 */
641
#define CBPD10                 (0x0400)       /* Comp. B Disable Input Buffer of Port Register .10 */
642
#define CBPD11                 (0x0800)       /* Comp. B Disable Input Buffer of Port Register .11 */
643
#define CBPD12                 (0x1000)       /* Comp. B Disable Input Buffer of Port Register .12 */
644
#define CBPD13                 (0x2000)       /* Comp. B Disable Input Buffer of Port Register .13 */
645
#define CBPD14                 (0x4000)       /* Comp. B Disable Input Buffer of Port Register .14 */
646
#define CBPD15                 (0x8000)       /* Comp. B Disable Input Buffer of Port Register .15 */
647
 
648
#define CBPD0_L                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
649
#define CBPD1_L                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
650
#define CBPD2_L                (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
651
#define CBPD3_L                (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
652
#define CBPD4_L                (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
653
#define CBPD5_L                (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
654
#define CBPD6_L                (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
655
#define CBPD7_L                (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
656
 
657
#define CBPD8_H                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .8 */
658
#define CBPD9_H                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .9 */
659
#define CBPD10_H               (0x0004)       /* Comp. B Disable Input Buffer of Port Register .10 */
660
#define CBPD11_H               (0x0008)       /* Comp. B Disable Input Buffer of Port Register .11 */
661
#define CBPD12_H               (0x0010)       /* Comp. B Disable Input Buffer of Port Register .12 */
662
#define CBPD13_H               (0x0020)       /* Comp. B Disable Input Buffer of Port Register .13 */
663
#define CBPD14_H               (0x0040)       /* Comp. B Disable Input Buffer of Port Register .14 */
664
#define CBPD15_H               (0x0080)       /* Comp. B Disable Input Buffer of Port Register .15 */
665
 
666
/* CBINT Control Bits */
667
#define CBIFG                  (0x0001)       /* Comp. B Interrupt Flag */
668
#define CBIIFG                 (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
669
//#define RESERVED             (0x0004)  /* Comp. B */
670
//#define RESERVED             (0x0008)  /* Comp. B */
671
//#define RESERVED             (0x0010)  /* Comp. B */
672
//#define RESERVED             (0x0020)  /* Comp. B */
673
//#define RESERVED             (0x0040)  /* Comp. B */
674
//#define RESERVED             (0x0080)  /* Comp. B */
675
#define CBIE                   (0x0100)       /* Comp. B Interrupt Enable */
676
#define CBIIE                  (0x0200)       /* Comp. B Interrupt Enable Inverted Polarity */
677
//#define RESERVED             (0x0400)  /* Comp. B */
678
//#define RESERVED             (0x0800)  /* Comp. B */
679
//#define RESERVED             (0x1000)  /* Comp. B */
680
//#define RESERVED             (0x2000)  /* Comp. B */
681
//#define RESERVED             (0x4000)  /* Comp. B */
682
//#define RESERVED             (0x8000)  /* Comp. B */
683
 
684
/* CBINT Control Bits */
685
#define CBIFG_L                (0x0001)       /* Comp. B Interrupt Flag */
686
#define CBIIFG_L               (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
687
//#define RESERVED             (0x0004)  /* Comp. B */
688
//#define RESERVED             (0x0008)  /* Comp. B */
689
//#define RESERVED             (0x0010)  /* Comp. B */
690
//#define RESERVED             (0x0020)  /* Comp. B */
691
//#define RESERVED             (0x0040)  /* Comp. B */
692
//#define RESERVED             (0x0080)  /* Comp. B */
693
//#define RESERVED             (0x0400)  /* Comp. B */
694
//#define RESERVED             (0x0800)  /* Comp. B */
695
//#define RESERVED             (0x1000)  /* Comp. B */
696
//#define RESERVED             (0x2000)  /* Comp. B */
697
//#define RESERVED             (0x4000)  /* Comp. B */
698
//#define RESERVED             (0x8000)  /* Comp. B */
699
 
700
/* CBINT Control Bits */
701
//#define RESERVED             (0x0004)  /* Comp. B */
702
//#define RESERVED             (0x0008)  /* Comp. B */
703
//#define RESERVED             (0x0010)  /* Comp. B */
704
//#define RESERVED             (0x0020)  /* Comp. B */
705
//#define RESERVED             (0x0040)  /* Comp. B */
706
//#define RESERVED             (0x0080)  /* Comp. B */
707
#define CBIE_H                 (0x0001)       /* Comp. B Interrupt Enable */
708
#define CBIIE_H                (0x0002)       /* Comp. B Interrupt Enable Inverted Polarity */
709
//#define RESERVED             (0x0400)  /* Comp. B */
710
//#define RESERVED             (0x0800)  /* Comp. B */
711
//#define RESERVED             (0x1000)  /* Comp. B */
712
//#define RESERVED             (0x2000)  /* Comp. B */
713
//#define RESERVED             (0x4000)  /* Comp. B */
714
//#define RESERVED             (0x8000)  /* Comp. B */
715
 
716
/* CBIV Definitions */
717
#define CBIV_NONE              (0x0000)       /* No Interrupt pending */
718
#define CBIV_CBIFG             (0x0002)       /* CBIFG */
719
#define CBIV_CBIIFG            (0x0004)       /* CBIIFG */
720
 
721
/*************************************************************
722
* CRC Module
723
*************************************************************/
724
#define __MSP430_HAS_CRC__                    /* Definition to show that Module is available */
725
#define __MSP430_BASEADDRESS_CRC__ 0x0150
726
 
727
SFR_16BIT(CRCDI);                             /* CRC Data In Register */
728
SFR_8BIT(CRCDI_L);                            /* CRC Data In Register */
729
SFR_8BIT(CRCDI_H);                            /* CRC Data In Register */
730
SFR_16BIT(CRCDIRB);                           /* CRC data in reverse byte Register */
731
SFR_8BIT(CRCDIRB_L);                          /* CRC data in reverse byte Register */
732
SFR_8BIT(CRCDIRB_H);                          /* CRC data in reverse byte Register */
733
SFR_16BIT(CRCINIRES);                         /* CRC Initialisation Register and Result Register */
734
SFR_8BIT(CRCINIRES_L);                        /* CRC Initialisation Register and Result Register */
735
SFR_8BIT(CRCINIRES_H);                        /* CRC Initialisation Register and Result Register */
736
SFR_16BIT(CRCRESR);                           /* CRC reverse result Register */
737
SFR_8BIT(CRCRESR_L);                          /* CRC reverse result Register */
738
SFR_8BIT(CRCRESR_H);                          /* CRC reverse result Register */
739
 
740
/************************************************************
741
* DMA_X
742
************************************************************/
743
#define __MSP430_HAS_DMAX_3__                 /* Definition to show that Module is available */
744
#define __MSP430_BASEADDRESS_DMAX_3__ 0x0500
745
 
746
SFR_16BIT(DMACTL0);                           /* DMA Module Control 0 */
747
SFR_8BIT(DMACTL0_L);                          /* DMA Module Control 0 */
748
SFR_8BIT(DMACTL0_H);                          /* DMA Module Control 0 */
749
SFR_16BIT(DMACTL1);                           /* DMA Module Control 1 */
750
SFR_8BIT(DMACTL1_L);                          /* DMA Module Control 1 */
751
SFR_8BIT(DMACTL1_H);                          /* DMA Module Control 1 */
752
SFR_16BIT(DMACTL2);                           /* DMA Module Control 2 */
753
SFR_8BIT(DMACTL2_L);                          /* DMA Module Control 2 */
754
SFR_8BIT(DMACTL2_H);                          /* DMA Module Control 2 */
755
SFR_16BIT(DMACTL3);                           /* DMA Module Control 3 */
756
SFR_8BIT(DMACTL3_L);                          /* DMA Module Control 3 */
757
SFR_8BIT(DMACTL3_H);                          /* DMA Module Control 3 */
758
SFR_16BIT(DMACTL4);                           /* DMA Module Control 4 */
759
SFR_8BIT(DMACTL4_L);                          /* DMA Module Control 4 */
760
SFR_8BIT(DMACTL4_H);                          /* DMA Module Control 4 */
761
SFR_16BIT(DMAIV);                             /* DMA Interrupt Vector Word */
762
SFR_8BIT(DMAIV_L);                            /* DMA Interrupt Vector Word */
763
SFR_8BIT(DMAIV_H);                            /* DMA Interrupt Vector Word */
764
 
765
SFR_16BIT(DMA0CTL);                           /* DMA Channel 0 Control */
766
SFR_8BIT(DMA0CTL_L);                          /* DMA Channel 0 Control */
767
SFR_8BIT(DMA0CTL_H);                          /* DMA Channel 0 Control */
768
SFR_20BIT(DMA0SA);                            /* DMA Channel 0 Source Address */
769
SFR_16BIT(DMA0SAL);                           /* DMA Channel 0 Source Address */
770
SFR_20BIT(DMA0DA);                            /* DMA Channel 0 Destination Address */
771
SFR_16BIT(DMA0DAL);                           /* DMA Channel 0 Destination Address */
772
SFR_16BIT(DMA0SZ);                            /* DMA Channel 0 Transfer Size */
773
 
774
SFR_16BIT(DMA1CTL);                           /* DMA Channel 1 Control */
775
SFR_8BIT(DMA1CTL_L);                          /* DMA Channel 1 Control */
776
SFR_8BIT(DMA1CTL_H);                          /* DMA Channel 1 Control */
777
SFR_20BIT(DMA1SA);                            /* DMA Channel 1 Source Address */
778
SFR_16BIT(DMA1SAL);                           /* DMA Channel 1 Source Address */
779
SFR_20BIT(DMA1DA);                            /* DMA Channel 1 Destination Address */
780
SFR_16BIT(DMA1DAL);                           /* DMA Channel 1 Destination Address */
781
SFR_16BIT(DMA1SZ);                            /* DMA Channel 1 Transfer Size */
782
 
783
SFR_16BIT(DMA2CTL);                           /* DMA Channel 2 Control */
784
SFR_8BIT(DMA2CTL_L);                          /* DMA Channel 2 Control */
785
SFR_8BIT(DMA2CTL_H);                          /* DMA Channel 2 Control */
786
SFR_20BIT(DMA2SA);                            /* DMA Channel 2 Source Address */
787
SFR_16BIT(DMA2SAL);                           /* DMA Channel 2 Source Address */
788
SFR_20BIT(DMA2DA);                            /* DMA Channel 2 Destination Address */
789
SFR_16BIT(DMA2DAL);                           /* DMA Channel 2 Destination Address */
790
SFR_16BIT(DMA2SZ);                            /* DMA Channel 2 Transfer Size */
791
 
792
/* DMACTL0 Control Bits */
793
#define DMA0TSEL0              (0x0001)       /* DMA channel 0 transfer select bit 0 */
794
#define DMA0TSEL1              (0x0002)       /* DMA channel 0 transfer select bit 1 */
795
#define DMA0TSEL2              (0x0004)       /* DMA channel 0 transfer select bit 2 */
796
#define DMA0TSEL3              (0x0008)       /* DMA channel 0 transfer select bit 3 */
797
#define DMA0TSEL4              (0x0010)       /* DMA channel 0 transfer select bit 4 */
798
#define DMA1TSEL0              (0x0100)       /* DMA channel 1 transfer select bit 0 */
799
#define DMA1TSEL1              (0x0200)       /* DMA channel 1 transfer select bit 1 */
800
#define DMA1TSEL2              (0x0400)       /* DMA channel 1 transfer select bit 2 */
801
#define DMA1TSEL3              (0x0800)       /* DMA channel 1 transfer select bit 3 */
802
#define DMA1TSEL4              (0x1000)       /* DMA channel 1 transfer select bit 4 */
803
 
804
/* DMACTL0 Control Bits */
805
#define DMA0TSEL0_L            (0x0001)       /* DMA channel 0 transfer select bit 0 */
806
#define DMA0TSEL1_L            (0x0002)       /* DMA channel 0 transfer select bit 1 */
807
#define DMA0TSEL2_L            (0x0004)       /* DMA channel 0 transfer select bit 2 */
808
#define DMA0TSEL3_L            (0x0008)       /* DMA channel 0 transfer select bit 3 */
809
#define DMA0TSEL4_L            (0x0010)       /* DMA channel 0 transfer select bit 4 */
810
 
811
/* DMACTL0 Control Bits */
812
#define DMA1TSEL0_H            (0x0001)       /* DMA channel 1 transfer select bit 0 */
813
#define DMA1TSEL1_H            (0x0002)       /* DMA channel 1 transfer select bit 1 */
814
#define DMA1TSEL2_H            (0x0004)       /* DMA channel 1 transfer select bit 2 */
815
#define DMA1TSEL3_H            (0x0008)       /* DMA channel 1 transfer select bit 3 */
816
#define DMA1TSEL4_H            (0x0010)       /* DMA channel 1 transfer select bit 4 */
817
 
818
/* DMACTL01 Control Bits */
819
#define DMA2TSEL0              (0x0001)       /* DMA channel 2 transfer select bit 0 */
820
#define DMA2TSEL1              (0x0002)       /* DMA channel 2 transfer select bit 1 */
821
#define DMA2TSEL2              (0x0004)       /* DMA channel 2 transfer select bit 2 */
822
#define DMA2TSEL3              (0x0008)       /* DMA channel 2 transfer select bit 3 */
823
#define DMA2TSEL4              (0x0010)       /* DMA channel 2 transfer select bit 4 */
824
 
825
/* DMACTL01 Control Bits */
826
#define DMA2TSEL0_L            (0x0001)       /* DMA channel 2 transfer select bit 0 */
827
#define DMA2TSEL1_L            (0x0002)       /* DMA channel 2 transfer select bit 1 */
828
#define DMA2TSEL2_L            (0x0004)       /* DMA channel 2 transfer select bit 2 */
829
#define DMA2TSEL3_L            (0x0008)       /* DMA channel 2 transfer select bit 3 */
830
#define DMA2TSEL4_L            (0x0010)       /* DMA channel 2 transfer select bit 4 */
831
 
832
/* DMACTL01 Control Bits */
833
 
834
/* DMACTL4 Control Bits */
835
#define ENNMI                  (0x0001)       /* Enable NMI interruption of DMA */
836
#define ROUNDROBIN             (0x0002)       /* Round-Robin DMA channel priorities */
837
#define DMARMWDIS              (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
838
 
839
/* DMACTL4 Control Bits */
840
#define ENNMI_L                (0x0001)       /* Enable NMI interruption of DMA */
841
#define ROUNDROBIN_L           (0x0002)       /* Round-Robin DMA channel priorities */
842
#define DMARMWDIS_L            (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
843
 
844
/* DMACTL4 Control Bits */
845
 
846
/* DMAxCTL Control Bits */
847
#define DMAREQ                 (0x0001)       /* Initiate DMA transfer with DMATSEL */
848
#define DMAABORT               (0x0002)       /* DMA transfer aborted by NMI */
849
#define DMAIE                  (0x0004)       /* DMA interrupt enable */
850
#define DMAIFG                 (0x0008)       /* DMA interrupt flag */
851
#define DMAEN                  (0x0010)       /* DMA enable */
852
#define DMALEVEL               (0x0020)       /* DMA level sensitive trigger select */
853
#define DMASRCBYTE             (0x0040)       /* DMA source byte */
854
#define DMADSTBYTE             (0x0080)       /* DMA destination byte */
855
#define DMASRCINCR0            (0x0100)       /* DMA source increment bit 0 */
856
#define DMASRCINCR1            (0x0200)       /* DMA source increment bit 1 */
857
#define DMADSTINCR0            (0x0400)       /* DMA destination increment bit 0 */
858
#define DMADSTINCR1            (0x0800)       /* DMA destination increment bit 1 */
859
#define DMADT0                 (0x1000)       /* DMA transfer mode bit 0 */
860
#define DMADT1                 (0x2000)       /* DMA transfer mode bit 1 */
861
#define DMADT2                 (0x4000)       /* DMA transfer mode bit 2 */
862
 
863
/* DMAxCTL Control Bits */
864
#define DMAREQ_L               (0x0001)       /* Initiate DMA transfer with DMATSEL */
865
#define DMAABORT_L             (0x0002)       /* DMA transfer aborted by NMI */
866
#define DMAIE_L                (0x0004)       /* DMA interrupt enable */
867
#define DMAIFG_L               (0x0008)       /* DMA interrupt flag */
868
#define DMAEN_L                (0x0010)       /* DMA enable */
869
#define DMALEVEL_L             (0x0020)       /* DMA level sensitive trigger select */
870
#define DMASRCBYTE_L           (0x0040)       /* DMA source byte */
871
#define DMADSTBYTE_L           (0x0080)       /* DMA destination byte */
872
 
873
/* DMAxCTL Control Bits */
874
#define DMASRCINCR0_H          (0x0001)       /* DMA source increment bit 0 */
875
#define DMASRCINCR1_H          (0x0002)       /* DMA source increment bit 1 */
876
#define DMADSTINCR0_H          (0x0004)       /* DMA destination increment bit 0 */
877
#define DMADSTINCR1_H          (0x0008)       /* DMA destination increment bit 1 */
878
#define DMADT0_H               (0x0010)       /* DMA transfer mode bit 0 */
879
#define DMADT1_H               (0x0020)       /* DMA transfer mode bit 1 */
880
#define DMADT2_H               (0x0040)       /* DMA transfer mode bit 2 */
881
 
882
#define DMASWDW                (0*0x0040u)    /* DMA transfer: source word to destination word */
883
#define DMASBDW                (1*0x0040u)    /* DMA transfer: source byte to destination word */
884
#define DMASWDB                (2*0x0040u)    /* DMA transfer: source word to destination byte */
885
#define DMASBDB                (3*0x0040u)    /* DMA transfer: source byte to destination byte */
886
 
887
#define DMASRCINCR_0           (0*0x0100u)    /* DMA source increment 0: source address unchanged */
888
#define DMASRCINCR_1           (1*0x0100u)    /* DMA source increment 1: source address unchanged */
889
#define DMASRCINCR_2           (2*0x0100u)    /* DMA source increment 2: source address decremented */
890
#define DMASRCINCR_3           (3*0x0100u)    /* DMA source increment 3: source address incremented */
891
 
892
#define DMADSTINCR_0           (0*0x0400u)    /* DMA destination increment 0: destination address unchanged */
893
#define DMADSTINCR_1           (1*0x0400u)    /* DMA destination increment 1: destination address unchanged */
894
#define DMADSTINCR_2           (2*0x0400u)    /* DMA destination increment 2: destination address decremented */
895
#define DMADSTINCR_3           (3*0x0400u)    /* DMA destination increment 3: destination address incremented */
896
 
897
#define DMADT_0                (0*0x1000u)    /* DMA transfer mode 0: Single transfer */
898
#define DMADT_1                (1*0x1000u)    /* DMA transfer mode 1: Block transfer */
899
#define DMADT_2                (2*0x1000u)    /* DMA transfer mode 2: Burst-Block transfer */
900
#define DMADT_3                (3*0x1000u)    /* DMA transfer mode 3: Burst-Block transfer */
901
#define DMADT_4                (4*0x1000u)    /* DMA transfer mode 4: Repeated Single transfer */
902
#define DMADT_5                (5*0x1000u)    /* DMA transfer mode 5: Repeated Block transfer */
903
#define DMADT_6                (6*0x1000u)    /* DMA transfer mode 6: Repeated Burst-Block transfer */
904
#define DMADT_7                (7*0x1000u)    /* DMA transfer mode 7: Repeated Burst-Block transfer */
905
 
906
/* DMAIV Definitions */
907
#define DMAIV_NONE             (0x0000)       /* No Interrupt pending */
908
#define DMAIV_DMA0IFG          (0x0002)       /* DMA0IFG*/
909
#define DMAIV_DMA1IFG          (0x0004)       /* DMA1IFG*/
910
#define DMAIV_DMA2IFG          (0x0006)       /* DMA2IFG*/
911
 
912
#define DMA0TSEL_0             (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
913
#define DMA0TSEL_1             (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
914
#define DMA0TSEL_2             (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
915
#define DMA0TSEL_3             (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
916
#define DMA0TSEL_4             (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
917
#define DMA0TSEL_5             (5*0x0001u)    /* DMA channel 0 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
918
#define DMA0TSEL_6             (6*0x0001u)    /* DMA channel 0 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
919
#define DMA0TSEL_7             (7*0x0001u)    /* DMA channel 0 transfer select 7:  TimerB (TB0CCR0.IFG) */
920
#define DMA0TSEL_8             (8*0x0001u)    /* DMA channel 0 transfer select 8:  TimerB (TB0CCR2.IFG) */
921
#define DMA0TSEL_9             (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
922
#define DMA0TSEL_10            (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
923
#define DMA0TSEL_11            (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
924
#define DMA0TSEL_12            (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
925
#define DMA0TSEL_13            (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
926
#define DMA0TSEL_14            (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
927
#define DMA0TSEL_15            (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
928
#define DMA0TSEL_16            (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
929
#define DMA0TSEL_17            (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
930
#define DMA0TSEL_18            (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
931
#define DMA0TSEL_19            (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
932
#define DMA0TSEL_20            (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
933
#define DMA0TSEL_21            (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
934
#define DMA0TSEL_22            (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
935
#define DMA0TSEL_23            (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
936
#define DMA0TSEL_24            (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC12IFGx */
937
#define DMA0TSEL_25            (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
938
#define DMA0TSEL_26            (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
939
#define DMA0TSEL_27            (27*0x0001u)   /* DMA channel 0 transfer select 27: USB FNRXD */
940
#define DMA0TSEL_28            (28*0x0001u)   /* DMA channel 0 transfer select 28: USB ready */
941
#define DMA0TSEL_29            (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
942
#define DMA0TSEL_30            (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
943
#define DMA0TSEL_31            (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
944
 
945
#define DMA1TSEL_0             (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
946
#define DMA1TSEL_1             (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
947
#define DMA1TSEL_2             (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
948
#define DMA1TSEL_3             (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
949
#define DMA1TSEL_4             (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
950
#define DMA1TSEL_5             (5*0x0100u)    /* DMA channel 1 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
951
#define DMA1TSEL_6             (6*0x0100u)    /* DMA channel 1 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
952
#define DMA1TSEL_7             (7*0x0100u)    /* DMA channel 1 transfer select 7:  TimerB (TB0CCR0.IFG) */
953
#define DMA1TSEL_8             (8*0x0100u)    /* DMA channel 1 transfer select 8:  TimerB (TB0CCR2.IFG) */
954
#define DMA1TSEL_9             (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
955
#define DMA1TSEL_10            (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
956
#define DMA1TSEL_11            (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
957
#define DMA1TSEL_12            (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
958
#define DMA1TSEL_13            (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
959
#define DMA1TSEL_14            (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
960
#define DMA1TSEL_15            (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
961
#define DMA1TSEL_16            (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
962
#define DMA1TSEL_17            (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
963
#define DMA1TSEL_18            (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
964
#define DMA1TSEL_19            (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
965
#define DMA1TSEL_20            (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
966
#define DMA1TSEL_21            (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
967
#define DMA1TSEL_22            (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
968
#define DMA1TSEL_23            (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
969
#define DMA1TSEL_24            (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC12IFGx */
970
#define DMA1TSEL_25            (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
971
#define DMA1TSEL_26            (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
972
#define DMA1TSEL_27            (27*0x0100u)   /* DMA channel 1 transfer select 27: USB FNRXD */
973
#define DMA1TSEL_28            (28*0x0100u)   /* DMA channel 1 transfer select 28: USB ready */
974
#define DMA1TSEL_29            (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
975
#define DMA1TSEL_30            (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
976
#define DMA1TSEL_31            (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
977
 
978
#define DMA2TSEL_0             (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
979
#define DMA2TSEL_1             (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
980
#define DMA2TSEL_2             (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
981
#define DMA2TSEL_3             (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
982
#define DMA2TSEL_4             (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
983
#define DMA2TSEL_5             (5*0x0001u)    /* DMA channel 2 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
984
#define DMA2TSEL_6             (6*0x0001u)    /* DMA channel 2 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
985
#define DMA2TSEL_7             (7*0x0001u)    /* DMA channel 2 transfer select 7:  TimerB (TB0CCR0.IFG) */
986
#define DMA2TSEL_8             (8*0x0001u)    /* DMA channel 2 transfer select 8:  TimerB (TB0CCR2.IFG) */
987
#define DMA2TSEL_9             (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
988
#define DMA2TSEL_10            (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
989
#define DMA2TSEL_11            (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
990
#define DMA2TSEL_12            (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
991
#define DMA2TSEL_13            (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
992
#define DMA2TSEL_14            (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
993
#define DMA2TSEL_15            (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
994
#define DMA2TSEL_16            (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
995
#define DMA2TSEL_17            (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
996
#define DMA2TSEL_18            (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
997
#define DMA2TSEL_19            (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
998
#define DMA2TSEL_20            (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
999
#define DMA2TSEL_21            (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
1000
#define DMA2TSEL_22            (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
1001
#define DMA2TSEL_23            (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
1002
#define DMA2TSEL_24            (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC12IFGx */
1003
#define DMA2TSEL_25            (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
1004
#define DMA2TSEL_26            (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
1005
#define DMA2TSEL_27            (27*0x0001u)   /* DMA channel 2 transfer select 27: USB FNRXD */
1006
#define DMA2TSEL_28            (28*0x0001u)   /* DMA channel 2 transfer select 28: USB ready */
1007
#define DMA2TSEL_29            (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
1008
#define DMA2TSEL_30            (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
1009
#define DMA2TSEL_31            (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
1010
 
1011
#define DMA0TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
1012
#define DMA0TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1013
#define DMA0TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1014
#define DMA0TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1015
#define DMA0TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1016
#define DMA0TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 0 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1017
#define DMA0TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 0 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1018
#define DMA0TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 0 transfer select 7:  TimerB (TB0CCR0.IFG) */
1019
#define DMA0TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 0 transfer select 8:  TimerB (TB0CCR2.IFG) */
1020
#define DMA0TSEL__RES9         (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
1021
#define DMA0TSEL__RES10        (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
1022
#define DMA0TSEL__RES11        (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
1023
#define DMA0TSEL__RES12        (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
1024
#define DMA0TSEL__RES13        (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
1025
#define DMA0TSEL__RES14        (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
1026
#define DMA0TSEL__RES15        (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
1027
#define DMA0TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
1028
#define DMA0TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
1029
#define DMA0TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
1030
#define DMA0TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
1031
#define DMA0TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
1032
#define DMA0TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
1033
#define DMA0TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
1034
#define DMA0TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
1035
#define DMA0TSEL__ADC10IFG     (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC10IFGx */
1036
#define DMA0TSEL__RES25        (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
1037
#define DMA0TSEL__RES26        (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
1038
#define DMA0TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 0 transfer select 27: USB FNRXD */
1039
#define DMA0TSEL__USB_READY    (28*0x0001u)   /* DMA channel 0 transfer select 28: USB ready */
1040
#define DMA0TSEL__MPY          (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
1041
#define DMA0TSEL__DMA2IFG      (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
1042
#define DMA0TSEL__DMAE0        (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
1043
 
1044
#define DMA1TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
1045
#define DMA1TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1046
#define DMA1TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1047
#define DMA1TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1048
#define DMA1TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1049
#define DMA1TSEL__TA2CCR0      (5*0x0100u)    /* DMA channel 1 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1050
#define DMA1TSEL__TA2CCR2      (6*0x0100u)    /* DMA channel 1 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1051
#define DMA1TSEL__TB0CCR0      (7*0x0100u)    /* DMA channel 1 transfer select 7:  TimerB (TB0CCR0.IFG) */
1052
#define DMA1TSEL__TB0CCR2      (8*0x0100u)    /* DMA channel 1 transfer select 8:  TimerB (TB0CCR2.IFG) */
1053
#define DMA1TSEL__RES9         (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
1054
#define DMA1TSEL__RES10        (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
1055
#define DMA1TSEL__RES11        (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
1056
#define DMA1TSEL__RES12        (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
1057
#define DMA1TSEL__RES13        (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
1058
#define DMA1TSEL__RES14        (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
1059
#define DMA1TSEL__RES15        (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
1060
#define DMA1TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
1061
#define DMA1TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
1062
#define DMA1TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
1063
#define DMA1TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
1064
#define DMA1TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
1065
#define DMA1TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
1066
#define DMA1TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
1067
#define DMA1TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
1068
#define DMA1TSEL__ADC10IFG     (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC10IFGx */
1069
#define DMA1TSEL__RES25        (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
1070
#define DMA1TSEL__RES26        (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
1071
#define DMA1TSEL__USB_FNRXD    (27*0x0100u)   /* DMA channel 1 transfer select 27: USB FNRXD */
1072
#define DMA1TSEL__USB_READY    (28*0x0100u)   /* DMA channel 1 transfer select 28: USB ready */
1073
#define DMA1TSEL__MPY          (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
1074
#define DMA1TSEL__DMA0IFG      (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
1075
#define DMA1TSEL__DMAE0        (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
1076
 
1077
#define DMA2TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
1078
#define DMA2TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1079
#define DMA2TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1080
#define DMA2TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1081
#define DMA2TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1082
#define DMA2TSEL__TA2CCR0      (5*0x0001u)    /* DMA channel 2 transfer select 5:  Timer2_A (TA2CCR0.IFG) */
1083
#define DMA2TSEL__TA2CCR2      (6*0x0001u)    /* DMA channel 2 transfer select 6:  Timer2_A (TA2CCR2.IFG) */
1084
#define DMA2TSEL__TB0CCR0      (7*0x0001u)    /* DMA channel 2 transfer select 7:  TimerB (TB0CCR0.IFG) */
1085
#define DMA2TSEL__TB0CCR2      (8*0x0001u)    /* DMA channel 2 transfer select 8:  TimerB (TB0CCR2.IFG) */
1086
#define DMA2TSEL__RES9         (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
1087
#define DMA2TSEL__RES10        (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
1088
#define DMA2TSEL__RES11        (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
1089
#define DMA2TSEL__RES12        (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
1090
#define DMA2TSEL__RES13        (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
1091
#define DMA2TSEL__RES14        (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
1092
#define DMA2TSEL__RES15        (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
1093
#define DMA2TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
1094
#define DMA2TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
1095
#define DMA2TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
1096
#define DMA2TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
1097
#define DMA2TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
1098
#define DMA2TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
1099
#define DMA2TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
1100
#define DMA2TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
1101
#define DMA2TSEL__ADC10IFG     (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC10IFGx */
1102
#define DMA2TSEL__RES25        (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
1103
#define DMA2TSEL__RES26        (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
1104
#define DMA2TSEL__USB_FNRXD    (27*0x0001u)   /* DMA channel 2 transfer select 27: USB FNRXD */
1105
#define DMA2TSEL__USB_READY    (28*0x0001u)   /* DMA channel 2 transfer select 28: USB ready */
1106
#define DMA2TSEL__MPY          (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
1107
#define DMA2TSEL__DMA1IFG      (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
1108
#define DMA2TSEL__DMAE0        (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
1109
 
1110
/*************************************************************
1111
* Flash Memory
1112
*************************************************************/
1113
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
1114
#define __MSP430_BASEADDRESS_FLASH__ 0x0140
1115
 
1116
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
1117
SFR_8BIT(FCTL1_L);                            /* FLASH Control 1 */
1118
SFR_8BIT(FCTL1_H);                            /* FLASH Control 1 */
1119
//sfrbw    FCTL2               (0x0142)  /* FLASH Control 2 */
1120
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
1121
SFR_8BIT(FCTL3_L);                            /* FLASH Control 3 */
1122
SFR_8BIT(FCTL3_H);                            /* FLASH Control 3 */
1123
SFR_16BIT(FCTL4);                             /* FLASH Control 4 */
1124
SFR_8BIT(FCTL4_L);                            /* FLASH Control 4 */
1125
SFR_8BIT(FCTL4_H);                            /* FLASH Control 4 */
1126
 
1127
#define FRPW                   (0x9600)       /* Flash password returned by read */
1128
#define FWPW                   (0xA500)       /* Flash password for write */
1129
#define FXPW                   (0x3300)       /* for use with XOR instruction */
1130
#define FRKEY                  (0x9600)       /* (legacy definition) Flash key returned by read */
1131
#define FWKEY                  (0xA500)       /* (legacy definition) Flash key for write */
1132
#define FXKEY                  (0x3300)       /* (legacy definition) for use with XOR instruction */
1133
 
1134
/* FCTL1 Control Bits */
1135
//#define RESERVED            (0x0001)  /* Reserved */
1136
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
1137
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
1138
//#define RESERVED            (0x0008)  /* Reserved */
1139
//#define RESERVED            (0x0010)  /* Reserved */
1140
#define SWRT                   (0x0020)       /* Smart Write enable */
1141
#define WRT                    (0x0040)       /* Enable bit for Flash write */
1142
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
1143
 
1144
/* FCTL1 Control Bits */
1145
//#define RESERVED            (0x0001)  /* Reserved */
1146
#define ERASE_L                (0x0002)       /* Enable bit for Flash segment erase */
1147
#define MERAS_L                (0x0004)       /* Enable bit for Flash mass erase */
1148
//#define RESERVED            (0x0008)  /* Reserved */
1149
//#define RESERVED            (0x0010)  /* Reserved */
1150
#define SWRT_L                 (0x0020)       /* Smart Write enable */
1151
#define WRT_L                  (0x0040)       /* Enable bit for Flash write */
1152
#define BLKWRT_L               (0x0080)       /* Enable bit for Flash segment write */
1153
 
1154
/* FCTL1 Control Bits */
1155
//#define RESERVED            (0x0001)  /* Reserved */
1156
//#define RESERVED            (0x0008)  /* Reserved */
1157
//#define RESERVED            (0x0010)  /* Reserved */
1158
 
1159
/* FCTL3 Control Bits */
1160
#define BUSY                   (0x0001)       /* Flash busy: 1 */
1161
#define KEYV                   (0x0002)       /* Flash Key violation flag */
1162
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
1163
#define WAIT                   (0x0008)       /* Wait flag for segment write */
1164
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
1165
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
1166
#define LOCKA                  (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
1167
//#define RESERVED            (0x0080)  /* Reserved */
1168
 
1169
/* FCTL3 Control Bits */
1170
#define BUSY_L                 (0x0001)       /* Flash busy: 1 */
1171
#define KEYV_L                 (0x0002)       /* Flash Key violation flag */
1172
#define ACCVIFG_L              (0x0004)       /* Flash Access violation flag */
1173
#define WAIT_L                 (0x0008)       /* Wait flag for segment write */
1174
#define LOCK_L                 (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
1175
#define EMEX_L                 (0x0020)       /* Flash Emergency Exit */
1176
#define LOCKA_L                (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
1177
//#define RESERVED            (0x0080)  /* Reserved */
1178
 
1179
/* FCTL3 Control Bits */
1180
//#define RESERVED            (0x0080)  /* Reserved */
1181
 
1182
/* FCTL4 Control Bits */
1183
#define VPE                    (0x0001)       /* Voltage Changed during Program Error Flag */
1184
#define MGR0                   (0x0010)       /* Marginal read 0 mode. */
1185
#define MGR1                   (0x0020)       /* Marginal read 1 mode. */
1186
#define LOCKINFO               (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1187
 
1188
/* FCTL4 Control Bits */
1189
#define VPE_L                  (0x0001)       /* Voltage Changed during Program Error Flag */
1190
#define MGR0_L                 (0x0010)       /* Marginal read 0 mode. */
1191
#define MGR1_L                 (0x0020)       /* Marginal read 1 mode. */
1192
#define LOCKINFO_L             (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1193
 
1194
/* FCTL4 Control Bits */
1195
 
1196
/************************************************************
1197
* HARDWARE MULTIPLIER 32Bit
1198
************************************************************/
1199
#define __MSP430_HAS_MPY32__                  /* Definition to show that Module is available */
1200
#define __MSP430_BASEADDRESS_MPY32__ 0x04C0
1201
 
1202
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
1203
SFR_8BIT(MPY_L);                              /* Multiply Unsigned/Operand 1 */
1204
SFR_8BIT(MPY_H);                              /* Multiply Unsigned/Operand 1 */
1205
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
1206
SFR_8BIT(MPYS_L);                             /* Multiply Signed/Operand 1 */
1207
SFR_8BIT(MPYS_H);                             /* Multiply Signed/Operand 1 */
1208
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
1209
SFR_8BIT(MAC_L);                              /* Multiply Unsigned and Accumulate/Operand 1 */
1210
SFR_8BIT(MAC_H);                              /* Multiply Unsigned and Accumulate/Operand 1 */
1211
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
1212
SFR_8BIT(MACS_L);                             /* Multiply Signed and Accumulate/Operand 1 */
1213
SFR_8BIT(MACS_H);                             /* Multiply Signed and Accumulate/Operand 1 */
1214
SFR_16BIT(OP2);                               /* Operand 2 */
1215
SFR_8BIT(OP2_L);                              /* Operand 2 */
1216
SFR_8BIT(OP2_H);                              /* Operand 2 */
1217
SFR_16BIT(RESLO);                             /* Result Low Word */
1218
SFR_8BIT(RESLO_L);                            /* Result Low Word */
1219
SFR_8BIT(RESLO_H);                            /* Result Low Word */
1220
SFR_16BIT(RESHI);                             /* Result High Word */
1221
SFR_8BIT(RESHI_L);                            /* Result High Word */
1222
SFR_8BIT(RESHI_H);                            /* Result High Word */
1223
SFR_16BIT(SUMEXT);                            /* Sum Extend */
1224
SFR_8BIT(SUMEXT_L);                           /* Sum Extend */
1225
SFR_8BIT(SUMEXT_H);                           /* Sum Extend */
1226
 
1227
SFR_16BIT(MPY32L);                            /* 32-bit operand 1 - multiply - low word */
1228
SFR_8BIT(MPY32L_L);                           /* 32-bit operand 1 - multiply - low word */
1229
SFR_8BIT(MPY32L_H);                           /* 32-bit operand 1 - multiply - low word */
1230
SFR_16BIT(MPY32H);                            /* 32-bit operand 1 - multiply - high word */
1231
SFR_8BIT(MPY32H_L);                           /* 32-bit operand 1 - multiply - high word */
1232
SFR_8BIT(MPY32H_H);                           /* 32-bit operand 1 - multiply - high word */
1233
SFR_16BIT(MPYS32L);                           /* 32-bit operand 1 - signed multiply - low word */
1234
SFR_8BIT(MPYS32L_L);                          /* 32-bit operand 1 - signed multiply - low word */
1235
SFR_8BIT(MPYS32L_H);                          /* 32-bit operand 1 - signed multiply - low word */
1236
SFR_16BIT(MPYS32H);                           /* 32-bit operand 1 - signed multiply - high word */
1237
SFR_8BIT(MPYS32H_L);                          /* 32-bit operand 1 - signed multiply - high word */
1238
SFR_8BIT(MPYS32H_H);                          /* 32-bit operand 1 - signed multiply - high word */
1239
SFR_16BIT(MAC32L);                            /* 32-bit operand 1 - multiply accumulate - low word */
1240
SFR_8BIT(MAC32L_L);                           /* 32-bit operand 1 - multiply accumulate - low word */
1241
SFR_8BIT(MAC32L_H);                           /* 32-bit operand 1 - multiply accumulate - low word */
1242
SFR_16BIT(MAC32H);                            /* 32-bit operand 1 - multiply accumulate - high word */
1243
SFR_8BIT(MAC32H_L);                           /* 32-bit operand 1 - multiply accumulate - high word */
1244
SFR_8BIT(MAC32H_H);                           /* 32-bit operand 1 - multiply accumulate - high word */
1245
SFR_16BIT(MACS32L);                           /* 32-bit operand 1 - signed multiply accumulate - low word */
1246
SFR_8BIT(MACS32L_L);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1247
SFR_8BIT(MACS32L_H);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1248
SFR_16BIT(MACS32H);                           /* 32-bit operand 1 - signed multiply accumulate - high word */
1249
SFR_8BIT(MACS32H_L);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1250
SFR_8BIT(MACS32H_H);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1251
SFR_16BIT(OP2L);                              /* 32-bit operand 2 - low word */
1252
SFR_8BIT(OP2L_L);                             /* 32-bit operand 2 - low word */
1253
SFR_8BIT(OP2L_H);                             /* 32-bit operand 2 - low word */
1254
SFR_16BIT(OP2H);                              /* 32-bit operand 2 - high word */
1255
SFR_8BIT(OP2H_L);                             /* 32-bit operand 2 - high word */
1256
SFR_8BIT(OP2H_H);                             /* 32-bit operand 2 - high word */
1257
SFR_16BIT(RES0);                              /* 32x32-bit result 0 - least significant word */
1258
SFR_8BIT(RES0_L);                             /* 32x32-bit result 0 - least significant word */
1259
SFR_8BIT(RES0_H);                             /* 32x32-bit result 0 - least significant word */
1260
SFR_16BIT(RES1);                              /* 32x32-bit result 1 */
1261
SFR_8BIT(RES1_L);                             /* 32x32-bit result 1 */
1262
SFR_8BIT(RES1_H);                             /* 32x32-bit result 1 */
1263
SFR_16BIT(RES2);                              /* 32x32-bit result 2 */
1264
SFR_8BIT(RES2_L);                             /* 32x32-bit result 2 */
1265
SFR_8BIT(RES2_H);                             /* 32x32-bit result 2 */
1266
SFR_16BIT(RES3);                              /* 32x32-bit result 3 - most significant word */
1267
SFR_8BIT(RES3_L);                             /* 32x32-bit result 3 - most significant word */
1268
SFR_8BIT(RES3_H);                             /* 32x32-bit result 3 - most significant word */
1269
SFR_16BIT(MPY32CTL0);                         /* MPY32 Control Register 0 */
1270
SFR_8BIT(MPY32CTL0_L);                        /* MPY32 Control Register 0 */
1271
SFR_8BIT(MPY32CTL0_H);                        /* MPY32 Control Register 0 */
1272
 
1273
#define MPY_B                  MPY_L          /* Multiply Unsigned/Operand 1 (Byte Access) */
1274
#define MPYS_B                 MPYS_L         /* Multiply Signed/Operand 1 (Byte Access) */
1275
#define MAC_B                  MAC_L          /* Multiply Unsigned and Accumulate/Operand 1 (Byte Access) */
1276
#define MACS_B                 MACS_L         /* Multiply Signed and Accumulate/Operand 1 (Byte Access) */
1277
#define OP2_B                  OP2_L          /* Operand 2 (Byte Access) */
1278
#define MPY32L_B               MPY32L_L       /* 32-bit operand 1 - multiply - low word (Byte Access) */
1279
#define MPY32H_B               MPY32H_L       /* 32-bit operand 1 - multiply - high word (Byte Access) */
1280
#define MPYS32L_B              MPYS32L_L      /* 32-bit operand 1 - signed multiply - low word (Byte Access) */
1281
#define MPYS32H_B              MPYS32H_L      /* 32-bit operand 1 - signed multiply - high word (Byte Access) */
1282
#define MAC32L_B               MAC32L_L       /* 32-bit operand 1 - multiply accumulate - low word (Byte Access) */
1283
#define MAC32H_B               MAC32H_L       /* 32-bit operand 1 - multiply accumulate - high word (Byte Access) */
1284
#define MACS32L_B              MACS32L_L      /* 32-bit operand 1 - signed multiply accumulate - low word (Byte Access) */
1285
#define MACS32H_B              MACS32H_L      /* 32-bit operand 1 - signed multiply accumulate - high word (Byte Access) */
1286
#define OP2L_B                 OP2L_L         /* 32-bit operand 2 - low word (Byte Access) */
1287
#define OP2H_B                 OP2H_L         /* 32-bit operand 2 - high word (Byte Access) */
1288
 
1289
/* MPY32CTL0 Control Bits */
1290
#define MPYC                   (0x0001)       /* Carry of the multiplier */
1291
//#define RESERVED            (0x0002)  /* Reserved */
1292
#define MPYFRAC                (0x0004)       /* Fractional mode */
1293
#define MPYSAT                 (0x0008)       /* Saturation mode */
1294
#define MPYM0                  (0x0010)       /* Multiplier mode Bit:0 */
1295
#define MPYM1                  (0x0020)       /* Multiplier mode Bit:1 */
1296
#define OP1_32                 (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1297
#define OP2_32                 (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1298
#define MPYDLYWRTEN            (0x0100)       /* Delayed write enable */
1299
#define MPYDLY32               (0x0200)       /* Delayed write mode */
1300
 
1301
/* MPY32CTL0 Control Bits */
1302
#define MPYC_L                 (0x0001)       /* Carry of the multiplier */
1303
//#define RESERVED            (0x0002)  /* Reserved */
1304
#define MPYFRAC_L              (0x0004)       /* Fractional mode */
1305
#define MPYSAT_L               (0x0008)       /* Saturation mode */
1306
#define MPYM0_L                (0x0010)       /* Multiplier mode Bit:0 */
1307
#define MPYM1_L                (0x0020)       /* Multiplier mode Bit:1 */
1308
#define OP1_32_L               (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1309
#define OP2_32_L               (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1310
 
1311
/* MPY32CTL0 Control Bits */
1312
//#define RESERVED            (0x0002)  /* Reserved */
1313
#define MPYDLYWRTEN_H          (0x0001)       /* Delayed write enable */
1314
#define MPYDLY32_H             (0x0002)       /* Delayed write mode */
1315
 
1316
#define MPYM_0                 (0x0000)       /* Multiplier mode: MPY */
1317
#define MPYM_1                 (0x0010)       /* Multiplier mode: MPYS */
1318
#define MPYM_2                 (0x0020)       /* Multiplier mode: MAC */
1319
#define MPYM_3                 (0x0030)       /* Multiplier mode: MACS */
1320
#define MPYM__MPY              (0x0000)       /* Multiplier mode: MPY */
1321
#define MPYM__MPYS             (0x0010)       /* Multiplier mode: MPYS */
1322
#define MPYM__MAC              (0x0020)       /* Multiplier mode: MAC */
1323
#define MPYM__MACS             (0x0030)       /* Multiplier mode: MACS */
1324
 
1325
/************************************************************
1326
* DIGITAL I/O Port1/2 Pull up / Pull down Resistors
1327
************************************************************/
1328
#define __MSP430_HAS_PORT1_R__                /* Definition to show that Module is available */
1329
#define __MSP430_BASEADDRESS_PORT1_R__ 0x0200
1330
#define __MSP430_HAS_PORT2_R__                /* Definition to show that Module is available */
1331
#define __MSP430_BASEADDRESS_PORT2_R__ 0x0200
1332
#define __MSP430_HAS_PORTA_R__                /* Definition to show that Module is available */
1333
#define __MSP430_BASEADDRESS_PORTA_R__ 0x0200
1334
 
1335
SFR_16BIT(PAIN);                              /* Port A Input */
1336
SFR_8BIT(PAIN_L);                             /* Port A Input */
1337
SFR_8BIT(PAIN_H);                             /* Port A Input */
1338
SFR_16BIT(PAOUT);                             /* Port A Output */
1339
SFR_8BIT(PAOUT_L);                            /* Port A Output */
1340
SFR_8BIT(PAOUT_H);                            /* Port A Output */
1341
SFR_16BIT(PADIR);                             /* Port A Direction */
1342
SFR_8BIT(PADIR_L);                            /* Port A Direction */
1343
SFR_8BIT(PADIR_H);                            /* Port A Direction */
1344
SFR_16BIT(PAREN);                             /* Port A Resistor Enable */
1345
SFR_8BIT(PAREN_L);                            /* Port A Resistor Enable */
1346
SFR_8BIT(PAREN_H);                            /* Port A Resistor Enable */
1347
SFR_16BIT(PADS);                              /* Port A Resistor Drive Strenght */
1348
SFR_8BIT(PADS_L);                             /* Port A Resistor Drive Strenght */
1349
SFR_8BIT(PADS_H);                             /* Port A Resistor Drive Strenght */
1350
SFR_16BIT(PASEL);                             /* Port A Selection */
1351
SFR_8BIT(PASEL_L);                            /* Port A Selection */
1352
SFR_8BIT(PASEL_H);                            /* Port A Selection */
1353
SFR_16BIT(PAIES);                             /* Port A Interrupt Edge Select */
1354
SFR_8BIT(PAIES_L);                            /* Port A Interrupt Edge Select */
1355
SFR_8BIT(PAIES_H);                            /* Port A Interrupt Edge Select */
1356
SFR_16BIT(PAIE);                              /* Port A Interrupt Enable */
1357
SFR_8BIT(PAIE_L);                             /* Port A Interrupt Enable */
1358
SFR_8BIT(PAIE_H);                             /* Port A Interrupt Enable */
1359
SFR_16BIT(PAIFG);                             /* Port A Interrupt Flag */
1360
SFR_8BIT(PAIFG_L);                            /* Port A Interrupt Flag */
1361
SFR_8BIT(PAIFG_H);                            /* Port A Interrupt Flag */
1362
 
1363
 
1364
SFR_16BIT(P1IV);                              /* Port 1 Interrupt Vector Word */
1365
SFR_16BIT(P2IV);                              /* Port 2 Interrupt Vector Word */
1366
#define P1IN                   (PAIN_L)       /* Port 1 Input */
1367
#define P1OUT                  (PAOUT_L)      /* Port 1 Output */
1368
#define P1DIR                  (PADIR_L)      /* Port 1 Direction */
1369
#define P1REN                  (PAREN_L)      /* Port 1 Resistor Enable */
1370
#define P1DS                   (PADS_L)       /* Port 1 Resistor Drive Strenght */
1371
#define P1SEL                  (PASEL_L)      /* Port 1 Selection */
1372
#define P1IES                  (PAIES_L)      /* Port 1 Interrupt Edge Select */
1373
#define P1IE                   (PAIE_L)       /* Port 1 Interrupt Enable */
1374
#define P1IFG                  (PAIFG_L)      /* Port 1 Interrupt Flag */
1375
 
1376
//Definitions for P1IV
1377
#define P1IV_NONE              (0x0000)       /* No Interrupt pending */
1378
#define P1IV_P1IFG0            (0x0002)       /* P1IV P1IFG.0 */
1379
#define P1IV_P1IFG1            (0x0004)       /* P1IV P1IFG.1 */
1380
#define P1IV_P1IFG2            (0x0006)       /* P1IV P1IFG.2 */
1381
#define P1IV_P1IFG3            (0x0008)       /* P1IV P1IFG.3 */
1382
#define P1IV_P1IFG4            (0x000A)       /* P1IV P1IFG.4 */
1383
#define P1IV_P1IFG5            (0x000C)       /* P1IV P1IFG.5 */
1384
#define P1IV_P1IFG6            (0x000E)       /* P1IV P1IFG.6 */
1385
#define P1IV_P1IFG7            (0x0010)       /* P1IV P1IFG.7 */
1386
 
1387
#define P2IN                   (PAIN_H)       /* Port 2 Input */
1388
#define P2OUT                  (PAOUT_H)      /* Port 2 Output */
1389
#define P2DIR                  (PADIR_H)      /* Port 2 Direction */
1390
#define P2REN                  (PAREN_H)      /* Port 2 Resistor Enable */
1391
#define P2DS                   (PADS_H)       /* Port 2 Resistor Drive Strenght */
1392
#define P2SEL                  (PASEL_H)      /* Port 2 Selection */
1393
#define P2IES                  (PAIES_H)      /* Port 2 Interrupt Edge Select */
1394
#define P2IE                   (PAIE_H)       /* Port 2 Interrupt Enable */
1395
#define P2IFG                  (PAIFG_H)      /* Port 2 Interrupt Flag */
1396
 
1397
//Definitions for P2IV
1398
#define P2IV_NONE              (0x0000)       /* No Interrupt pending */
1399
#define P2IV_P2IFG0            (0x0002)       /* P2IV P2IFG.0 */
1400
#define P2IV_P2IFG1            (0x0004)       /* P2IV P2IFG.1 */
1401
#define P2IV_P2IFG2            (0x0006)       /* P2IV P2IFG.2 */
1402
#define P2IV_P2IFG3            (0x0008)       /* P2IV P2IFG.3 */
1403
#define P2IV_P2IFG4            (0x000A)       /* P2IV P2IFG.4 */
1404
#define P2IV_P2IFG5            (0x000C)       /* P2IV P2IFG.5 */
1405
#define P2IV_P2IFG6            (0x000E)       /* P2IV P2IFG.6 */
1406
#define P2IV_P2IFG7            (0x0010)       /* P2IV P2IFG.7 */
1407
 
1408
 
1409
/************************************************************
1410
* DIGITAL I/O Port3/4 Pull up / Pull down Resistors
1411
************************************************************/
1412
#define __MSP430_HAS_PORT3_R__                /* Definition to show that Module is available */
1413
#define __MSP430_BASEADDRESS_PORT3_R__ 0x0220
1414
#define __MSP430_HAS_PORT4_R__                /* Definition to show that Module is available */
1415
#define __MSP430_BASEADDRESS_PORT4_R__ 0x0220
1416
#define __MSP430_HAS_PORTB_R__                /* Definition to show that Module is available */
1417
#define __MSP430_BASEADDRESS_PORTB_R__ 0x0220
1418
 
1419
SFR_16BIT(PBIN);                              /* Port B Input */
1420
SFR_8BIT(PBIN_L);                             /* Port B Input */
1421
SFR_8BIT(PBIN_H);                             /* Port B Input */
1422
SFR_16BIT(PBOUT);                             /* Port B Output */
1423
SFR_8BIT(PBOUT_L);                            /* Port B Output */
1424
SFR_8BIT(PBOUT_H);                            /* Port B Output */
1425
SFR_16BIT(PBDIR);                             /* Port B Direction */
1426
SFR_8BIT(PBDIR_L);                            /* Port B Direction */
1427
SFR_8BIT(PBDIR_H);                            /* Port B Direction */
1428
SFR_16BIT(PBREN);                             /* Port B Resistor Enable */
1429
SFR_8BIT(PBREN_L);                            /* Port B Resistor Enable */
1430
SFR_8BIT(PBREN_H);                            /* Port B Resistor Enable */
1431
SFR_16BIT(PBDS);                              /* Port B Resistor Drive Strenght */
1432
SFR_8BIT(PBDS_L);                             /* Port B Resistor Drive Strenght */
1433
SFR_8BIT(PBDS_H);                             /* Port B Resistor Drive Strenght */
1434
SFR_16BIT(PBSEL);                             /* Port B Selection */
1435
SFR_8BIT(PBSEL_L);                            /* Port B Selection */
1436
SFR_8BIT(PBSEL_H);                            /* Port B Selection */
1437
 
1438
 
1439
#define P3IN                   (PBIN_L)       /* Port 3 Input */
1440
#define P3OUT                  (PBOUT_L)      /* Port 3 Output */
1441
#define P3DIR                  (PBDIR_L)      /* Port 3 Direction */
1442
#define P3REN                  (PBREN_L)      /* Port 3 Resistor Enable */
1443
#define P3DS                   (PBDS_L)       /* Port 3 Resistor Drive Strenght */
1444
#define P3SEL                  (PBSEL_L)      /* Port 3 Selection */
1445
 
1446
#define P4IN                   (PBIN_H)       /* Port 4 Input */
1447
#define P4OUT                  (PBOUT_H)      /* Port 4 Output */
1448
#define P4DIR                  (PBDIR_H)      /* Port 4 Direction */
1449
#define P4REN                  (PBREN_H)      /* Port 4 Resistor Enable */
1450
#define P4DS                   (PBDS_H)       /* Port 4 Resistor Drive Strenght */
1451
#define P4SEL                  (PBSEL_H)      /* Port 4 Selection */
1452
 
1453
 
1454
/************************************************************
1455
* DIGITAL I/O Port5/6 Pull up / Pull down Resistors
1456
************************************************************/
1457
#define __MSP430_HAS_PORT5_R__                /* Definition to show that Module is available */
1458
#define __MSP430_BASEADDRESS_PORT5_R__ 0x0240
1459
#define __MSP430_HAS_PORT6_R__                /* Definition to show that Module is available */
1460
#define __MSP430_BASEADDRESS_PORT6_R__ 0x0240
1461
#define __MSP430_HAS_PORTC_R__                /* Definition to show that Module is available */
1462
#define __MSP430_BASEADDRESS_PORTC_R__ 0x0240
1463
 
1464
SFR_16BIT(PCIN);                              /* Port C Input */
1465
SFR_8BIT(PCIN_L);                             /* Port C Input */
1466
SFR_8BIT(PCIN_H);                             /* Port C Input */
1467
SFR_16BIT(PCOUT);                             /* Port C Output */
1468
SFR_8BIT(PCOUT_L);                            /* Port C Output */
1469
SFR_8BIT(PCOUT_H);                            /* Port C Output */
1470
SFR_16BIT(PCDIR);                             /* Port C Direction */
1471
SFR_8BIT(PCDIR_L);                            /* Port C Direction */
1472
SFR_8BIT(PCDIR_H);                            /* Port C Direction */
1473
SFR_16BIT(PCREN);                             /* Port C Resistor Enable */
1474
SFR_8BIT(PCREN_L);                            /* Port C Resistor Enable */
1475
SFR_8BIT(PCREN_H);                            /* Port C Resistor Enable */
1476
SFR_16BIT(PCDS);                              /* Port C Resistor Drive Strenght */
1477
SFR_8BIT(PCDS_L);                             /* Port C Resistor Drive Strenght */
1478
SFR_8BIT(PCDS_H);                             /* Port C Resistor Drive Strenght */
1479
SFR_16BIT(PCSEL);                             /* Port C Selection */
1480
SFR_8BIT(PCSEL_L);                            /* Port C Selection */
1481
SFR_8BIT(PCSEL_H);                            /* Port C Selection */
1482
 
1483
 
1484
#define P5IN                   (PCIN_L)       /* Port 5 Input */
1485
#define P5OUT                  (PCOUT_L)      /* Port 5 Output */
1486
#define P5DIR                  (PCDIR_L)      /* Port 5 Direction */
1487
#define P5REN                  (PCREN_L)      /* Port 5 Resistor Enable */
1488
#define P5DS                   (PCDS_L)       /* Port 5 Resistor Drive Strenght */
1489
#define P5SEL                  (PCSEL_L)      /* Port 5 Selection */
1490
 
1491
#define P6IN                   (PCIN_H)       /* Port 6 Input */
1492
#define P6OUT                  (PCOUT_H)      /* Port 6 Output */
1493
#define P6DIR                  (PCDIR_H)      /* Port 6 Direction */
1494
#define P6REN                  (PCREN_H)      /* Port 6 Resistor Enable */
1495
#define P6DS                   (PCDS_H)       /* Port 6 Resistor Drive Strenght */
1496
#define P6SEL                  (PCSEL_H)      /* Port 6 Selection */
1497
 
1498
 
1499
/************************************************************
1500
* DIGITAL I/O PortJ Pull up / Pull down Resistors
1501
************************************************************/
1502
#define __MSP430_HAS_PORTJ_R__                /* Definition to show that Module is available */
1503
#define __MSP430_BASEADDRESS_PORTJ_R__ 0x0320
1504
 
1505
SFR_16BIT(PJIN);                              /* Port J Input */
1506
SFR_8BIT(PJIN_L);                             /* Port J Input */
1507
SFR_8BIT(PJIN_H);                             /* Port J Input */
1508
SFR_16BIT(PJOUT);                             /* Port J Output */
1509
SFR_8BIT(PJOUT_L);                            /* Port J Output */
1510
SFR_8BIT(PJOUT_H);                            /* Port J Output */
1511
SFR_16BIT(PJDIR);                             /* Port J Direction */
1512
SFR_8BIT(PJDIR_L);                            /* Port J Direction */
1513
SFR_8BIT(PJDIR_H);                            /* Port J Direction */
1514
SFR_16BIT(PJREN);                             /* Port J Resistor Enable */
1515
SFR_8BIT(PJREN_L);                            /* Port J Resistor Enable */
1516
SFR_8BIT(PJREN_H);                            /* Port J Resistor Enable */
1517
SFR_16BIT(PJDS);                              /* Port J Resistor Drive Strenght */
1518
SFR_8BIT(PJDS_L);                             /* Port J Resistor Drive Strenght */
1519
SFR_8BIT(PJDS_H);                             /* Port J Resistor Drive Strenght */
1520
 
1521
/************************************************************
1522
* PORT MAPPING CONTROLLER
1523
************************************************************/
1524
#define __MSP430_HAS_PORT_MAPPING__                /* Definition to show that Module is available */
1525
#define __MSP430_BASEADDRESS_PORT_MAPPING__ 0x01C0
1526
 
1527
SFR_16BIT(PMAPKEYID);                         /* Port Mapping Key register */
1528
SFR_8BIT(PMAPKEYID_L);                        /* Port Mapping Key register */
1529
SFR_8BIT(PMAPKEYID_H);                        /* Port Mapping Key register */
1530
SFR_16BIT(PMAPCTL);                           /* Port Mapping control register */
1531
SFR_8BIT(PMAPCTL_L);                          /* Port Mapping control register */
1532
SFR_8BIT(PMAPCTL_H);                          /* Port Mapping control register */
1533
 
1534
#define  PMAPKEY               (0x2D52)       /* Port Mapping Key */
1535
#define  PMAPPWD               PMAPKEYID      /* Legacy Definition: Mapping Key register */
1536
#define  PMAPPW                (0x2D52)       /* Legacy Definition: Port Mapping Password */
1537
 
1538
/* PMAPCTL Control Bits */
1539
#define PMAPLOCKED             (0x0001)       /* Port Mapping Lock bit. Read only */
1540
#define PMAPRECFG              (0x0002)       /* Port Mapping re-configuration control bit */
1541
 
1542
/* PMAPCTL Control Bits */
1543
#define PMAPLOCKED_L           (0x0001)       /* Port Mapping Lock bit. Read only */
1544
#define PMAPRECFG_L            (0x0002)       /* Port Mapping re-configuration control bit */
1545
 
1546
/* PMAPCTL Control Bits */
1547
 
1548
/************************************************************
1549
* PORT 4 MAPPING CONTROLLER
1550
************************************************************/
1551
#define __MSP430_HAS_PORT4_MAPPING__                /* Definition to show that Module is available */
1552
#define __MSP430_BASEADDRESS_PORT4_MAPPING__ 0x01E0
1553
 
1554
SFR_16BIT(P4MAP01);                           /* Port P4.0/1 mapping register */
1555
SFR_8BIT(P4MAP01_L);                          /* Port P4.0/1 mapping register */
1556
SFR_8BIT(P4MAP01_H);                          /* Port P4.0/1 mapping register */
1557
SFR_16BIT(P4MAP23);                           /* Port P4.2/3 mapping register */
1558
SFR_8BIT(P4MAP23_L);                          /* Port P4.2/3 mapping register */
1559
SFR_8BIT(P4MAP23_H);                          /* Port P4.2/3 mapping register */
1560
SFR_16BIT(P4MAP45);                           /* Port P4.4/5 mapping register */
1561
SFR_8BIT(P4MAP45_L);                          /* Port P4.4/5 mapping register */
1562
SFR_8BIT(P4MAP45_H);                          /* Port P4.4/5 mapping register */
1563
SFR_16BIT(P4MAP67);                           /* Port P4.6/7 mapping register */
1564
SFR_8BIT(P4MAP67_L);                          /* Port P4.6/7 mapping register */
1565
SFR_8BIT(P4MAP67_H);                          /* Port P4.6/7 mapping register */
1566
 
1567
#define  P4MAP0                P4MAP01_L      /* Port P4.0 mapping register */
1568
#define  P4MAP1                P4MAP01_H      /* Port P4.1 mapping register */
1569
#define  P4MAP2                P4MAP23_L      /* Port P4.2 mapping register */
1570
#define  P4MAP3                P4MAP23_H      /* Port P4.3 mapping register */
1571
#define  P4MAP4                P4MAP45_L      /* Port P4.4 mapping register */
1572
#define  P4MAP5                P4MAP45_H      /* Port P4.5 mapping register */
1573
#define  P4MAP6                P4MAP67_L      /* Port P4.6 mapping register */
1574
#define  P4MAP7                P4MAP67_H      /* Port P4.7 mapping register */
1575
 
1576
#define PM_NONE                0
1577
#define PM_CBOUT0              1
1578
#define PM_TB0CLK              1
1579
#define PM_ADC10CLK            2
1580
#define PM_DMAE0               2
1581
#define PM_SVMOUT              3
1582
#define PM_TB0OUTH             3
1583
#define PM_TB0CCR0A            4
1584
#define PM_TB0CCR1A            5
1585
#define PM_TB0CCR2A            6
1586
#define PM_TB0CCR3A            7
1587
#define PM_TB0CCR4A            8
1588
#define PM_TB0CCR5A            9
1589
#define PM_TB0CCR6A            10
1590
#define PM_UCA1RXD             11
1591
#define PM_UCA1SOMI            11
1592
#define PM_UCA1TXD             12
1593
#define PM_UCA1SIMO            12
1594
#define PM_UCA1CLK             13
1595
#define PM_UCB1STE             13
1596
#define PM_UCB1SOMI            14
1597
#define PM_UCB1SCL             14
1598
#define PM_UCB1SIMO            15
1599
#define PM_UCB1SDA             15
1600
#define PM_UCB1CLK             16
1601
#define PM_UCA1STE             16
1602
#define PM_CBOUT1              17
1603
#define PM_MCLK                18
1604
#define PM_RTCCLK              19
1605
#define PM_UCA0RXD             20
1606
#define PM_UCA0SOMI            20
1607
#define PM_UCA0TXD             21
1608
#define PM_UCA0SIMO            21
1609
#define PM_UCA0CLK             22
1610
#define PM_UCB0STE             22
1611
#define PM_UCB0SOMI            23
1612
#define PM_UCB0SCL             23
1613
#define PM_UCB0SIMO            24
1614
#define PM_UCB0SDA             24
1615
#define PM_UCB0CLK             25
1616
#define PM_UCA0STE             25
1617
#define PM_ANALOG              31
1618
 
1619
/************************************************************
1620
* PMM - Power Management System
1621
************************************************************/
1622
#define __MSP430_HAS_PMM__                    /* Definition to show that Module is available */
1623
#define __MSP430_BASEADDRESS_PMM__ 0x0120
1624
 
1625
SFR_16BIT(PMMCTL0);                           /* PMM Control 0 */
1626
SFR_8BIT(PMMCTL0_L);                          /* PMM Control 0 */
1627
SFR_8BIT(PMMCTL0_H);                          /* PMM Control 0 */
1628
SFR_16BIT(PMMCTL1);                           /* PMM Control 1 */
1629
SFR_8BIT(PMMCTL1_L);                          /* PMM Control 1 */
1630
SFR_8BIT(PMMCTL1_H);                          /* PMM Control 1 */
1631
SFR_16BIT(SVSMHCTL);                          /* SVS and SVM high side control register */
1632
SFR_8BIT(SVSMHCTL_L);                         /* SVS and SVM high side control register */
1633
SFR_8BIT(SVSMHCTL_H);                         /* SVS and SVM high side control register */
1634
SFR_16BIT(SVSMLCTL);                          /* SVS and SVM low side control register */
1635
SFR_8BIT(SVSMLCTL_L);                         /* SVS and SVM low side control register */
1636
SFR_8BIT(SVSMLCTL_H);                         /* SVS and SVM low side control register */
1637
SFR_16BIT(SVSMIO);                            /* SVSIN and SVSOUT control register */
1638
SFR_8BIT(SVSMIO_L);                           /* SVSIN and SVSOUT control register */
1639
SFR_8BIT(SVSMIO_H);                           /* SVSIN and SVSOUT control register */
1640
SFR_16BIT(PMMIFG);                            /* PMM Interrupt Flag */
1641
SFR_8BIT(PMMIFG_L);                           /* PMM Interrupt Flag */
1642
SFR_8BIT(PMMIFG_H);                           /* PMM Interrupt Flag */
1643
SFR_16BIT(PMMRIE);                            /* PMM and RESET Interrupt Enable */
1644
SFR_8BIT(PMMRIE_L);                           /* PMM and RESET Interrupt Enable */
1645
SFR_8BIT(PMMRIE_H);                           /* PMM and RESET Interrupt Enable */
1646
SFR_16BIT(PM5CTL0);                           /* PMM Power Mode 5 Control Register 0 */
1647
SFR_8BIT(PM5CTL0_L);                          /* PMM Power Mode 5 Control Register 0 */
1648
SFR_8BIT(PM5CTL0_H);                          /* PMM Power Mode 5 Control Register 0 */
1649
 
1650
#define PMMPW                  (0xA500)       /* PMM Register Write Password */
1651
#define PMMPW_H                (0xA5)         /* PMM Register Write Password for high word access */
1652
 
1653
/* PMMCTL0 Control Bits */
1654
#define PMMCOREV0              (0x0001)       /* PMM Core Voltage Bit: 0 */
1655
#define PMMCOREV1              (0x0002)       /* PMM Core Voltage Bit: 1 */
1656
#define PMMSWBOR               (0x0004)       /* PMM Software BOR */
1657
#define PMMSWPOR               (0x0008)       /* PMM Software POR */
1658
#define PMMREGOFF              (0x0010)       /* PMM Turn Regulator off */
1659
#define PMMHPMRE               (0x0080)       /* PMM Global High Power Module Request Enable */
1660
 
1661
/* PMMCTL0 Control Bits */
1662
#define PMMCOREV0_L            (0x0001)       /* PMM Core Voltage Bit: 0 */
1663
#define PMMCOREV1_L            (0x0002)       /* PMM Core Voltage Bit: 1 */
1664
#define PMMSWBOR_L             (0x0004)       /* PMM Software BOR */
1665
#define PMMSWPOR_L             (0x0008)       /* PMM Software POR */
1666
#define PMMREGOFF_L            (0x0010)       /* PMM Turn Regulator off */
1667
#define PMMHPMRE_L             (0x0080)       /* PMM Global High Power Module Request Enable */
1668
 
1669
/* PMMCTL0 Control Bits */
1670
 
1671
#define PMMCOREV_0             (0x0000)       /* PMM Core Voltage 0 (1.35V) */
1672
#define PMMCOREV_1             (0x0001)       /* PMM Core Voltage 1 (1.55V) */
1673
#define PMMCOREV_2             (0x0002)       /* PMM Core Voltage 2 (1.75V) */
1674
#define PMMCOREV_3             (0x0003)       /* PMM Core Voltage 3 (1.85V) */
1675
 
1676
/* PMMCTL1 Control Bits */
1677
#define PMMREFMD               (0x0001)       /* PMM Reference Mode */
1678
#define PMMCMD0                (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1679
#define PMMCMD1                (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1680
 
1681
/* PMMCTL1 Control Bits */
1682
#define PMMREFMD_L             (0x0001)       /* PMM Reference Mode */
1683
#define PMMCMD0_L              (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1684
#define PMMCMD1_L              (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1685
 
1686
/* PMMCTL1 Control Bits */
1687
 
1688
/* SVSMHCTL Control Bits */
1689
#define SVSMHRRL0              (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1690
#define SVSMHRRL1              (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1691
#define SVSMHRRL2              (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1692
#define SVSMHDLYST             (0x0008)       /* SVS and SVM high side delay status */
1693
#define SVSHMD                 (0x0010)       /* SVS high side mode */
1694
#define SVSMHEVM               (0x0040)       /* SVS and SVM high side event mask */
1695
#define SVSMHACE               (0x0080)       /* SVS and SVM high side auto control enable */
1696
#define SVSHRVL0               (0x0100)       /* SVS high side reset voltage level Bit: 0 */
1697
#define SVSHRVL1               (0x0200)       /* SVS high side reset voltage level Bit: 1 */
1698
#define SVSHE                  (0x0400)       /* SVS high side enable */
1699
#define SVSHFP                 (0x0800)       /* SVS high side full performace mode */
1700
#define SVMHOVPE               (0x1000)       /* SVM high side over-voltage enable */
1701
#define SVMHE                  (0x4000)       /* SVM high side enable */
1702
#define SVMHFP                 (0x8000)       /* SVM high side full performace mode */
1703
 
1704
/* SVSMHCTL Control Bits */
1705
#define SVSMHRRL0_L            (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1706
#define SVSMHRRL1_L            (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1707
#define SVSMHRRL2_L            (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1708
#define SVSMHDLYST_L           (0x0008)       /* SVS and SVM high side delay status */
1709
#define SVSHMD_L               (0x0010)       /* SVS high side mode */
1710
#define SVSMHEVM_L             (0x0040)       /* SVS and SVM high side event mask */
1711
#define SVSMHACE_L             (0x0080)       /* SVS and SVM high side auto control enable */
1712
 
1713
/* SVSMHCTL Control Bits */
1714
#define SVSHRVL0_H             (0x0001)       /* SVS high side reset voltage level Bit: 0 */
1715
#define SVSHRVL1_H             (0x0002)       /* SVS high side reset voltage level Bit: 1 */
1716
#define SVSHE_H                (0x0004)       /* SVS high side enable */
1717
#define SVSHFP_H               (0x0008)       /* SVS high side full performace mode */
1718
#define SVMHOVPE_H             (0x0010)       /* SVM high side over-voltage enable */
1719
#define SVMHE_H                (0x0040)       /* SVM high side enable */
1720
#define SVMHFP_H               (0x0080)       /* SVM high side full performace mode */
1721
 
1722
#define SVSMHRRL_0             (0x0000)       /* SVS and SVM high side Reset Release Voltage Level 0 */
1723
#define SVSMHRRL_1             (0x0001)       /* SVS and SVM high side Reset Release Voltage Level 1 */
1724
#define SVSMHRRL_2             (0x0002)       /* SVS and SVM high side Reset Release Voltage Level 2 */
1725
#define SVSMHRRL_3             (0x0003)       /* SVS and SVM high side Reset Release Voltage Level 3 */
1726
#define SVSMHRRL_4             (0x0004)       /* SVS and SVM high side Reset Release Voltage Level 4 */
1727
#define SVSMHRRL_5             (0x0005)       /* SVS and SVM high side Reset Release Voltage Level 5 */
1728
#define SVSMHRRL_6             (0x0006)       /* SVS and SVM high side Reset Release Voltage Level 6 */
1729
#define SVSMHRRL_7             (0x0007)       /* SVS and SVM high side Reset Release Voltage Level 7 */
1730
 
1731
#define SVSHRVL_0              (0x0000)       /* SVS high side Reset Release Voltage Level 0 */
1732
#define SVSHRVL_1              (0x0100)       /* SVS high side Reset Release Voltage Level 1 */
1733
#define SVSHRVL_2              (0x0200)       /* SVS high side Reset Release Voltage Level 2 */
1734
#define SVSHRVL_3              (0x0300)       /* SVS high side Reset Release Voltage Level 3 */
1735
 
1736
/* SVSMLCTL Control Bits */
1737
#define SVSMLRRL0              (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1738
#define SVSMLRRL1              (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1739
#define SVSMLRRL2              (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1740
#define SVSMLDLYST             (0x0008)       /* SVS and SVM low side delay status */
1741
#define SVSLMD                 (0x0010)       /* SVS low side mode */
1742
#define SVSMLEVM               (0x0040)       /* SVS and SVM low side event mask */
1743
#define SVSMLACE               (0x0080)       /* SVS and SVM low side auto control enable */
1744
#define SVSLRVL0               (0x0100)       /* SVS low side reset voltage level Bit: 0 */
1745
#define SVSLRVL1               (0x0200)       /* SVS low side reset voltage level Bit: 1 */
1746
#define SVSLE                  (0x0400)       /* SVS low side enable */
1747
#define SVSLFP                 (0x0800)       /* SVS low side full performace mode */
1748
#define SVMLOVPE               (0x1000)       /* SVM low side over-voltage enable */
1749
#define SVMLE                  (0x4000)       /* SVM low side enable */
1750
#define SVMLFP                 (0x8000)       /* SVM low side full performace mode */
1751
 
1752
/* SVSMLCTL Control Bits */
1753
#define SVSMLRRL0_L            (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1754
#define SVSMLRRL1_L            (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1755
#define SVSMLRRL2_L            (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1756
#define SVSMLDLYST_L           (0x0008)       /* SVS and SVM low side delay status */
1757
#define SVSLMD_L               (0x0010)       /* SVS low side mode */
1758
#define SVSMLEVM_L             (0x0040)       /* SVS and SVM low side event mask */
1759
#define SVSMLACE_L             (0x0080)       /* SVS and SVM low side auto control enable */
1760
 
1761
/* SVSMLCTL Control Bits */
1762
#define SVSLRVL0_H             (0x0001)       /* SVS low side reset voltage level Bit: 0 */
1763
#define SVSLRVL1_H             (0x0002)       /* SVS low side reset voltage level Bit: 1 */
1764
#define SVSLE_H                (0x0004)       /* SVS low side enable */
1765
#define SVSLFP_H               (0x0008)       /* SVS low side full performace mode */
1766
#define SVMLOVPE_H             (0x0010)       /* SVM low side over-voltage enable */
1767
#define SVMLE_H                (0x0040)       /* SVM low side enable */
1768
#define SVMLFP_H               (0x0080)       /* SVM low side full performace mode */
1769
 
1770
#define SVSMLRRL_0             (0x0000)       /* SVS and SVM low side Reset Release Voltage Level 0 */
1771
#define SVSMLRRL_1             (0x0001)       /* SVS and SVM low side Reset Release Voltage Level 1 */
1772
#define SVSMLRRL_2             (0x0002)       /* SVS and SVM low side Reset Release Voltage Level 2 */
1773
#define SVSMLRRL_3             (0x0003)       /* SVS and SVM low side Reset Release Voltage Level 3 */
1774
#define SVSMLRRL_4             (0x0004)       /* SVS and SVM low side Reset Release Voltage Level 4 */
1775
#define SVSMLRRL_5             (0x0005)       /* SVS and SVM low side Reset Release Voltage Level 5 */
1776
#define SVSMLRRL_6             (0x0006)       /* SVS and SVM low side Reset Release Voltage Level 6 */
1777
#define SVSMLRRL_7             (0x0007)       /* SVS and SVM low side Reset Release Voltage Level 7 */
1778
 
1779
#define SVSLRVL_0              (0x0000)       /* SVS low side Reset Release Voltage Level 0 */
1780
#define SVSLRVL_1              (0x0100)       /* SVS low side Reset Release Voltage Level 1 */
1781
#define SVSLRVL_2              (0x0200)       /* SVS low side Reset Release Voltage Level 2 */
1782
#define SVSLRVL_3              (0x0300)       /* SVS low side Reset Release Voltage Level 3 */
1783
 
1784
/* SVSMIO Control Bits */
1785
#define SVMLOE                 (0x0008)       /* SVM low side output enable */
1786
#define SVMLVLROE              (0x0010)       /* SVM low side voltage level reached output enable */
1787
#define SVMOUTPOL              (0x0020)       /* SVMOUT pin polarity */
1788
#define SVMHOE                 (0x0800)       /* SVM high side output enable */
1789
#define SVMHVLROE              (0x1000)       /* SVM high side voltage level reached output enable */
1790
 
1791
/* SVSMIO Control Bits */
1792
#define SVMLOE_L               (0x0008)       /* SVM low side output enable */
1793
#define SVMLVLROE_L            (0x0010)       /* SVM low side voltage level reached output enable */
1794
#define SVMOUTPOL_L            (0x0020)       /* SVMOUT pin polarity */
1795
 
1796
/* SVSMIO Control Bits */
1797
#define SVMHOE_H               (0x0008)       /* SVM high side output enable */
1798
#define SVMHVLROE_H            (0x0010)       /* SVM high side voltage level reached output enable */
1799
 
1800
/* PMMIFG Control Bits */
1801
#define SVSMLDLYIFG            (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1802
#define SVMLIFG                (0x0002)       /* SVM low side interrupt flag */
1803
#define SVMLVLRIFG             (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1804
#define SVSMHDLYIFG            (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1805
#define SVMHIFG                (0x0020)       /* SVM high side interrupt flag */
1806
#define SVMHVLRIFG             (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1807
#define PMMBORIFG              (0x0100)       /* PMM Software BOR interrupt flag */
1808
#define PMMRSTIFG              (0x0200)       /* PMM RESET pin interrupt flag */
1809
#define PMMPORIFG              (0x0400)       /* PMM Software POR interrupt flag */
1810
#define SVSHIFG                (0x1000)       /* SVS low side interrupt flag */
1811
#define SVSLIFG                (0x2000)       /* SVS high side interrupt flag */
1812
#define PMMLPM5IFG             (0x8000)       /* LPM5 indication Flag */
1813
 
1814
/* PMMIFG Control Bits */
1815
#define SVSMLDLYIFG_L          (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1816
#define SVMLIFG_L              (0x0002)       /* SVM low side interrupt flag */
1817
#define SVMLVLRIFG_L           (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1818
#define SVSMHDLYIFG_L          (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1819
#define SVMHIFG_L              (0x0020)       /* SVM high side interrupt flag */
1820
#define SVMHVLRIFG_L           (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1821
 
1822
/* PMMIFG Control Bits */
1823
#define PMMBORIFG_H            (0x0001)       /* PMM Software BOR interrupt flag */
1824
#define PMMRSTIFG_H            (0x0002)       /* PMM RESET pin interrupt flag */
1825
#define PMMPORIFG_H            (0x0004)       /* PMM Software POR interrupt flag */
1826
#define SVSHIFG_H              (0x0010)       /* SVS low side interrupt flag */
1827
#define SVSLIFG_H              (0x0020)       /* SVS high side interrupt flag */
1828
#define PMMLPM5IFG_H           (0x0080)       /* LPM5 indication Flag */
1829
 
1830
#define PMMRSTLPM5IFG          PMMLPM5IFG     /* LPM5 indication Flag */
1831
 
1832
/* PMMIE and RESET Control Bits */
1833
#define SVSMLDLYIE             (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1834
#define SVMLIE                 (0x0002)       /* SVM low side interrupt enable */
1835
#define SVMLVLRIE              (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1836
#define SVSMHDLYIE             (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1837
#define SVMHIE                 (0x0020)       /* SVM high side interrupt enable */
1838
#define SVMHVLRIE              (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1839
#define SVSLPE                 (0x0100)       /* SVS low side POR enable */
1840
#define SVMLVLRPE              (0x0200)       /* SVM low side Voltage Level reached POR enable */
1841
#define SVSHPE                 (0x1000)       /* SVS high side POR enable */
1842
#define SVMHVLRPE              (0x2000)       /* SVM high side Voltage Level reached POR enable */
1843
 
1844
/* PMMIE and RESET Control Bits */
1845
#define SVSMLDLYIE_L           (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1846
#define SVMLIE_L               (0x0002)       /* SVM low side interrupt enable */
1847
#define SVMLVLRIE_L            (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1848
#define SVSMHDLYIE_L           (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1849
#define SVMHIE_L               (0x0020)       /* SVM high side interrupt enable */
1850
#define SVMHVLRIE_L            (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1851
 
1852
/* PMMIE and RESET Control Bits */
1853
#define SVSLPE_H               (0x0001)       /* SVS low side POR enable */
1854
#define SVMLVLRPE_H            (0x0002)       /* SVM low side Voltage Level reached POR enable */
1855
#define SVSHPE_H               (0x0010)       /* SVS high side POR enable */
1856
#define SVMHVLRPE_H            (0x0020)       /* SVM high side Voltage Level reached POR enable */
1857
 
1858
/* PM5CTL0 Power Mode 5 Control Bits */
1859
#define LOCKLPM5               (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1860
 
1861
/* PM5CTL0 Power Mode 5 Control Bits */
1862
#define LOCKLPM5_L             (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1863
 
1864
/* PM5CTL0 Power Mode 5 Control Bits */
1865
#define LOCKIO                 LOCKLPM5       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1866
 
1867
/*************************************************************
1868
* RAM Control Module
1869
*************************************************************/
1870
#define __MSP430_HAS_RC__                     /* Definition to show that Module is available */
1871
#define __MSP430_BASEADDRESS_RC__ 0x0158
1872
 
1873
SFR_16BIT(RCCTL0);                            /* Ram Controller Control Register */
1874
SFR_8BIT(RCCTL0_L);                           /* Ram Controller Control Register */
1875
SFR_8BIT(RCCTL0_H);                           /* Ram Controller Control Register */
1876
 
1877
/* RCCTL0 Control Bits */
1878
#define RCRS0OFF               (0x0001)       /* RAM Controller RAM Sector 0 Off */
1879
#define RCRS1OFF               (0x0002)       /* RAM Controller RAM Sector 1 Off */
1880
#define RCRS2OFF               (0x0004)       /* RAM Controller RAM Sector 2 Off */
1881
#define RCRS3OFF               (0x0008)       /* RAM Controller RAM Sector 3 Off */
1882
#define RCRS7OFF               (0x0080)       /* RAM Controller RAM Sector 7 (USB) Off */
1883
 
1884
/* RCCTL0 Control Bits */
1885
#define RCRS0OFF_L             (0x0001)       /* RAM Controller RAM Sector 0 Off */
1886
#define RCRS1OFF_L             (0x0002)       /* RAM Controller RAM Sector 1 Off */
1887
#define RCRS2OFF_L             (0x0004)       /* RAM Controller RAM Sector 2 Off */
1888
#define RCRS3OFF_L             (0x0008)       /* RAM Controller RAM Sector 3 Off */
1889
#define RCRS7OFF_L             (0x0080)       /* RAM Controller RAM Sector 7 (USB) Off */
1890
 
1891
/* RCCTL0 Control Bits */
1892
 
1893
#define RCKEY                  (0x5A00)
1894
 
1895
/************************************************************
1896
* Shared Reference
1897
************************************************************/
1898
#define __MSP430_HAS_REF__                    /* Definition to show that Module is available */
1899
#define __MSP430_BASEADDRESS_REF__ 0x01B0
1900
 
1901
SFR_16BIT(REFCTL0);                           /* REF Shared Reference control register 0 */
1902
SFR_8BIT(REFCTL0_L);                          /* REF Shared Reference control register 0 */
1903
SFR_8BIT(REFCTL0_H);                          /* REF Shared Reference control register 0 */
1904
 
1905
/* REFCTL0 Control Bits */
1906
#define REFON                  (0x0001)       /* REF Reference On */
1907
#define REFOUT                 (0x0002)       /* REF Reference output Buffer On */
1908
//#define RESERVED            (0x0004)  /* Reserved */
1909
#define REFTCOFF               (0x0008)       /* REF Temp.Sensor off */
1910
#define REFVSEL0               (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
1911
#define REFVSEL1               (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
1912
//#define RESERVED            (0x0040)  /* Reserved */
1913
#define REFMSTR                (0x0080)       /* REF Master Control */
1914
#define REFGENACT              (0x0100)       /* REF Reference generator active */
1915
#define REFBGACT               (0x0200)       /* REF Reference bandgap active */
1916
#define REFGENBUSY             (0x0400)       /* REF Reference generator busy */
1917
#define BGMODE                 (0x0800)       /* REF Bandgap mode */
1918
//#define RESERVED            (0x1000)  /* Reserved */
1919
//#define RESERVED            (0x2000)  /* Reserved */
1920
//#define RESERVED            (0x4000)  /* Reserved */
1921
//#define RESERVED            (0x8000)  /* Reserved */
1922
 
1923
/* REFCTL0 Control Bits */
1924
#define REFON_L                (0x0001)       /* REF Reference On */
1925
#define REFOUT_L               (0x0002)       /* REF Reference output Buffer On */
1926
//#define RESERVED            (0x0004)  /* Reserved */
1927
#define REFTCOFF_L             (0x0008)       /* REF Temp.Sensor off */
1928
#define REFVSEL0_L             (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
1929
#define REFVSEL1_L             (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
1930
//#define RESERVED            (0x0040)  /* Reserved */
1931
#define REFMSTR_L              (0x0080)       /* REF Master Control */
1932
//#define RESERVED            (0x1000)  /* Reserved */
1933
//#define RESERVED            (0x2000)  /* Reserved */
1934
//#define RESERVED            (0x4000)  /* Reserved */
1935
//#define RESERVED            (0x8000)  /* Reserved */
1936
 
1937
/* REFCTL0 Control Bits */
1938
//#define RESERVED            (0x0004)  /* Reserved */
1939
//#define RESERVED            (0x0040)  /* Reserved */
1940
#define REFGENACT_H            (0x0001)       /* REF Reference generator active */
1941
#define REFBGACT_H             (0x0002)       /* REF Reference bandgap active */
1942
#define REFGENBUSY_H           (0x0004)       /* REF Reference generator busy */
1943
#define BGMODE_H               (0x0008)       /* REF Bandgap mode */
1944
//#define RESERVED            (0x1000)  /* Reserved */
1945
//#define RESERVED            (0x2000)  /* Reserved */
1946
//#define RESERVED            (0x4000)  /* Reserved */
1947
//#define RESERVED            (0x8000)  /* Reserved */
1948
 
1949
#define REFVSEL_0              (0x0000)       /* REF Reference Voltage Level Select 1.5V */
1950
#define REFVSEL_1              (0x0010)       /* REF Reference Voltage Level Select 2.0V */
1951
#define REFVSEL_2              (0x0020)       /* REF Reference Voltage Level Select 2.5V */
1952
#define REFVSEL_3              (0x0030)       /* REF Reference Voltage Level Select 2.5V */
1953
 
1954
/************************************************************
1955
* Real Time Clock
1956
************************************************************/
1957
#define __MSP430_HAS_RTC__                    /* Definition to show that Module is available */
1958
#define __MSP430_BASEADDRESS_RTC__ 0x04A0
1959
 
1960
SFR_16BIT(RTCCTL01);                          /* Real Timer Control 0/1 */
1961
SFR_8BIT(RTCCTL01_L);                         /* Real Timer Control 0/1 */
1962
SFR_8BIT(RTCCTL01_H);                         /* Real Timer Control 0/1 */
1963
SFR_16BIT(RTCCTL23);                          /* Real Timer Control 2/3 */
1964
SFR_8BIT(RTCCTL23_L);                         /* Real Timer Control 2/3 */
1965
SFR_8BIT(RTCCTL23_H);                         /* Real Timer Control 2/3 */
1966
SFR_16BIT(RTCPS0CTL);                         /* Real Timer Prescale Timer 0 Control */
1967
SFR_8BIT(RTCPS0CTL_L);                        /* Real Timer Prescale Timer 0 Control */
1968
SFR_8BIT(RTCPS0CTL_H);                        /* Real Timer Prescale Timer 0 Control */
1969
SFR_16BIT(RTCPS1CTL);                         /* Real Timer Prescale Timer 1 Control */
1970
SFR_8BIT(RTCPS1CTL_L);                        /* Real Timer Prescale Timer 1 Control */
1971
SFR_8BIT(RTCPS1CTL_H);                        /* Real Timer Prescale Timer 1 Control */
1972
SFR_16BIT(RTCPS);                             /* Real Timer Prescale Timer Control */
1973
SFR_8BIT(RTCPS_L);                            /* Real Timer Prescale Timer Control */
1974
SFR_8BIT(RTCPS_H);                            /* Real Timer Prescale Timer Control */
1975
SFR_16BIT(RTCIV);                             /* Real Time Clock Interrupt Vector */
1976
SFR_16BIT(RTCTIM0);                           /* Real Time Clock Time 0 */
1977
SFR_8BIT(RTCTIM0_L);                          /* Real Time Clock Time 0 */
1978
SFR_8BIT(RTCTIM0_H);                          /* Real Time Clock Time 0 */
1979
SFR_16BIT(RTCTIM1);                           /* Real Time Clock Time 1 */
1980
SFR_8BIT(RTCTIM1_L);                          /* Real Time Clock Time 1 */
1981
SFR_8BIT(RTCTIM1_H);                          /* Real Time Clock Time 1 */
1982
SFR_16BIT(RTCDATE);                           /* Real Time Clock Date */
1983
SFR_8BIT(RTCDATE_L);                          /* Real Time Clock Date */
1984
SFR_8BIT(RTCDATE_H);                          /* Real Time Clock Date */
1985
SFR_16BIT(RTCYEAR);                           /* Real Time Clock Year */
1986
SFR_8BIT(RTCYEAR_L);                          /* Real Time Clock Year */
1987
SFR_8BIT(RTCYEAR_H);                          /* Real Time Clock Year */
1988
SFR_16BIT(RTCAMINHR);                         /* Real Time Clock Alarm Min/Hour */
1989
SFR_8BIT(RTCAMINHR_L);                        /* Real Time Clock Alarm Min/Hour */
1990
SFR_8BIT(RTCAMINHR_H);                        /* Real Time Clock Alarm Min/Hour */
1991
SFR_16BIT(RTCADOWDAY);                        /* Real Time Clock Alarm day of week/day */
1992
SFR_8BIT(RTCADOWDAY_L);                       /* Real Time Clock Alarm day of week/day */
1993
SFR_8BIT(RTCADOWDAY_H);                       /* Real Time Clock Alarm day of week/day */
1994
 
1995
#define RTCCTL0                RTCCTL01_L     /* Real Time Clock Control 0 */
1996
#define RTCCTL1                RTCCTL01_H     /* Real Time Clock Control 1 */
1997
#define RTCCTL2                RTCCTL23_L     /* Real Time Clock Control 2 */
1998
#define RTCCTL3                RTCCTL23_H     /* Real Time Clock Control 3 */
1999
#define RTCNT12                RTCTIM0
2000
#define RTCNT34                RTCTIM1
2001
#define RTCNT1                 RTCTIM0_L
2002
#define RTCNT2                 RTCTIM0_H
2003
#define RTCNT3                 RTCTIM1_L
2004
#define RTCNT4                 RTCTIM1_H
2005
#define RTCSEC                 RTCTIM0_L
2006
#define RTCMIN                 RTCTIM0_H
2007
#define RTCHOUR                RTCTIM1_L
2008
#define RTCDOW                 RTCTIM1_H
2009
#define RTCDAY                 RTCDATE_L
2010
#define RTCMON                 RTCDATE_H
2011
#define RTCYEARL               RTCYEAR_L
2012
#define RTCYEARH               RTCYEAR_H
2013
#define RT0PS                  RTCPS_L
2014
#define RT1PS                  RTCPS_H
2015
#define RTCAMIN                RTCAMINHR_L    /* Real Time Clock Alarm Min */
2016
#define RTCAHOUR               RTCAMINHR_H    /* Real Time Clock Alarm Hour */
2017
#define RTCADOW                RTCADOWDAY_L   /* Real Time Clock Alarm day of week */
2018
#define RTCADAY                RTCADOWDAY_H   /* Real Time Clock Alarm day */
2019
 
2020
/* RTCCTL01 Control Bits */
2021
#define RTCBCD                 (0x8000)       /* RTC BCD  0:Binary / 1:BCD */
2022
#define RTCHOLD                (0x4000)       /* RTC Hold */
2023
#define RTCMODE                (0x2000)       /* RTC Mode 0:Counter / 1: Calendar */
2024
#define RTCRDY                 (0x1000)       /* RTC Ready */
2025
#define RTCSSEL1               (0x0800)       /* RTC Source Select 1 */
2026
#define RTCSSEL0               (0x0400)       /* RTC Source Select 0 */
2027
#define RTCTEV1                (0x0200)       /* RTC Time Event 1 */
2028
#define RTCTEV0                (0x0100)       /* RTC Time Event 0 */
2029
//#define Reserved          (0x0080)
2030
#define RTCTEVIE               (0x0040)       /* RTC Time Event Interrupt Enable Flag */
2031
#define RTCAIE                 (0x0020)       /* RTC Alarm Interrupt Enable Flag */
2032
#define RTCRDYIE               (0x0010)       /* RTC Ready Interrupt Enable Flag */
2033
//#define Reserved          (0x0008)
2034
#define RTCTEVIFG              (0x0004)       /* RTC Time Event Interrupt Flag */
2035
#define RTCAIFG                (0x0002)       /* RTC Alarm Interrupt Flag */
2036
#define RTCRDYIFG              (0x0001)       /* RTC Ready Interrupt Flag */
2037
 
2038
/* RTCCTL01 Control Bits */
2039
//#define Reserved          (0x0080)
2040
#define RTCTEVIE_L             (0x0040)       /* RTC Time Event Interrupt Enable Flag */
2041
#define RTCAIE_L               (0x0020)       /* RTC Alarm Interrupt Enable Flag */
2042
#define RTCRDYIE_L             (0x0010)       /* RTC Ready Interrupt Enable Flag */
2043
//#define Reserved          (0x0008)
2044
#define RTCTEVIFG_L            (0x0004)       /* RTC Time Event Interrupt Flag */
2045
#define RTCAIFG_L              (0x0002)       /* RTC Alarm Interrupt Flag */
2046
#define RTCRDYIFG_L            (0x0001)       /* RTC Ready Interrupt Flag */
2047
 
2048
/* RTCCTL01 Control Bits */
2049
#define RTCBCD_H               (0x0080)       /* RTC BCD  0:Binary / 1:BCD */
2050
#define RTCHOLD_H              (0x0040)       /* RTC Hold */
2051
#define RTCMODE_H              (0x0020)       /* RTC Mode 0:Counter / 1: Calendar */
2052
#define RTCRDY_H               (0x0010)       /* RTC Ready */
2053
#define RTCSSEL1_H             (0x0008)       /* RTC Source Select 1 */
2054
#define RTCSSEL0_H             (0x0004)       /* RTC Source Select 0 */
2055
#define RTCTEV1_H              (0x0002)       /* RTC Time Event 1 */
2056
#define RTCTEV0_H              (0x0001)       /* RTC Time Event 0 */
2057
//#define Reserved          (0x0080)
2058
//#define Reserved          (0x0008)
2059
 
2060
#define RTCSSEL_0              (0x0000)       /* RTC Source Select ACLK */
2061
#define RTCSSEL_1              (0x0400)       /* RTC Source Select SMCLK */
2062
#define RTCSSEL_2              (0x0800)       /* RTC Source Select RT1PS */
2063
#define RTCSSEL_3              (0x0C00)       /* RTC Source Select RT1PS */
2064
#define RTCSSEL__ACLK          (0x0000)       /* RTC Source Select ACLK */
2065
#define RTCSSEL__SMCLK         (0x0400)       /* RTC Source Select SMCLK */
2066
#define RTCSSEL__RT1PS         (0x0800)       /* RTC Source Select RT1PS */
2067
#define RTCTEV_0               (0x0000)       /* RTC Time Event: 0 (Min. changed) */
2068
#define RTCTEV_1               (0x0100)       /* RTC Time Event: 1 (Hour changed) */
2069
#define RTCTEV_2               (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
2070
#define RTCTEV_3               (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
2071
#define RTCTEV__MIN            (0x0000)       /* RTC Time Event: 0 (Min. changed) */
2072
#define RTCTEV__HOUR           (0x0100)       /* RTC Time Event: 1 (Hour changed) */
2073
#define RTCTEV__1200           (0x0200)       /* RTC Time Event: 2 (12:00 changed) */
2074
#define RTCTEV__0000           (0x0300)       /* RTC Time Event: 3 (00:00 changed) */
2075
 
2076
/* RTCCTL23 Control Bits */
2077
#define RTCCALF1               (0x0200)       /* RTC Calibration Frequency Bit 1 */
2078
#define RTCCALF0               (0x0100)       /* RTC Calibration Frequency Bit 0 */
2079
#define RTCCALS                (0x0080)       /* RTC Calibration Sign */
2080
//#define Reserved          (0x0040)
2081
#define RTCCAL5                (0x0020)       /* RTC Calibration Bit 5 */
2082
#define RTCCAL4                (0x0010)       /* RTC Calibration Bit 4 */
2083
#define RTCCAL3                (0x0008)       /* RTC Calibration Bit 3 */
2084
#define RTCCAL2                (0x0004)       /* RTC Calibration Bit 2 */
2085
#define RTCCAL1                (0x0002)       /* RTC Calibration Bit 1 */
2086
#define RTCCAL0                (0x0001)       /* RTC Calibration Bit 0 */
2087
 
2088
/* RTCCTL23 Control Bits */
2089
#define RTCCALS_L              (0x0080)       /* RTC Calibration Sign */
2090
//#define Reserved          (0x0040)
2091
#define RTCCAL5_L              (0x0020)       /* RTC Calibration Bit 5 */
2092
#define RTCCAL4_L              (0x0010)       /* RTC Calibration Bit 4 */
2093
#define RTCCAL3_L              (0x0008)       /* RTC Calibration Bit 3 */
2094
#define RTCCAL2_L              (0x0004)       /* RTC Calibration Bit 2 */
2095
#define RTCCAL1_L              (0x0002)       /* RTC Calibration Bit 1 */
2096
#define RTCCAL0_L              (0x0001)       /* RTC Calibration Bit 0 */
2097
 
2098
/* RTCCTL23 Control Bits */
2099
#define RTCCALF1_H             (0x0002)       /* RTC Calibration Frequency Bit 1 */
2100
#define RTCCALF0_H             (0x0001)       /* RTC Calibration Frequency Bit 0 */
2101
//#define Reserved          (0x0040)
2102
 
2103
#define RTCCALF_0              (0x0000)       /* RTC Calibration Frequency: No Output */
2104
#define RTCCALF_1              (0x0100)       /* RTC Calibration Frequency: 512 Hz */
2105
#define RTCCALF_2              (0x0200)       /* RTC Calibration Frequency: 256 Hz */
2106
#define RTCCALF_3              (0x0300)       /* RTC Calibration Frequency: 1 Hz */
2107
 
2108
/* RTCPS0CTL Control Bits */
2109
//#define Reserved          (0x8000)
2110
#define RT0SSEL                (0x4000)       /* RTC Prescale Timer 0 Source Select 0:ACLK / 1:SMCLK */
2111
#define RT0PSDIV2              (0x2000)       /* RTC Prescale Timer 0 Clock Divide Bit: 2 */
2112
#define RT0PSDIV1              (0x1000)       /* RTC Prescale Timer 0 Clock Divide Bit: 1 */
2113
#define RT0PSDIV0              (0x0800)       /* RTC Prescale Timer 0 Clock Divide Bit: 0 */
2114
//#define Reserved          (0x0400)
2115
//#define Reserved          (0x0200)
2116
#define RT0PSHOLD              (0x0100)       /* RTC Prescale Timer 0 Hold */
2117
//#define Reserved          (0x0080)
2118
//#define Reserved          (0x0040)
2119
//#define Reserved          (0x0020)
2120
#define RT0IP2                 (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
2121
#define RT0IP1                 (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
2122
#define RT0IP0                 (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
2123
#define RT0PSIE                (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
2124
#define RT0PSIFG               (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
2125
 
2126
/* RTCPS0CTL Control Bits */
2127
//#define Reserved          (0x8000)
2128
//#define Reserved          (0x0400)
2129
//#define Reserved          (0x0200)
2130
//#define Reserved          (0x0080)
2131
//#define Reserved          (0x0040)
2132
//#define Reserved          (0x0020)
2133
#define RT0IP2_L               (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 2 */
2134
#define RT0IP1_L               (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 1 */
2135
#define RT0IP0_L               (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval Bit: 0 */
2136
#define RT0PSIE_L              (0x0002)       /* RTC Prescale Timer 0 Interrupt Enable Flag */
2137
#define RT0PSIFG_L             (0x0001)       /* RTC Prescale Timer 0 Interrupt Flag */
2138
 
2139
/* RTCPS0CTL Control Bits */
2140
//#define Reserved          (0x8000)
2141
#define RT0SSEL_H              (0x0040)       /* RTC Prescale Timer 0 Source Select 0:ACLK / 1:SMCLK */
2142
#define RT0PSDIV2_H            (0x0020)       /* RTC Prescale Timer 0 Clock Divide Bit: 2 */
2143
#define RT0PSDIV1_H            (0x0010)       /* RTC Prescale Timer 0 Clock Divide Bit: 1 */
2144
#define RT0PSDIV0_H            (0x0008)       /* RTC Prescale Timer 0 Clock Divide Bit: 0 */
2145
//#define Reserved          (0x0400)
2146
//#define Reserved          (0x0200)
2147
#define RT0PSHOLD_H            (0x0001)       /* RTC Prescale Timer 0 Hold */
2148
//#define Reserved          (0x0080)
2149
//#define Reserved          (0x0040)
2150
//#define Reserved          (0x0020)
2151
 
2152
#define RT0IP_0                (0x0000)       /* RTC Prescale Timer 0 Interrupt Interval /2 */
2153
#define RT0IP_1                (0x0004)       /* RTC Prescale Timer 0 Interrupt Interval /4 */
2154
#define RT0IP_2                (0x0008)       /* RTC Prescale Timer 0 Interrupt Interval /8 */
2155
#define RT0IP_3                (0x000C)       /* RTC Prescale Timer 0 Interrupt Interval /16 */
2156
#define RT0IP_4                (0x0010)       /* RTC Prescale Timer 0 Interrupt Interval /32 */
2157
#define RT0IP_5                (0x0014)       /* RTC Prescale Timer 0 Interrupt Interval /64 */
2158
#define RT0IP_6                (0x0018)       /* RTC Prescale Timer 0 Interrupt Interval /128 */
2159
#define RT0IP_7                (0x001C)       /* RTC Prescale Timer 0 Interrupt Interval /256 */
2160
 
2161
#define RT0PSDIV_0             (0x0000)       /* RTC Prescale Timer 0 Clock Divide /2 */
2162
#define RT0PSDIV_1             (0x0800)       /* RTC Prescale Timer 0 Clock Divide /4 */
2163
#define RT0PSDIV_2             (0x1000)       /* RTC Prescale Timer 0 Clock Divide /8 */
2164
#define RT0PSDIV_3             (0x1800)       /* RTC Prescale Timer 0 Clock Divide /16 */
2165
#define RT0PSDIV_4             (0x2000)       /* RTC Prescale Timer 0 Clock Divide /32 */
2166
#define RT0PSDIV_5             (0x2800)       /* RTC Prescale Timer 0 Clock Divide /64 */
2167
#define RT0PSDIV_6             (0x3000)       /* RTC Prescale Timer 0 Clock Divide /128 */
2168
#define RT0PSDIV_7             (0x3800)       /* RTC Prescale Timer 0 Clock Divide /256 */
2169
 
2170
/* RTCPS1CTL Control Bits */
2171
#define RT1SSEL1               (0x8000)       /* RTC Prescale Timer 1 Source Select Bit 1 */
2172
#define RT1SSEL0               (0x4000)       /* RTC Prescale Timer 1 Source Select Bit 0 */
2173
#define RT1PSDIV2              (0x2000)       /* RTC Prescale Timer 1 Clock Divide Bit: 2 */
2174
#define RT1PSDIV1              (0x1000)       /* RTC Prescale Timer 1 Clock Divide Bit: 1 */
2175
#define RT1PSDIV0              (0x0800)       /* RTC Prescale Timer 1 Clock Divide Bit: 0 */
2176
//#define Reserved          (0x0400)
2177
//#define Reserved          (0x0200)
2178
#define RT1PSHOLD              (0x0100)       /* RTC Prescale Timer 1 Hold */
2179
//#define Reserved          (0x0080)
2180
//#define Reserved          (0x0040)
2181
//#define Reserved          (0x0020)
2182
#define RT1IP2                 (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
2183
#define RT1IP1                 (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
2184
#define RT1IP0                 (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
2185
#define RT1PSIE                (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
2186
#define RT1PSIFG               (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
2187
 
2188
/* RTCPS1CTL Control Bits */
2189
//#define Reserved          (0x0400)
2190
//#define Reserved          (0x0200)
2191
//#define Reserved          (0x0080)
2192
//#define Reserved          (0x0040)
2193
//#define Reserved          (0x0020)
2194
#define RT1IP2_L               (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 2 */
2195
#define RT1IP1_L               (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 1 */
2196
#define RT1IP0_L               (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval Bit: 0 */
2197
#define RT1PSIE_L              (0x0002)       /* RTC Prescale Timer 1 Interrupt Enable Flag */
2198
#define RT1PSIFG_L             (0x0001)       /* RTC Prescale Timer 1 Interrupt Flag */
2199
 
2200
/* RTCPS1CTL Control Bits */
2201
#define RT1SSEL1_H             (0x0080)       /* RTC Prescale Timer 1 Source Select Bit 1 */
2202
#define RT1SSEL0_H             (0x0040)       /* RTC Prescale Timer 1 Source Select Bit 0 */
2203
#define RT1PSDIV2_H            (0x0020)       /* RTC Prescale Timer 1 Clock Divide Bit: 2 */
2204
#define RT1PSDIV1_H            (0x0010)       /* RTC Prescale Timer 1 Clock Divide Bit: 1 */
2205
#define RT1PSDIV0_H            (0x0008)       /* RTC Prescale Timer 1 Clock Divide Bit: 0 */
2206
//#define Reserved          (0x0400)
2207
//#define Reserved          (0x0200)
2208
#define RT1PSHOLD_H            (0x0001)       /* RTC Prescale Timer 1 Hold */
2209
//#define Reserved          (0x0080)
2210
//#define Reserved          (0x0040)
2211
//#define Reserved          (0x0020)
2212
 
2213
#define RT1IP_0                (0x0000)       /* RTC Prescale Timer 1 Interrupt Interval /2 */
2214
#define RT1IP_1                (0x0004)       /* RTC Prescale Timer 1 Interrupt Interval /4 */
2215
#define RT1IP_2                (0x0008)       /* RTC Prescale Timer 1 Interrupt Interval /8 */
2216
#define RT1IP_3                (0x000C)       /* RTC Prescale Timer 1 Interrupt Interval /16 */
2217
#define RT1IP_4                (0x0010)       /* RTC Prescale Timer 1 Interrupt Interval /32 */
2218
#define RT1IP_5                (0x0014)       /* RTC Prescale Timer 1 Interrupt Interval /64 */
2219
#define RT1IP_6                (0x0018)       /* RTC Prescale Timer 1 Interrupt Interval /128 */
2220
#define RT1IP_7                (0x001C)       /* RTC Prescale Timer 1 Interrupt Interval /256 */
2221
 
2222
#define RT1PSDIV_0             (0x0000)       /* RTC Prescale Timer 1 Clock Divide /2 */
2223
#define RT1PSDIV_1             (0x0800)       /* RTC Prescale Timer 1 Clock Divide /4 */
2224
#define RT1PSDIV_2             (0x1000)       /* RTC Prescale Timer 1 Clock Divide /8 */
2225
#define RT1PSDIV_3             (0x1800)       /* RTC Prescale Timer 1 Clock Divide /16 */
2226
#define RT1PSDIV_4             (0x2000)       /* RTC Prescale Timer 1 Clock Divide /32 */
2227
#define RT1PSDIV_5             (0x2800)       /* RTC Prescale Timer 1 Clock Divide /64 */
2228
#define RT1PSDIV_6             (0x3000)       /* RTC Prescale Timer 1 Clock Divide /128 */
2229
#define RT1PSDIV_7             (0x3800)       /* RTC Prescale Timer 1 Clock Divide /256 */
2230
 
2231
#define RT1SSEL_0              (0x0000)       /* RTC Prescale Timer Source Select ACLK */
2232
#define RT1SSEL_1              (0x4000)       /* RTC Prescale Timer Source Select SMCLK */
2233
#define RT1SSEL_2              (0x8000)       /* RTC Prescale Timer Source Select RT0PS */
2234
#define RT1SSEL_3              (0xC000)       /* RTC Prescale Timer Source Select RT0PS */
2235
 
2236
/* RTC Definitions */
2237
#define RTCIV_NONE             (0x0000)       /* No Interrupt pending */
2238
#define RTCIV_RTCRDYIFG        (0x0002)       /* RTC ready: RTCRDYIFG */
2239
#define RTCIV_RTCTEVIFG        (0x0004)       /* RTC interval timer: RTCTEVIFG */
2240
#define RTCIV_RTCAIFG          (0x0006)       /* RTC user alarm: RTCAIFG */
2241
#define RTCIV_RT0PSIFG         (0x0008)       /* RTC prescaler 0: RT0PSIFG */
2242
#define RTCIV_RT1PSIFG         (0x000A)       /* RTC prescaler 1: RT1PSIFG */
2243
 
2244
/* Legacy Definitions */
2245
#define RTC_NONE               (0x0000)       /* No Interrupt pending */
2246
#define RTC_RTCRDYIFG          (0x0002)       /* RTC ready: RTCRDYIFG */
2247
#define RTC_RTCTEVIFG          (0x0004)       /* RTC interval timer: RTCTEVIFG */
2248
#define RTC_RTCAIFG            (0x0006)       /* RTC user alarm: RTCAIFG */
2249
#define RTC_RT0PSIFG           (0x0008)       /* RTC prescaler 0: RT0PSIFG */
2250
#define RTC_RT1PSIFG           (0x000A)       /* RTC prescaler 1: RT1PSIFG */
2251
 
2252
/************************************************************
2253
* SFR - Special Function Register Module
2254
************************************************************/
2255
#define __MSP430_HAS_SFR__                    /* Definition to show that Module is available */
2256
#define __MSP430_BASEADDRESS_SFR__ 0x0100
2257
 
2258
SFR_16BIT(SFRIE1);                            /* Interrupt Enable 1 */
2259
SFR_8BIT(SFRIE1_L);                           /* Interrupt Enable 1 */
2260
SFR_8BIT(SFRIE1_H);                           /* Interrupt Enable 1 */
2261
 
2262
/* SFRIE1 Control Bits */
2263
#define WDTIE                  (0x0001)       /* WDT Interrupt Enable */
2264
#define OFIE                   (0x0002)       /* Osc Fault Enable */
2265
//#define Reserved          (0x0004)
2266
#define VMAIE                  (0x0008)       /* Vacant Memory Interrupt Enable */
2267
#define NMIIE                  (0x0010)       /* NMI Interrupt Enable */
2268
#define ACCVIE                 (0x0020)       /* Flash Access Violation Interrupt Enable */
2269
#define JMBINIE                (0x0040)       /* JTAG Mail Box input Interrupt Enable */
2270
#define JMBOUTIE               (0x0080)       /* JTAG Mail Box output Interrupt Enable */
2271
 
2272
#define WDTIE_L                (0x0001)       /* WDT Interrupt Enable */
2273
#define OFIE_L                 (0x0002)       /* Osc Fault Enable */
2274
//#define Reserved          (0x0004)
2275
#define VMAIE_L                (0x0008)       /* Vacant Memory Interrupt Enable */
2276
#define NMIIE_L                (0x0010)       /* NMI Interrupt Enable */
2277
#define ACCVIE_L               (0x0020)       /* Flash Access Violation Interrupt Enable */
2278
#define JMBINIE_L              (0x0040)       /* JTAG Mail Box input Interrupt Enable */
2279
#define JMBOUTIE_L             (0x0080)       /* JTAG Mail Box output Interrupt Enable */
2280
 
2281
//#define Reserved          (0x0004)
2282
 
2283
SFR_16BIT(SFRIFG1);                           /* Interrupt Flag 1 */
2284
SFR_8BIT(SFRIFG1_L);                          /* Interrupt Flag 1 */
2285
SFR_8BIT(SFRIFG1_H);                          /* Interrupt Flag 1 */
2286
/* SFRIFG1 Control Bits */
2287
#define WDTIFG                 (0x0001)       /* WDT Interrupt Flag */
2288
#define OFIFG                  (0x0002)       /* Osc Fault Flag */
2289
//#define Reserved          (0x0004)
2290
#define VMAIFG                 (0x0008)       /* Vacant Memory Interrupt Flag */
2291
#define NMIIFG                 (0x0010)       /* NMI Interrupt Flag */
2292
//#define Reserved          (0x0020)
2293
#define JMBINIFG               (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2294
#define JMBOUTIFG              (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2295
 
2296
#define WDTIFG_L               (0x0001)       /* WDT Interrupt Flag */
2297
#define OFIFG_L                (0x0002)       /* Osc Fault Flag */
2298
//#define Reserved          (0x0004)
2299
#define VMAIFG_L               (0x0008)       /* Vacant Memory Interrupt Flag */
2300
#define NMIIFG_L               (0x0010)       /* NMI Interrupt Flag */
2301
//#define Reserved          (0x0020)
2302
#define JMBINIFG_L             (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2303
#define JMBOUTIFG_L            (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2304
 
2305
//#define Reserved          (0x0004)
2306
//#define Reserved          (0x0020)
2307
 
2308
SFR_16BIT(SFRRPCR);                           /* RESET Pin Control Register */
2309
SFR_8BIT(SFRRPCR_L);                          /* RESET Pin Control Register */
2310
SFR_8BIT(SFRRPCR_H);                          /* RESET Pin Control Register */
2311
/* SFRRPCR Control Bits */
2312
#define SYSNMI                 (0x0001)       /* NMI select */
2313
#define SYSNMIIES              (0x0002)       /* NMI edge select */
2314
#define SYSRSTUP               (0x0004)       /* RESET Pin pull down/up select */
2315
#define SYSRSTRE               (0x0008)       /* RESET Pin Resistor enable */
2316
 
2317
#define SYSNMI_L               (0x0001)       /* NMI select */
2318
#define SYSNMIIES_L            (0x0002)       /* NMI edge select */
2319
#define SYSRSTUP_L             (0x0004)       /* RESET Pin pull down/up select */
2320
#define SYSRSTRE_L             (0x0008)       /* RESET Pin Resistor enable */
2321
 
2322
/************************************************************
2323
* SYS - System Module
2324
************************************************************/
2325
#define __MSP430_HAS_SYS__                    /* Definition to show that Module is available */
2326
#define __MSP430_BASEADDRESS_SYS__ 0x0180
2327
 
2328
SFR_16BIT(SYSCTL);                            /* System control */
2329
SFR_8BIT(SYSCTL_L);                           /* System control */
2330
SFR_8BIT(SYSCTL_H);                           /* System control */
2331
SFR_16BIT(SYSBSLC);                           /* Boot strap configuration area */
2332
SFR_8BIT(SYSBSLC_L);                          /* Boot strap configuration area */
2333
SFR_8BIT(SYSBSLC_H);                          /* Boot strap configuration area */
2334
SFR_16BIT(SYSJMBC);                           /* JTAG mailbox control */
2335
SFR_8BIT(SYSJMBC_L);                          /* JTAG mailbox control */
2336
SFR_8BIT(SYSJMBC_H);                          /* JTAG mailbox control */
2337
SFR_16BIT(SYSJMBI0);                          /* JTAG mailbox input 0 */
2338
SFR_8BIT(SYSJMBI0_L);                         /* JTAG mailbox input 0 */
2339
SFR_8BIT(SYSJMBI0_H);                         /* JTAG mailbox input 0 */
2340
SFR_16BIT(SYSJMBI1);                          /* JTAG mailbox input 1 */
2341
SFR_8BIT(SYSJMBI1_L);                         /* JTAG mailbox input 1 */
2342
SFR_8BIT(SYSJMBI1_H);                         /* JTAG mailbox input 1 */
2343
SFR_16BIT(SYSJMBO0);                          /* JTAG mailbox output 0 */
2344
SFR_8BIT(SYSJMBO0_L);                         /* JTAG mailbox output 0 */
2345
SFR_8BIT(SYSJMBO0_H);                         /* JTAG mailbox output 0 */
2346
SFR_16BIT(SYSJMBO1);                          /* JTAG mailbox output 1 */
2347
SFR_8BIT(SYSJMBO1_L);                         /* JTAG mailbox output 1 */
2348
SFR_8BIT(SYSJMBO1_H);                         /* JTAG mailbox output 1 */
2349
 
2350
SFR_16BIT(SYSBERRIV);                         /* Bus Error vector generator */
2351
SFR_8BIT(SYSBERRIV_L);                        /* Bus Error vector generator */
2352
SFR_8BIT(SYSBERRIV_H);                        /* Bus Error vector generator */
2353
SFR_16BIT(SYSUNIV);                           /* User NMI vector generator */
2354
SFR_8BIT(SYSUNIV_L);                          /* User NMI vector generator */
2355
SFR_8BIT(SYSUNIV_H);                          /* User NMI vector generator */
2356
SFR_16BIT(SYSSNIV);                           /* System NMI vector generator */
2357
SFR_8BIT(SYSSNIV_L);                          /* System NMI vector generator */
2358
SFR_8BIT(SYSSNIV_H);                          /* System NMI vector generator */
2359
SFR_16BIT(SYSRSTIV);                          /* Reset vector generator */
2360
SFR_8BIT(SYSRSTIV_L);                         /* Reset vector generator */
2361
SFR_8BIT(SYSRSTIV_H);                         /* Reset vector generator */
2362
 
2363
/* SYSCTL Control Bits */
2364
#define SYSRIVECT              (0x0001)       /* SYS - RAM based interrupt vectors */
2365
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2366
#define SYSPMMPE               (0x0004)       /* SYS - PMM access protect */
2367
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2368
#define SYSBSLIND              (0x0010)       /* SYS - TCK/RST indication detected */
2369
#define SYSJTAGPIN             (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2370
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2371
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2372
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2373
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2374
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2375
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2376
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2377
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2378
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2379
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2380
 
2381
/* SYSCTL Control Bits */
2382
#define SYSRIVECT_L            (0x0001)       /* SYS - RAM based interrupt vectors */
2383
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2384
#define SYSPMMPE_L             (0x0004)       /* SYS - PMM access protect */
2385
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2386
#define SYSBSLIND_L            (0x0010)       /* SYS - TCK/RST indication detected */
2387
#define SYSJTAGPIN_L           (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2388
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2389
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2390
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2391
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2392
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2393
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2394
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2395
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2396
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2397
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2398
 
2399
/* SYSCTL Control Bits */
2400
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2401
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2402
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2403
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2404
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2405
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2406
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2407
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2408
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2409
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2410
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2411
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2412
 
2413
/* SYSBSLC Control Bits */
2414
#define SYSBSLSIZE0            (0x0001)       /* SYS - BSL Protection Size 0 */
2415
#define SYSBSLSIZE1            (0x0002)       /* SYS - BSL Protection Size 1 */
2416
#define SYSBSLR                (0x0004)       /* SYS - RAM assigned to BSL */
2417
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2418
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2419
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2420
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2421
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2422
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2423
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2424
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2425
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2426
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2427
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2428
#define SYSBSLOFF              (0x4000)       /* SYS - BSL Memeory disabled */
2429
#define SYSBSLPE               (0x8000)       /* SYS - BSL Memory protection enabled */
2430
 
2431
/* SYSBSLC Control Bits */
2432
#define SYSBSLSIZE0_L          (0x0001)       /* SYS - BSL Protection Size 0 */
2433
#define SYSBSLSIZE1_L          (0x0002)       /* SYS - BSL Protection Size 1 */
2434
#define SYSBSLR_L              (0x0004)       /* SYS - RAM assigned to BSL */
2435
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2436
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2437
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2438
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2439
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2440
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2441
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2442
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2443
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2444
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2445
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2446
 
2447
/* SYSBSLC Control Bits */
2448
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2449
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2450
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2451
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2452
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2453
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2454
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2455
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2456
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2457
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2458
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2459
#define SYSBSLOFF_H            (0x0040)       /* SYS - BSL Memeory disabled */
2460
#define SYSBSLPE_H             (0x0080)       /* SYS - BSL Memory protection enabled */
2461
 
2462
/* SYSJMBC Control Bits */
2463
#define JMBIN0FG               (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2464
#define JMBIN1FG               (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2465
#define JMBOUT0FG              (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2466
#define JMBOUT1FG              (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2467
#define JMBMODE                (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2468
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2469
#define JMBCLR0OFF             (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2470
#define JMBCLR1OFF             (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
2471
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2472
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2473
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2474
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2475
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2476
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2477
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2478
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2479
 
2480
/* SYSJMBC Control Bits */
2481
#define JMBIN0FG_L             (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2482
#define JMBIN1FG_L             (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2483
#define JMBOUT0FG_L            (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2484
#define JMBOUT1FG_L            (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2485
#define JMBMODE_L              (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2486
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2487
#define JMBCLR0OFF_L           (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2488
#define JMBCLR1OFF_L           (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
2489
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2490
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2491
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2492
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2493
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2494
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2495
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2496
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2497
 
2498
/* SYSJMBC Control Bits */
2499
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2500
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2501
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2502
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2503
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2504
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2505
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2506
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2507
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2508
 
2509
/* SYSUNIV Definitions */
2510
#define SYSUNIV_NONE           (0x0000)       /* No Interrupt pending */
2511
#define SYSUNIV_NMIIFG         (0x0002)       /* SYSUNIV : NMIIFG */
2512
#define SYSUNIV_OFIFG          (0x0004)       /* SYSUNIV : Osc. Fail - OFIFG */
2513
#define SYSUNIV_ACCVIFG        (0x0006)       /* SYSUNIV : Access Violation - ACCVIFG */
2514
#define SYSUNIV_BUSIFG         (0x0008)       /* SYSUNIV : Bus Error */
2515
#define SYSUNIV_SYSBUSIV       (0x0008)       /* SYSUNIV : Bus Error - SYSBERRIFG (legacy) */
2516
 
2517
/* SYSSNIV Definitions */
2518
#define SYSSNIV_NONE           (0x0000)       /* No Interrupt pending */
2519
#define SYSSNIV_SVMLIFG        (0x0002)       /* SYSSNIV : SVMLIFG */
2520
#define SYSSNIV_SVMHIFG        (0x0004)       /* SYSSNIV : SVMHIFG */
2521
#define SYSSNIV_DLYLIFG        (0x0006)       /* SYSSNIV : DLYLIFG */
2522
#define SYSSNIV_DLYHIFG        (0x0008)       /* SYSSNIV : DLYHIFG */
2523
#define SYSSNIV_VMAIFG         (0x000A)       /* SYSSNIV : VMAIFG */
2524
#define SYSSNIV_JMBINIFG       (0x000C)       /* SYSSNIV : JMBINIFG */
2525
#define SYSSNIV_JMBOUTIFG      (0x000E)       /* SYSSNIV : JMBOUTIFG */
2526
#define SYSSNIV_VLRLIFG        (0x0010)       /* SYSSNIV : VLRLIFG */
2527
#define SYSSNIV_VLRHIFG        (0x0012)       /* SYSSNIV : VLRHIFG */
2528
 
2529
/* SYSRSTIV Definitions */
2530
#define SYSRSTIV_NONE          (0x0000)       /* No Interrupt pending */
2531
#define SYSRSTIV_BOR           (0x0002)       /* SYSRSTIV : BOR */
2532
#define SYSRSTIV_RSTNMI        (0x0004)       /* SYSRSTIV : RST/NMI */
2533
#define SYSRSTIV_DOBOR         (0x0006)       /* SYSRSTIV : Do BOR */
2534
#define SYSRSTIV_LPM5WU        (0x0008)       /* SYSRSTIV : Port LPM5 Wake Up */
2535
#define SYSRSTIV_SECYV         (0x000A)       /* SYSRSTIV : Security violation */
2536
#define SYSRSTIV_SVSL          (0x000C)       /* SYSRSTIV : SVSL */
2537
#define SYSRSTIV_SVSH          (0x000E)       /* SYSRSTIV : SVSH */
2538
#define SYSRSTIV_SVML_OVP      (0x0010)       /* SYSRSTIV : SVML_OVP */
2539
#define SYSRSTIV_SVMH_OVP      (0x0012)       /* SYSRSTIV : SVMH_OVP */
2540
#define SYSRSTIV_DOPOR         (0x0014)       /* SYSRSTIV : Do POR */
2541
#define SYSRSTIV_WDTTO         (0x0016)       /* SYSRSTIV : WDT Time out */
2542
#define SYSRSTIV_WDTKEY        (0x0018)       /* SYSRSTIV : WDTKEY violation */
2543
#define SYSRSTIV_KEYV          (0x001A)       /* SYSRSTIV : Flash Key violation */
2544
#define SYSRSTIV_FLLUL         (0x001C)       /* SYSRSTIV : FLL unlock */
2545
#define SYSRSTIV_PERF          (0x001E)       /* SYSRSTIV : peripheral/config area fetch */
2546
#define SYSRSTIV_PMMKEY        (0x0020)       /* SYSRSTIV : PMMKEY violation */
2547
 
2548
/************************************************************
2549
* Timer0_A5
2550
************************************************************/
2551
#define __MSP430_HAS_T0A5__                   /* Definition to show that Module is available */
2552
#define __MSP430_BASEADDRESS_T0A5__ 0x0340
2553
 
2554
SFR_16BIT(TA0CTL);                            /* Timer0_A5 Control */
2555
SFR_16BIT(TA0CCTL0);                          /* Timer0_A5 Capture/Compare Control 0 */
2556
SFR_16BIT(TA0CCTL1);                          /* Timer0_A5 Capture/Compare Control 1 */
2557
SFR_16BIT(TA0CCTL2);                          /* Timer0_A5 Capture/Compare Control 2 */
2558
SFR_16BIT(TA0CCTL3);                          /* Timer0_A5 Capture/Compare Control 3 */
2559
SFR_16BIT(TA0CCTL4);                          /* Timer0_A5 Capture/Compare Control 4 */
2560
SFR_16BIT(TA0R);                              /* Timer0_A5 */
2561
SFR_16BIT(TA0CCR0);                           /* Timer0_A5 Capture/Compare 0 */
2562
SFR_16BIT(TA0CCR1);                           /* Timer0_A5 Capture/Compare 1 */
2563
SFR_16BIT(TA0CCR2);                           /* Timer0_A5 Capture/Compare 2 */
2564
SFR_16BIT(TA0CCR3);                           /* Timer0_A5 Capture/Compare 3 */
2565
SFR_16BIT(TA0CCR4);                           /* Timer0_A5 Capture/Compare 4 */
2566
SFR_16BIT(TA0IV);                             /* Timer0_A5 Interrupt Vector Word */
2567
SFR_16BIT(TA0EX0);                            /* Timer0_A5 Expansion Register 0 */
2568
 
2569
/* TAxCTL Control Bits */
2570
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
2571
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
2572
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
2573
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
2574
#define MC1                    (0x0020)       /* Timer A mode control 1 */
2575
#define MC0                    (0x0010)       /* Timer A mode control 0 */
2576
#define TACLR                  (0x0004)       /* Timer A counter clear */
2577
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
2578
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
2579
 
2580
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
2581
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2582
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2583
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2584
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
2585
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
2586
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
2587
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
2588
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2589
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2590
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2591
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2592
#define MC__STOP               (0*0x10u)      /* Timer A mode control: 0 - Stop */
2593
#define MC__UP                 (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2594
#define MC__CONTINOUS          (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2595
#define MC__UPDOWN             (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2596
#define ID__1                  (0*0x40u)      /* Timer A input divider: 0 - /1 */
2597
#define ID__2                  (1*0x40u)      /* Timer A input divider: 1 - /2 */
2598
#define ID__4                  (2*0x40u)      /* Timer A input divider: 2 - /4 */
2599
#define ID__8                  (3*0x40u)      /* Timer A input divider: 3 - /8 */
2600
#define TASSEL__TACLK          (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2601
#define TASSEL__ACLK           (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2602
#define TASSEL__SMCLK          (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2603
#define TASSEL__INCLK          (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2604
 
2605
/* TAxCCTLx Control Bits */
2606
#define CM1                    (0x8000)       /* Capture mode 1 */
2607
#define CM0                    (0x4000)       /* Capture mode 0 */
2608
#define CCIS1                  (0x2000)       /* Capture input select 1 */
2609
#define CCIS0                  (0x1000)       /* Capture input select 0 */
2610
#define SCS                    (0x0800)       /* Capture sychronize */
2611
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
2612
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
2613
#define OUTMOD2                (0x0080)       /* Output mode 2 */
2614
#define OUTMOD1                (0x0040)       /* Output mode 1 */
2615
#define OUTMOD0                (0x0020)       /* Output mode 0 */
2616
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
2617
#define CCI                    (0x0008)       /* Capture input signal (read) */
2618
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
2619
#define COV                    (0x0002)       /* Capture/compare overflow flag */
2620
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
2621
 
2622
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
2623
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
2624
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
2625
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
2626
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
2627
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
2628
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
2629
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
2630
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
2631
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
2632
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
2633
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
2634
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
2635
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
2636
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
2637
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
2638
 
2639
/* TAxEX0 Control Bits */
2640
#define TAIDEX0                (0x0001)       /* Timer A Input divider expansion Bit: 0 */
2641
#define TAIDEX1                (0x0002)       /* Timer A Input divider expansion Bit: 1 */
2642
#define TAIDEX2                (0x0004)       /* Timer A Input divider expansion Bit: 2 */
2643
 
2644
#define TAIDEX_0               (0*0x0001u)    /* Timer A Input divider expansion : /1 */
2645
#define TAIDEX_1               (1*0x0001u)    /* Timer A Input divider expansion : /2 */
2646
#define TAIDEX_2               (2*0x0001u)    /* Timer A Input divider expansion : /3 */
2647
#define TAIDEX_3               (3*0x0001u)    /* Timer A Input divider expansion : /4 */
2648
#define TAIDEX_4               (4*0x0001u)    /* Timer A Input divider expansion : /5 */
2649
#define TAIDEX_5               (5*0x0001u)    /* Timer A Input divider expansion : /6 */
2650
#define TAIDEX_6               (6*0x0001u)    /* Timer A Input divider expansion : /7 */
2651
#define TAIDEX_7               (7*0x0001u)    /* Timer A Input divider expansion : /8 */
2652
 
2653
/* T0A5IV Definitions */
2654
#define TA0IV_NONE             (0x0000)       /* No Interrupt pending */
2655
#define TA0IV_TA0CCR1          (0x0002)       /* TA0CCR1_CCIFG */
2656
#define TA0IV_TA0CCR2          (0x0004)       /* TA0CCR2_CCIFG */
2657
#define TA0IV_TA0CCR3          (0x0006)       /* TA0CCR3_CCIFG */
2658
#define TA0IV_TA0CCR4          (0x0008)       /* TA0CCR4_CCIFG */
2659
#define TA0IV_5                (0x000A)       /* Reserved */
2660
#define TA0IV_6                (0x000C)       /* Reserved */
2661
#define TA0IV_TA0IFG           (0x000E)       /* TA0IFG */
2662
 
2663
/************************************************************
2664
* Timer1_A3
2665
************************************************************/
2666
#define __MSP430_HAS_T1A3__                   /* Definition to show that Module is available */
2667
#define __MSP430_BASEADDRESS_T1A3__ 0x0380
2668
 
2669
SFR_16BIT(TA1CTL);                            /* Timer1_A3 Control */
2670
SFR_16BIT(TA1CCTL0);                          /* Timer1_A3 Capture/Compare Control 0 */
2671
SFR_16BIT(TA1CCTL1);                          /* Timer1_A3 Capture/Compare Control 1 */
2672
SFR_16BIT(TA1CCTL2);                          /* Timer1_A3 Capture/Compare Control 2 */
2673
SFR_16BIT(TA1R);                              /* Timer1_A3 */
2674
SFR_16BIT(TA1CCR0);                           /* Timer1_A3 Capture/Compare 0 */
2675
SFR_16BIT(TA1CCR1);                           /* Timer1_A3 Capture/Compare 1 */
2676
SFR_16BIT(TA1CCR2);                           /* Timer1_A3 Capture/Compare 2 */
2677
SFR_16BIT(TA1IV);                             /* Timer1_A3 Interrupt Vector Word */
2678
SFR_16BIT(TA1EX0);                            /* Timer1_A3 Expansion Register 0 */
2679
 
2680
/* Bits are already defined within the Timer0_Ax */
2681
 
2682
/* TA1IV Definitions */
2683
#define TA1IV_NONE             (0x0000)       /* No Interrupt pending */
2684
#define TA1IV_TA1CCR1          (0x0002)       /* TA1CCR1_CCIFG */
2685
#define TA1IV_TA1CCR2          (0x0004)       /* TA1CCR2_CCIFG */
2686
#define TA1IV_3                (0x0006)       /* Reserved */
2687
#define TA1IV_4                (0x0008)       /* Reserved */
2688
#define TA1IV_5                (0x000A)       /* Reserved */
2689
#define TA1IV_6                (0x000C)       /* Reserved */
2690
#define TA1IV_TA1IFG           (0x000E)       /* TA1IFG */
2691
 
2692
/************************************************************
2693
* Timer2_A3
2694
************************************************************/
2695
#define __MSP430_HAS_T2A3__                   /* Definition to show that Module is available */
2696
#define __MSP430_BASEADDRESS_T2A3__ 0x0400
2697
 
2698
SFR_16BIT(TA2CTL);                            /* Timer2_A3 Control */
2699
SFR_16BIT(TA2CCTL0);                          /* Timer2_A3 Capture/Compare Control 0 */
2700
SFR_16BIT(TA2CCTL1);                          /* Timer2_A3 Capture/Compare Control 1 */
2701
SFR_16BIT(TA2CCTL2);                          /* Timer2_A3 Capture/Compare Control 2 */
2702
SFR_16BIT(TA2R);                              /* Timer2_A3 */
2703
SFR_16BIT(TA2CCR0);                           /* Timer2_A3 Capture/Compare 0 */
2704
SFR_16BIT(TA2CCR1);                           /* Timer2_A3 Capture/Compare 1 */
2705
SFR_16BIT(TA2CCR2);                           /* Timer2_A3 Capture/Compare 2 */
2706
SFR_16BIT(TA2IV);                             /* Timer2_A3 Interrupt Vector Word */
2707
SFR_16BIT(TA2EX0);                            /* Timer2_A3 Expansion Register 0 */
2708
 
2709
/* Bits are already defined within the Timer0_Ax */
2710
 
2711
/* TA2IV Definitions */
2712
#define TA2IV_NONE             (0x0000)       /* No Interrupt pending */
2713
#define TA2IV_TA1CCR1          (0x0002)       /* TA2CCR1_CCIFG */
2714
#define TA2IV_TA1CCR2          (0x0004)       /* TA2CCR2_CCIFG */
2715
#define TA2IV_3                (0x0006)       /* Reserved */
2716
#define TA2IV_4                (0x0008)       /* Reserved */
2717
#define TA2IV_5                (0x000A)       /* Reserved */
2718
#define TA2IV_6                (0x000C)       /* Reserved */
2719
#define TA2IV_TA2IFG           (0x000E)       /* TA2IFG */
2720
 
2721
/************************************************************
2722
* Timer0_B7
2723
************************************************************/
2724
#define __MSP430_HAS_T0B7__                   /* Definition to show that Module is available */
2725
#define __MSP430_BASEADDRESS_T0B7__ 0x03C0
2726
 
2727
SFR_16BIT(TB0CTL);                            /* Timer0_B7 Control */
2728
SFR_16BIT(TB0CCTL0);                          /* Timer0_B7 Capture/Compare Control 0 */
2729
SFR_16BIT(TB0CCTL1);                          /* Timer0_B7 Capture/Compare Control 1 */
2730
SFR_16BIT(TB0CCTL2);                          /* Timer0_B7 Capture/Compare Control 2 */
2731
SFR_16BIT(TB0CCTL3);                          /* Timer0_B7 Capture/Compare Control 3 */
2732
SFR_16BIT(TB0CCTL4);                          /* Timer0_B7 Capture/Compare Control 4 */
2733
SFR_16BIT(TB0CCTL5);                          /* Timer0_B7 Capture/Compare Control 5 */
2734
SFR_16BIT(TB0CCTL6);                          /* Timer0_B7 Capture/Compare Control 6 */
2735
SFR_16BIT(TB0R);                              /* Timer0_B7 */
2736
SFR_16BIT(TB0CCR0);                           /* Timer0_B7 Capture/Compare 0 */
2737
SFR_16BIT(TB0CCR1);                           /* Timer0_B7 Capture/Compare 1 */
2738
SFR_16BIT(TB0CCR2);                           /* Timer0_B7 Capture/Compare 2 */
2739
SFR_16BIT(TB0CCR3);                           /* Timer0_B7 Capture/Compare 3 */
2740
SFR_16BIT(TB0CCR4);                           /* Timer0_B7 Capture/Compare 4 */
2741
SFR_16BIT(TB0CCR5);                           /* Timer0_B7 Capture/Compare 5 */
2742
SFR_16BIT(TB0CCR6);                           /* Timer0_B7 Capture/Compare 6 */
2743
SFR_16BIT(TB0EX0);                            /* Timer0_B7 Expansion Register 0 */
2744
SFR_16BIT(TB0IV);                             /* Timer0_B7 Interrupt Vector Word */
2745
 
2746
/* Legacy Type Definitions for TimerB */
2747
#define TBCTL                  TB0CTL         /* Timer0_B7 Control */
2748
#define TBCCTL0                TB0CCTL0       /* Timer0_B7 Capture/Compare Control 0 */
2749
#define TBCCTL1                TB0CCTL1       /* Timer0_B7 Capture/Compare Control 1 */
2750
#define TBCCTL2                TB0CCTL2       /* Timer0_B7 Capture/Compare Control 2 */
2751
#define TBCCTL3                TB0CCTL3       /* Timer0_B7 Capture/Compare Control 3 */
2752
#define TBCCTL4                TB0CCTL4       /* Timer0_B7 Capture/Compare Control 4 */
2753
#define TBCCTL5                TB0CCTL5       /* Timer0_B7 Capture/Compare Control 5 */
2754
#define TBCCTL6                TB0CCTL6       /* Timer0_B7 Capture/Compare Control 6 */
2755
#define TBR                    TB0R           /* Timer0_B7 */
2756
#define TBCCR0                 TB0CCR0        /* Timer0_B7 Capture/Compare 0 */
2757
#define TBCCR1                 TB0CCR1        /* Timer0_B7 Capture/Compare 1 */
2758
#define TBCCR2                 TB0CCR2        /* Timer0_B7 Capture/Compare 2 */
2759
#define TBCCR3                 TB0CCR3        /* Timer0_B7 Capture/Compare 3 */
2760
#define TBCCR4                 TB0CCR4        /* Timer0_B7 Capture/Compare 4 */
2761
#define TBCCR5                 TB0CCR5        /* Timer0_B7 Capture/Compare 5 */
2762
#define TBCCR6                 TB0CCR6        /* Timer0_B7 Capture/Compare 6 */
2763
#define TBEX0                  TB0EX0         /* Timer0_B7 Expansion Register 0 */
2764
#define TBIV                   TB0IV          /* Timer0_B7 Interrupt Vector Word */
2765
#define TIMERB1_VECTOR       TIMER0_B1_VECTOR /* Timer0_B7 CC1-6, TB */
2766
#define TIMERB0_VECTOR       TIMER0_B0_VECTOR /* Timer0_B7 CC0 */
2767
 
2768
/* TBxCTL Control Bits */
2769
#define TBCLGRP1               (0x4000)       /* Timer0_B7 Compare latch load group 1 */
2770
#define TBCLGRP0               (0x2000)       /* Timer0_B7 Compare latch load group 0 */
2771
#define CNTL1                  (0x1000)       /* Counter lenght 1 */
2772
#define CNTL0                  (0x0800)       /* Counter lenght 0 */
2773
#define TBSSEL1                (0x0200)       /* Clock source 1 */
2774
#define TBSSEL0                (0x0100)       /* Clock source 0 */
2775
#define TBCLR                  (0x0004)       /* Timer0_B7 counter clear */
2776
#define TBIE                   (0x0002)       /* Timer0_B7 interrupt enable */
2777
#define TBIFG                  (0x0001)       /* Timer0_B7 interrupt flag */
2778
 
2779
#define SHR1                   (0x4000)       /* Timer0_B7 Compare latch load group 1 */
2780
#define SHR0                   (0x2000)       /* Timer0_B7 Compare latch load group 0 */
2781
 
2782
#define TBSSEL_0               (0*0x0100u)    /* Clock Source: TBCLK */
2783
#define TBSSEL_1               (1*0x0100u)    /* Clock Source: ACLK  */
2784
#define TBSSEL_2               (2*0x0100u)    /* Clock Source: SMCLK */
2785
#define TBSSEL_3               (3*0x0100u)    /* Clock Source: INCLK */
2786
#define CNTL_0                 (0*0x0800u)    /* Counter lenght: 16 bit */
2787
#define CNTL_1                 (1*0x0800u)    /* Counter lenght: 12 bit */
2788
#define CNTL_2                 (2*0x0800u)    /* Counter lenght: 10 bit */
2789
#define CNTL_3                 (3*0x0800u)    /* Counter lenght:  8 bit */
2790
#define SHR_0                  (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
2791
#define SHR_1                  (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2792
#define SHR_2                  (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
2793
#define SHR_3                  (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
2794
#define TBCLGRP_0              (0*0x2000u)    /* Timer0_B7 Group: 0 - individually */
2795
#define TBCLGRP_1              (1*0x2000u)    /* Timer0_B7 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2796
#define TBCLGRP_2              (2*0x2000u)    /* Timer0_B7 Group: 2 - 2 groups (1-3, 4-6)*/
2797
#define TBCLGRP_3              (3*0x2000u)    /* Timer0_B7 Group: 3 - 1 group (all) */
2798
#define TBSSEL__TACLK          (0*0x100u)     /* Timer0_B7 clock source select: 0 - TACLK */
2799
#define TBSSEL__ACLK           (1*0x100u)     /* Timer0_B7 clock source select: 1 - ACLK  */
2800
#define TBSSEL__SMCLK          (2*0x100u)     /* Timer0_B7 clock source select: 2 - SMCLK */
2801
#define TBSSEL__INCLK          (3*0x100u)     /* Timer0_B7 clock source select: 3 - INCLK */
2802
#define CNTL__16               (0*0x0800u)    /* Counter lenght: 16 bit */
2803
#define CNTL__12               (1*0x0800u)    /* Counter lenght: 12 bit */
2804
#define CNTL__10               (2*0x0800u)    /* Counter lenght: 10 bit */
2805
#define CNTL__8                (3*0x0800u)    /* Counter lenght:  8 bit */
2806
 
2807
/* Additional Timer B Control Register bits are defined in Timer A */
2808
/* TBxCCTLx Control Bits */
2809
#define CLLD1                  (0x0400)       /* Compare latch load source 1 */
2810
#define CLLD0                  (0x0200)       /* Compare latch load source 0 */
2811
 
2812
#define SLSHR1                 (0x0400)       /* Compare latch load source 1 */
2813
#define SLSHR0                 (0x0200)       /* Compare latch load source 0 */
2814
 
2815
#define SLSHR_0                (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2816
#define SLSHR_1                (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
2817
#define SLSHR_2                (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2818
#define SLSHR_3                (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
2819
 
2820
#define CLLD_0                 (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2821
#define CLLD_1                 (1*0x0200u)    /* Compare latch load sourec : 1 - TBR counts to 0 */
2822
#define CLLD_2                 (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2823
#define CLLD_3                 (3*0x0200u)    /* Compare latch load sourec : 3 - TBR counts to TBCTL0 */
2824
 
2825
/* TBxEX0 Control Bits */
2826
#define TBIDEX0                (0x0001)       /* Timer0_B7 Input divider expansion Bit: 0 */
2827
#define TBIDEX1                (0x0002)       /* Timer0_B7 Input divider expansion Bit: 1 */
2828
#define TBIDEX2                (0x0004)       /* Timer0_B7 Input divider expansion Bit: 2 */
2829
 
2830
#define TBIDEX_0               (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
2831
#define TBIDEX_1               (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
2832
#define TBIDEX_2               (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
2833
#define TBIDEX_3               (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
2834
#define TBIDEX_4               (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
2835
#define TBIDEX_5               (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
2836
#define TBIDEX_6               (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
2837
#define TBIDEX_7               (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
2838
#define TBIDEX__1              (0*0x0001u)    /* Timer0_B7 Input divider expansion : /1 */
2839
#define TBIDEX__2              (1*0x0001u)    /* Timer0_B7 Input divider expansion : /2 */
2840
#define TBIDEX__3              (2*0x0001u)    /* Timer0_B7 Input divider expansion : /3 */
2841
#define TBIDEX__4              (3*0x0001u)    /* Timer0_B7 Input divider expansion : /4 */
2842
#define TBIDEX__5              (4*0x0001u)    /* Timer0_B7 Input divider expansion : /5 */
2843
#define TBIDEX__6              (5*0x0001u)    /* Timer0_B7 Input divider expansion : /6 */
2844
#define TBIDEX__7              (6*0x0001u)    /* Timer0_B7 Input divider expansion : /7 */
2845
#define TBIDEX__8              (7*0x0001u)    /* Timer0_B7 Input divider expansion : /8 */
2846
 
2847
/* TB0IV Definitions */
2848
#define TB0IV_NONE             (0x0000)       /* No Interrupt pending */
2849
#define TB0IV_TB1CCR1          (0x0002)       /* TBCCR1_CCIFG */
2850
#define TB0IV_TB1CCR2          (0x0004)       /* TBCCR2_CCIFG */
2851
#define TB0IV_3                (0x0006)       /* Reserved */
2852
#define TB0IV_4                (0x0008)       /* Reserved */
2853
#define TB0IV_5                (0x000A)       /* Reserved */
2854
#define TB0IV_6                (0x000C)       /* Reserved */
2855
#define TB0IV_TB0IFG           (0x000E)       /* TBIFG */
2856
 
2857
 
2858
/************************************************************
2859
* USB
2860
************************************************************/
2861
#define __MSP430_HAS_USB__                    /* Definition to show that Module is available */
2862
#define __MSP430_BASEADDRESS_USB__ 0x0900
2863
 
2864
/* ========================================================================= */
2865
/* USB Configuration Registers */
2866
/* ========================================================================= */
2867
SFR_16BIT(USBKEYID);                          /* USB Controller key register */
2868
SFR_8BIT(USBKEYID_L);                         /* USB Controller key register */
2869
SFR_8BIT(USBKEYID_H);                         /* USB Controller key register */
2870
SFR_16BIT(USBCNF);                            /* USB Module  configuration register */
2871
SFR_8BIT(USBCNF_L);                           /* USB Module  configuration register */
2872
SFR_8BIT(USBCNF_H);                           /* USB Module  configuration register */
2873
SFR_16BIT(USBPHYCTL);                         /* USB PHY control register */
2874
SFR_8BIT(USBPHYCTL_L);                        /* USB PHY control register */
2875
SFR_8BIT(USBPHYCTL_H);                        /* USB PHY control register */
2876
SFR_16BIT(USBPWRCTL);                         /* USB Power control register */
2877
SFR_8BIT(USBPWRCTL_L);                        /* USB Power control register */
2878
SFR_8BIT(USBPWRCTL_H);                        /* USB Power control register */
2879
SFR_16BIT(USBPLLCTL);                         /* USB PLL control register */
2880
SFR_8BIT(USBPLLCTL_L);                        /* USB PLL control register */
2881
SFR_8BIT(USBPLLCTL_H);                        /* USB PLL control register */
2882
SFR_16BIT(USBPLLDIVB);                        /* USB PLL Clock Divider Buffer control register */
2883
SFR_8BIT(USBPLLDIVB_L);                       /* USB PLL Clock Divider Buffer control register */
2884
SFR_8BIT(USBPLLDIVB_H);                       /* USB PLL Clock Divider Buffer control register */
2885
SFR_16BIT(USBPLLIR);                          /* USB PLL Interrupt control register */
2886
SFR_8BIT(USBPLLIR_L);                         /* USB PLL Interrupt control register */
2887
SFR_8BIT(USBPLLIR_H);                         /* USB PLL Interrupt control register */
2888
 
2889
#define USBKEYPID              USBKEYID       /* Legacy Definition: USB Controller key register */
2890
#define USBKEY                 (0x9628)       /* USB Control Register key */
2891
 
2892
/* USBCNF Control Bits */
2893
#define USB_EN                 (0x0001)       /* USB - Module enable */
2894
#define PUR_EN                 (0x0002)       /* USB - PUR pin enable */
2895
#define PUR_IN                 (0x0004)       /* USB - PUR pin input value */
2896
#define BLKRDY                 (0x0008)       /* USB - Block ready signal for DMA */
2897
#define FNTEN                  (0x0010)       /* USB - Frame Number receive Trigger enable for DMA */
2898
//#define RESERVED            (0x0020)  /* USB -  */
2899
//#define RESERVED            (0x0040)  /* USB -  */
2900
//#define RESERVED            (0x0080)  /* USB -  */
2901
//#define RESERVED            (0x0100)  /* USB -  */
2902
//#define RESERVED            (0x0200)  /* USB -  */
2903
//#define RESERVED            (0x0400)  /* USB -  */
2904
//#define RESERVED            (0x0800)  /* USB -  */
2905
//#define RESERVED            (0x1000)  /* USB -  */
2906
//#define RESERVED            (0x2000)  /* USB -  */
2907
//#define RESERVED            (0x4000)  /* USB -  */
2908
//#define RESERVED            (0x8000)  /* USB -  */
2909
 
2910
/* USBCNF Control Bits */
2911
#define USB_EN_L               (0x0001)       /* USB - Module enable */
2912
#define PUR_EN_L               (0x0002)       /* USB - PUR pin enable */
2913
#define PUR_IN_L               (0x0004)       /* USB - PUR pin input value */
2914
#define BLKRDY_L               (0x0008)       /* USB - Block ready signal for DMA */
2915
#define FNTEN_L                (0x0010)       /* USB - Frame Number receive Trigger enable for DMA */
2916
//#define RESERVED            (0x0020)  /* USB -  */
2917
//#define RESERVED            (0x0040)  /* USB -  */
2918
//#define RESERVED            (0x0080)  /* USB -  */
2919
//#define RESERVED            (0x0100)  /* USB -  */
2920
//#define RESERVED            (0x0200)  /* USB -  */
2921
//#define RESERVED            (0x0400)  /* USB -  */
2922
//#define RESERVED            (0x0800)  /* USB -  */
2923
//#define RESERVED            (0x1000)  /* USB -  */
2924
//#define RESERVED            (0x2000)  /* USB -  */
2925
//#define RESERVED            (0x4000)  /* USB -  */
2926
//#define RESERVED            (0x8000)  /* USB -  */
2927
 
2928
/* USBCNF Control Bits */
2929
//#define RESERVED            (0x0020)  /* USB -  */
2930
//#define RESERVED            (0x0040)  /* USB -  */
2931
//#define RESERVED            (0x0080)  /* USB -  */
2932
//#define RESERVED            (0x0100)  /* USB -  */
2933
//#define RESERVED            (0x0200)  /* USB -  */
2934
//#define RESERVED            (0x0400)  /* USB -  */
2935
//#define RESERVED            (0x0800)  /* USB -  */
2936
//#define RESERVED            (0x1000)  /* USB -  */
2937
//#define RESERVED            (0x2000)  /* USB -  */
2938
//#define RESERVED            (0x4000)  /* USB -  */
2939
//#define RESERVED            (0x8000)  /* USB -  */
2940
 
2941
/* USBPHYCTL Control Bits */
2942
#define PUOUT0                 (0x0001)       /* USB - USB Port Output Signal Bit 0 */
2943
#define PUOUT1                 (0x0002)       /* USB - USB Port Output Signal Bit 1 */
2944
#define PUIN0                  (0x0004)       /* USB - PU0/DP Input Data */
2945
#define PUIN1                  (0x0008)       /* USB - PU1/DM Input Data */
2946
//#define RESERVED            (0x0010)  /* USB -  */
2947
#define PUOPE                  (0x0020)       /* USB - USB Port Output Enable */
2948
//#define RESERVED            (0x0040)  /* USB -  */
2949
#define PUSEL                  (0x0080)       /* USB - USB Port Function Select */
2950
#define PUIPE                  (0x0100)       /* USB - PHY Single Ended Input enable */
2951
//#define RESERVED            (0x0200)  /* USB -  */
2952
//#define RESERVED            (0x0100)  /* USB -  */
2953
//#define RESERVED            (0x0200)  /* USB -  */
2954
//#define RESERVED            (0x0400)  /* USB -  */
2955
//#define RESERVED            (0x0800)  /* USB -  */
2956
//#define RESERVED            (0x1000)  /* USB -  */
2957
//#define RESERVED            (0x2000)  /* USB -  */
2958
//#define RESERVED            (0x4000)  /* USB -  */
2959
//#define RESERVED            (0x8000)  /* USB -  */
2960
 
2961
/* USBPHYCTL Control Bits */
2962
#define PUOUT0_L               (0x0001)       /* USB - USB Port Output Signal Bit 0 */
2963
#define PUOUT1_L               (0x0002)       /* USB - USB Port Output Signal Bit 1 */
2964
#define PUIN0_L                (0x0004)       /* USB - PU0/DP Input Data */
2965
#define PUIN1_L                (0x0008)       /* USB - PU1/DM Input Data */
2966
//#define RESERVED            (0x0010)  /* USB -  */
2967
#define PUOPE_L                (0x0020)       /* USB - USB Port Output Enable */
2968
//#define RESERVED            (0x0040)  /* USB -  */
2969
#define PUSEL_L                (0x0080)       /* USB - USB Port Function Select */
2970
//#define RESERVED            (0x0200)  /* USB -  */
2971
//#define RESERVED            (0x0100)  /* USB -  */
2972
//#define RESERVED            (0x0200)  /* USB -  */
2973
//#define RESERVED            (0x0400)  /* USB -  */
2974
//#define RESERVED            (0x0800)  /* USB -  */
2975
//#define RESERVED            (0x1000)  /* USB -  */
2976
//#define RESERVED            (0x2000)  /* USB -  */
2977
//#define RESERVED            (0x4000)  /* USB -  */
2978
//#define RESERVED            (0x8000)  /* USB -  */
2979
 
2980
/* USBPHYCTL Control Bits */
2981
//#define RESERVED            (0x0010)  /* USB -  */
2982
//#define RESERVED            (0x0040)  /* USB -  */
2983
#define PUIPE_H                (0x0001)       /* USB - PHY Single Ended Input enable */
2984
//#define RESERVED            (0x0200)  /* USB -  */
2985
//#define RESERVED            (0x0100)  /* USB -  */
2986
//#define RESERVED            (0x0200)  /* USB -  */
2987
//#define RESERVED            (0x0400)  /* USB -  */
2988
//#define RESERVED            (0x0800)  /* USB -  */
2989
//#define RESERVED            (0x1000)  /* USB -  */
2990
//#define RESERVED            (0x2000)  /* USB -  */
2991
//#define RESERVED            (0x4000)  /* USB -  */
2992
//#define RESERVED            (0x8000)  /* USB -  */
2993
 
2994
#define PUDIR                  (0x0020)       /* USB - Legacy Definition: USB Port Output Enable */
2995
#define PSEIEN                 (0x0100)       /* USB - Legacy Definition: PHY Single Ended Input enable */
2996
 
2997
/* USBPWRCTL Control Bits */
2998
#define VUOVLIFG               (0x0001)       /* USB - VUSB Overload Interrupt Flag */
2999
#define VBONIFG                (0x0002)       /* USB - VBUS "Coming ON" Interrupt Flag */
3000
#define VBOFFIFG               (0x0004)       /* USB - VBUS "Going OFF" Interrupt Flag */
3001
#define USBBGVBV               (0x0008)       /* USB - USB Bandgap and VBUS valid */
3002
#define USBDETEN               (0x0010)       /* USB - VBUS on/off events enable */
3003
#define OVLAOFF                (0x0020)       /* USB - LDO overload auto off enable */
3004
#define SLDOAON                (0x0040)       /* USB - Secondary LDO auto on enable */
3005
//#define RESERVED            (0x0080)  /* USB -  */
3006
#define VUOVLIE                (0x0100)       /* USB - Overload indication Interrupt Enable */
3007
#define VBONIE                 (0x0200)       /* USB - VBUS "Coming ON" Interrupt Enable */
3008
#define VBOFFIE                (0x0400)       /* USB - VBUS "Going OFF" Interrupt Enable */
3009
#define VUSBEN                 (0x0800)       /* USB - LDO Enable (3.3V) */
3010
#define SLDOEN                 (0x1000)       /* USB - Secondary LDO Enable (1.8V) */
3011
//#define RESERVED            (0x2000)  /* USB -  */
3012
//#define RESERVED            (0x4000)  /* USB -  */
3013
//#define RESERVED            (0x8000)  /* USB -  */
3014
 
3015
/* USBPWRCTL Control Bits */
3016
#define VUOVLIFG_L             (0x0001)       /* USB - VUSB Overload Interrupt Flag */
3017
#define VBONIFG_L              (0x0002)       /* USB - VBUS "Coming ON" Interrupt Flag */
3018
#define VBOFFIFG_L             (0x0004)       /* USB - VBUS "Going OFF" Interrupt Flag */
3019
#define USBBGVBV_L             (0x0008)       /* USB - USB Bandgap and VBUS valid */
3020
#define USBDETEN_L             (0x0010)       /* USB - VBUS on/off events enable */
3021
#define OVLAOFF_L              (0x0020)       /* USB - LDO overload auto off enable */
3022
#define SLDOAON_L              (0x0040)       /* USB - Secondary LDO auto on enable */
3023
//#define RESERVED            (0x0080)  /* USB -  */
3024
//#define RESERVED            (0x2000)  /* USB -  */
3025
//#define RESERVED            (0x4000)  /* USB -  */
3026
//#define RESERVED            (0x8000)  /* USB -  */
3027
 
3028
/* USBPWRCTL Control Bits */
3029
//#define RESERVED            (0x0080)  /* USB -  */
3030
#define VUOVLIE_H              (0x0001)       /* USB - Overload indication Interrupt Enable */
3031
#define VBONIE_H               (0x0002)       /* USB - VBUS "Coming ON" Interrupt Enable */
3032
#define VBOFFIE_H              (0x0004)       /* USB - VBUS "Going OFF" Interrupt Enable */
3033
#define VUSBEN_H               (0x0008)       /* USB - LDO Enable (3.3V) */
3034
#define SLDOEN_H               (0x0010)       /* USB - Secondary LDO Enable (1.8V) */
3035
//#define RESERVED            (0x2000)  /* USB -  */
3036
//#define RESERVED            (0x4000)  /* USB -  */
3037
//#define RESERVED            (0x8000)  /* USB -  */
3038
 
3039
/* USBPLLCTL Control Bits */
3040
//#define RESERVED            (0x0001)  /* USB -  */
3041
//#define RESERVED            (0x0002)  /* USB -  */
3042
//#define RESERVED            (0x0004)  /* USB -  */
3043
//#define RESERVED            (0x0008)  /* USB -  */
3044
//#define RESERVED            (0x0010)  /* USB -  */
3045
//#define RESERVED            (0x0020)  /* USB -  */
3046
#define UCLKSEL0               (0x0040)       /* USB - Module Clock Select Bit 0 */
3047
#define UCLKSEL1               (0x0080)       /* USB - Module Clock Select Bit 1 */
3048
#define UPLLEN                 (0x0100)       /* USB - PLL enable */
3049
#define UPFDEN                 (0x0200)       /* USB - Phase Freq. Discriminator enable */
3050
//#define RESERVED            (0x0400)  /* USB -  */
3051
//#define RESERVED            (0x0800)  /* USB -  */
3052
#define UPCS0                  (0x1000)       /* USB - PLL Clock Select Bit 0 */
3053
//#define RESERVED            (0x2000)  /* USB -  */
3054
//#define RESERVED            (0x4000)  /* USB -  */
3055
//#define RESERVED            (0x8000)  /* USB -  */
3056
 
3057
/* USBPLLCTL Control Bits */
3058
//#define RESERVED            (0x0001)  /* USB -  */
3059
//#define RESERVED            (0x0002)  /* USB -  */
3060
//#define RESERVED            (0x0004)  /* USB -  */
3061
//#define RESERVED            (0x0008)  /* USB -  */
3062
//#define RESERVED            (0x0010)  /* USB -  */
3063
//#define RESERVED            (0x0020)  /* USB -  */
3064
#define UCLKSEL0_L             (0x0040)       /* USB - Module Clock Select Bit 0 */
3065
#define UCLKSEL1_L             (0x0080)       /* USB - Module Clock Select Bit 1 */
3066
//#define RESERVED            (0x0400)  /* USB -  */
3067
//#define RESERVED            (0x0800)  /* USB -  */
3068
//#define RESERVED            (0x2000)  /* USB -  */
3069
//#define RESERVED            (0x4000)  /* USB -  */
3070
//#define RESERVED            (0x8000)  /* USB -  */
3071
 
3072
/* USBPLLCTL Control Bits */
3073
//#define RESERVED            (0x0001)  /* USB -  */
3074
//#define RESERVED            (0x0002)  /* USB -  */
3075
//#define RESERVED            (0x0004)  /* USB -  */
3076
//#define RESERVED            (0x0008)  /* USB -  */
3077
//#define RESERVED            (0x0010)  /* USB -  */
3078
//#define RESERVED            (0x0020)  /* USB -  */
3079
#define UPLLEN_H               (0x0001)       /* USB - PLL enable */
3080
#define UPFDEN_H               (0x0002)       /* USB - Phase Freq. Discriminator enable */
3081
//#define RESERVED            (0x0400)  /* USB -  */
3082
//#define RESERVED            (0x0800)  /* USB -  */
3083
#define UPCS0_H                (0x0010)       /* USB - PLL Clock Select Bit 0 */
3084
//#define RESERVED            (0x2000)  /* USB -  */
3085
//#define RESERVED            (0x4000)  /* USB -  */
3086
//#define RESERVED            (0x8000)  /* USB -  */
3087
 
3088
#define UCLKSEL_0              (0x0000)       /* USB - Module Clock Select: 0 */
3089
#define UCLKSEL_1              (0x0040)       /* USB - Module Clock Select: 1 */
3090
#define UCLKSEL_2              (0x0080)       /* USB - Module Clock Select: 2 */
3091
#define UCLKSEL_3              (0x00C0)       /* USB - Module Clock Select: 3 (Reserved) */
3092
 
3093
#define UCLKSEL__PLLCLK        (0x0000)       /* USB - Module Clock Select: PLLCLK */
3094
#define UCLKSEL__XT1CLK        (0x0040)       /* USB - Module Clock Select: XT1CLK */
3095
#define UCLKSEL__XT2CLK        (0x0080)       /* USB - Module Clock Select: XT2CLK */
3096
 
3097
/* USBPLLDIVB Control Bits */
3098
#define UPMB0                  (0x0001)       /* USB - PLL feedback divider buffer Bit 0 */
3099
#define UPMB1                  (0x0002)       /* USB - PLL feedback divider buffer Bit 1 */
3100
#define UPMB2                  (0x0004)       /* USB - PLL feedback divider buffer Bit 2 */
3101
#define UPMB3                  (0x0008)       /* USB - PLL feedback divider buffer Bit 3 */
3102
#define UPMB4                  (0x0010)       /* USB - PLL feedback divider buffer Bit 4 */
3103
#define UPMB5                  (0x0020)       /* USB - PLL feedback divider buffer Bit 5 */
3104
//#define RESERVED            (0x0040)  /* USB -  */
3105
//#define RESERVED            (0x0080)  /* USB -  */
3106
#define UPQB0                  (0x0100)       /* USB - PLL prescale divider buffer Bit 0 */
3107
#define UPQB1                  (0x0200)       /* USB - PLL prescale divider buffer Bit 1 */
3108
#define UPQB2                  (0x0400)       /* USB - PLL prescale divider buffer Bit 2 */
3109
//#define RESERVED            (0x0800)  /* USB -  */
3110
//#define RESERVED            (0x1000)  /* USB -  */
3111
//#define RESERVED            (0x2000)  /* USB -  */
3112
//#define RESERVED            (0x4000)  /* USB -  */
3113
//#define RESERVED            (0x8000)  /* USB -  */
3114
 
3115
/* USBPLLDIVB Control Bits */
3116
#define UPMB0_L                (0x0001)       /* USB - PLL feedback divider buffer Bit 0 */
3117
#define UPMB1_L                (0x0002)       /* USB - PLL feedback divider buffer Bit 1 */
3118
#define UPMB2_L                (0x0004)       /* USB - PLL feedback divider buffer Bit 2 */
3119
#define UPMB3_L                (0x0008)       /* USB - PLL feedback divider buffer Bit 3 */
3120
#define UPMB4_L                (0x0010)       /* USB - PLL feedback divider buffer Bit 4 */
3121
#define UPMB5_L                (0x0020)       /* USB - PLL feedback divider buffer Bit 5 */
3122
//#define RESERVED            (0x0040)  /* USB -  */
3123
//#define RESERVED            (0x0080)  /* USB -  */
3124
//#define RESERVED            (0x0800)  /* USB -  */
3125
//#define RESERVED            (0x1000)  /* USB -  */
3126
//#define RESERVED            (0x2000)  /* USB -  */
3127
//#define RESERVED            (0x4000)  /* USB -  */
3128
//#define RESERVED            (0x8000)  /* USB -  */
3129
 
3130
/* USBPLLDIVB Control Bits */
3131
//#define RESERVED            (0x0040)  /* USB -  */
3132
//#define RESERVED            (0x0080)  /* USB -  */
3133
#define UPQB0_H                (0x0001)       /* USB - PLL prescale divider buffer Bit 0 */
3134
#define UPQB1_H                (0x0002)       /* USB - PLL prescale divider buffer Bit 1 */
3135
#define UPQB2_H                (0x0004)       /* USB - PLL prescale divider buffer Bit 2 */
3136
//#define RESERVED            (0x0800)  /* USB -  */
3137
//#define RESERVED            (0x1000)  /* USB -  */
3138
//#define RESERVED            (0x2000)  /* USB -  */
3139
//#define RESERVED            (0x4000)  /* USB -  */
3140
//#define RESERVED            (0x8000)  /* USB -  */
3141
 
3142
#define USBPLL_SETCLK_1_5      (UPMB0*31      | UPQB0*0)  /* USB - PLL Set for 1.5 MHz input clock */
3143
#define USBPLL_SETCLK_1_6      (UPMB0*29      | UPQB0*0)  /* USB - PLL Set for 1.6 MHz input clock */
3144
#define USBPLL_SETCLK_1_7778   (UPMB0*26      | UPQB0*0)  /* USB - PLL Set for 1.7778 MHz input clock */
3145
#define USBPLL_SETCLK_1_8432   (UPMB0*25      | UPQB0*0)  /* USB - PLL Set for 1.8432 MHz input clock */
3146
#define USBPLL_SETCLK_1_8461   (UPMB0*25      | UPQB0*0)  /* USB - PLL Set for 1.8461 MHz input clock */
3147
#define USBPLL_SETCLK_1_92     (UPMB0*24      | UPQB0*0)  /* USB - PLL Set for 1.92 MHz input clock */
3148
#define USBPLL_SETCLK_2_0      (UPMB0*23      | UPQB0*0)  /* USB - PLL Set for 2.0 MHz input clock */
3149
#define USBPLL_SETCLK_2_4      (UPMB0*19      | UPQB0*0)  /* USB - PLL Set for 2.4 MHz input clock */
3150
#define USBPLL_SETCLK_2_6667   (UPMB0*17      | UPQB0*0)  /* USB - PLL Set for 2.6667 MHz input clock */
3151
#define USBPLL_SETCLK_3_0      (UPMB0*15      | UPQB0*0)  /* USB - PLL Set for 3.0 MHz input clock */
3152
#define USBPLL_SETCLK_3_2      (UPMB0*29      | UPQB0*1)  /* USB - PLL Set for 3.2 MHz input clock */
3153
#define USBPLL_SETCLK_3_5556   (UPMB0*26      | UPQB0*1)  /* USB - PLL Set for 3.5556 MHz input clock */
3154
#define USBPLL_SETCLK_3_579545 (UPMB0*26      | UPQB0*1)  /* USB - PLL Set for 3.579546 MHz input clock */
3155
#define USBPLL_SETCLK_3_84     (UPMB0*24      | UPQB0*1)  /* USB - PLL Set for 3.84 MHz input clock */
3156
#define USBPLL_SETCLK_4_0      (UPMB0*23      | UPQB0*1)  /* USB - PLL Set for 4.0 MHz input clock */
3157
#define USBPLL_SETCLK_4_1739   (UPMB0*22      | UPQB0*1)  /* USB - PLL Set for 4.1739 MHz input clock */
3158
#define USBPLL_SETCLK_4_1943   (UPMB0*22      | UPQB0*1)  /* USB - PLL Set for 4.1943 MHz input clock */
3159
#define USBPLL_SETCLK_4_332    (UPMB0*21      | UPQB0*1)  /* USB - PLL Set for 4.332 MHz input clock */
3160
#define USBPLL_SETCLK_4_3636   (UPMB0*21      | UPQB0*1)  /* USB - PLL Set for 4.3636 MHz input clock */
3161
#define USBPLL_SETCLK_4_5      (UPMB0*31      | UPQB0*2)  /* USB - PLL Set for 4.5 MHz input clock */
3162
#define USBPLL_SETCLK_4_8      (UPMB0*19      | UPQB0*1)  /* USB - PLL Set for 4.8 MHz input clock */
3163
#define USBPLL_SETCLK_5_33     (UPMB0*17      | UPQB0*1)  /* USB - PLL Set for 5.33 MHz input clock */
3164
#define USBPLL_SETCLK_5_76     (UPMB0*24      | UPQB0*2)  /* USB - PLL Set for 5.76 MHz input clock */
3165
#define USBPLL_SETCLK_6_0      (UPMB0*23      | UPQB0*2)  /* USB - PLL Set for 6.0 MHz input clock */
3166
#define USBPLL_SETCLK_6_4      (UPMB0*29      | UPQB0*3)  /* USB - PLL Set for 6.4 MHz input clock */
3167
#define USBPLL_SETCLK_7_2      (UPMB0*19      | UPQB0*2)  /* USB - PLL Set for 7.2 MHz input clock */
3168
#define USBPLL_SETCLK_7_68     (UPMB0*24      | UPQB0*3)  /* USB - PLL Set for 7.68 MHz input clock */
3169
#define USBPLL_SETCLK_8_0      (UPMB0*17      | UPQB0*2)  /* USB - PLL Set for 8.0 MHz input clock */
3170
#define USBPLL_SETCLK_9_0      (UPMB0*15      | UPQB0*2)  /* USB - PLL Set for 9.0 MHz input clock */
3171
#define USBPLL_SETCLK_9_6      (UPMB0*19      | UPQB0*3)  /* USB - PLL Set for 9.6 MHz input clock */
3172
#define USBPLL_SETCLK_10_66    (UPMB0*17      | UPQB0*3)  /* USB - PLL Set for 10.66 MHz input clock */
3173
#define USBPLL_SETCLK_12_0     (UPMB0*15      | UPQB0*3)  /* USB - PLL Set for 12.0 MHz input clock */
3174
#define USBPLL_SETCLK_12_8     (UPMB0*29      | UPQB0*5)  /* USB - PLL Set for 12.8 MHz input clock */
3175
#define USBPLL_SETCLK_14_4     (UPMB0*19      | UPQB0*4)  /* USB - PLL Set for 14.4 MHz input clock */
3176
#define USBPLL_SETCLK_16_0     (UPMB0*17      | UPQB0*4)  /* USB - PLL Set for 16.0 MHz input clock */
3177
#define USBPLL_SETCLK_16_9344  (UPMB0*16      | UPQB0*4)  /* USB - PLL Set for 16.9344 MHz input clock */
3178
#define USBPLL_SETCLK_16_94118 (UPMB0*16      | UPQB0*4)  /* USB - PLL Set for 16.94118 MHz input clock */
3179
#define USBPLL_SETCLK_18_0     (UPMB0*15      | UPQB0*4)  /* USB - PLL Set for 18.0 MHz input clock */
3180
#define USBPLL_SETCLK_19_2     (UPMB0*19      | UPQB0*5)  /* USB - PLL Set for 19.2 MHz input clock */
3181
#define USBPLL_SETCLK_24_0     (UPMB0*15      | UPQB0*5)  /* USB - PLL Set for 24.0 MHz input clock */
3182
#define USBPLL_SETCLK_25_6     (UPMB0*29      | UPQB0*7)  /* USB - PLL Set for 25.6 MHz input clock */
3183
#define USBPLL_SETCLK_26_0     (UPMB0*23      | UPQB0*6)  /* USB - PLL Set for 26.0 MHz input clock */
3184
#define USBPLL_SETCLK_32_0     (UPMB0*23      | UPQB0*7)  /* USB - PLL Set for 32.0 MHz input clock */
3185
 
3186
/* USBPLLIR Control Bits */
3187
#define USBOOLIFG              (0x0001)       /* USB - PLL out of lock Interrupt Flag */
3188
#define USBLOSIFG              (0x0002)       /* USB - PLL loss of signal Interrupt Flag */
3189
#define USBOORIFG              (0x0004)       /* USB - PLL out of range Interrupt Flag */
3190
//#define RESERVED            (0x0008)  /* USB -  */
3191
//#define RESERVED            (0x0010)  /* USB -  */
3192
//#define RESERVED            (0x0020)  /* USB -  */
3193
//#define RESERVED            (0x0040)  /* USB -  */
3194
//#define RESERVED            (0x0080)  /* USB -  */
3195
#define USBOOLIE               (0x0100)       /* USB - PLL out of lock Interrupt enable */
3196
#define USBLOSIE               (0x0200)       /* USB - PLL loss of signal Interrupt enable */
3197
#define USBOORIE               (0x0400)       /* USB - PLL out of range Interrupt enable */
3198
//#define RESERVED            (0x0800)  /* USB -  */
3199
//#define RESERVED            (0x1000)  /* USB -  */
3200
//#define RESERVED            (0x2000)  /* USB -  */
3201
//#define RESERVED            (0x4000)  /* USB -  */
3202
//#define RESERVED            (0x8000)  /* USB -  */
3203
 
3204
/* USBPLLIR Control Bits */
3205
#define USBOOLIFG_L            (0x0001)       /* USB - PLL out of lock Interrupt Flag */
3206
#define USBLOSIFG_L            (0x0002)       /* USB - PLL loss of signal Interrupt Flag */
3207
#define USBOORIFG_L            (0x0004)       /* USB - PLL out of range Interrupt Flag */
3208
//#define RESERVED            (0x0008)  /* USB -  */
3209
//#define RESERVED            (0x0010)  /* USB -  */
3210
//#define RESERVED            (0x0020)  /* USB -  */
3211
//#define RESERVED            (0x0040)  /* USB -  */
3212
//#define RESERVED            (0x0080)  /* USB -  */
3213
//#define RESERVED            (0x0800)  /* USB -  */
3214
//#define RESERVED            (0x1000)  /* USB -  */
3215
//#define RESERVED            (0x2000)  /* USB -  */
3216
//#define RESERVED            (0x4000)  /* USB -  */
3217
//#define RESERVED            (0x8000)  /* USB -  */
3218
 
3219
/* USBPLLIR Control Bits */
3220
//#define RESERVED            (0x0008)  /* USB -  */
3221
//#define RESERVED            (0x0010)  /* USB -  */
3222
//#define RESERVED            (0x0020)  /* USB -  */
3223
//#define RESERVED            (0x0040)  /* USB -  */
3224
//#define RESERVED            (0x0080)  /* USB -  */
3225
#define USBOOLIE_H             (0x0001)       /* USB - PLL out of lock Interrupt enable */
3226
#define USBLOSIE_H             (0x0002)       /* USB - PLL loss of signal Interrupt enable */
3227
#define USBOORIE_H             (0x0004)       /* USB - PLL out of range Interrupt enable */
3228
//#define RESERVED            (0x0800)  /* USB -  */
3229
//#define RESERVED            (0x1000)  /* USB -  */
3230
//#define RESERVED            (0x2000)  /* USB -  */
3231
//#define RESERVED            (0x4000)  /* USB -  */
3232
//#define RESERVED            (0x8000)  /* USB -  */
3233
 
3234
/* ========================================================================= */
3235
/* USB Control Registers */
3236
/* ========================================================================= */
3237
SFR_8BIT(USBIEPCNF_0);                        /* USB Input endpoint_0: Configuration */
3238
SFR_8BIT(USBIEPCNT_0);                        /* USB Input endpoint_0: Byte Count */
3239
SFR_8BIT(USBOEPCNF_0);                        /* USB Output endpoint_0: Configuration */
3240
SFR_8BIT(USBOEPCNT_0);                        /* USB Output endpoint_0: byte count */
3241
SFR_8BIT(USBIEPIE);                           /* USB Input endpoint interrupt enable flags */
3242
SFR_8BIT(USBOEPIE);                           /* USB Output endpoint interrupt enable flags */
3243
SFR_8BIT(USBIEPIFG);                          /* USB Input endpoint interrupt flags */
3244
SFR_8BIT(USBOEPIFG);                          /* USB Output endpoint interrupt flags */
3245
SFR_16BIT(USBVECINT);                         /* USB Vector interrupt register */
3246
SFR_8BIT(USBVECINT_L);                        /* USB Vector interrupt register */
3247
SFR_8BIT(USBVECINT_H);                        /* USB Vector interrupt register */
3248
SFR_16BIT(USBMAINT);                          /* USB maintenance register */
3249
SFR_8BIT(USBMAINT_L);                         /* USB maintenance register */
3250
SFR_8BIT(USBMAINT_H);                         /* USB maintenance register */
3251
SFR_16BIT(USBTSREG);                          /* USB Time Stamp register */
3252
SFR_8BIT(USBTSREG_L);                         /* USB Time Stamp register */
3253
SFR_8BIT(USBTSREG_H);                         /* USB Time Stamp register */
3254
SFR_16BIT(USBFN);                             /* USB Frame number */
3255
SFR_8BIT(USBFN_L);                            /* USB Frame number */
3256
SFR_8BIT(USBFN_H);                            /* USB Frame number */
3257
SFR_8BIT(USBCTL);                             /* USB control register */
3258
SFR_8BIT(USBIE);                              /* USB interrupt enable register */
3259
SFR_8BIT(USBIFG);                             /* USB interrupt flag register */
3260
SFR_8BIT(USBFUNADR);                          /* USB Function address register */
3261
 
3262
#define USBIV                  USBVECINT      /* USB Vector interrupt register (alternate define) */
3263
 
3264
/* USBIEPCNF_0 Control Bits */
3265
/* USBOEPCNF_0 Control Bits */
3266
//#define RESERVED       (0x0001)  /* USB -  */
3267
//#define RESERVED       (0x0001)  /* USB -  */
3268
#define USBIIE                 (0x0004)       /* USB - Transaction Interrupt indication enable */
3269
#define STALL                  (0x0008)       /* USB - Stall Condition */
3270
//#define RESERVED       (0x0010)  /* USB -  */
3271
#define TOGGLE                 (0x0020)       /* USB - Toggle Bit */
3272
//#define RESERVED       (0x0040)  /* USB -  */
3273
#define UBME                   (0x0080)       /* USB - UBM In-Endpoint Enable */
3274
 
3275
/* USBIEPBCNT_0 Control Bits */
3276
/* USBOEPBCNT_0 Control Bits */
3277
#define CNT0                   (0x0001)       /* USB - Byte Count Bit 0 */
3278
#define CNT1                   (0x0001)       /* USB - Byte Count Bit 1 */
3279
#define CNT2                   (0x0004)       /* USB - Byte Count Bit 2 */
3280
#define CNT3                   (0x0008)       /* USB - Byte Count Bit 3 */
3281
//#define RESERVED       (0x0010)  /* USB -  */
3282
//#define RESERVED       (0x0020)  /* USB -  */
3283
//#define RESERVED       (0x0040)  /* USB -  */
3284
#define NAK                    (0x0080)       /* USB - No Acknowledge Status Bit */
3285
 
3286
/* USBMAINT Control Bits */
3287
#define UTIFG                  (0x0001)       /* USB - Timer Interrupt Flag */
3288
#define UTIE                   (0x0002)       /* USB - Timer Interrupt Enable */
3289
//#define RESERVED       (0x0004)  /* USB -  */
3290
//#define RESERVED       (0x0008)  /* USB -  */
3291
//#define RESERVED       (0x0010)  /* USB -  */
3292
//#define RESERVED       (0x0020)  /* USB -  */
3293
//#define RESERVED       (0x0040)  /* USB -  */
3294
//#define RESERVED       (0x0080)  /* USB -  */
3295
#define TSGEN                  (0x0100)       /* USB - Time Stamp Generator Enable */
3296
#define TSESEL0                (0x0200)       /* USB - Time Stamp Event Select Bit 0 */
3297
#define TSESEL1                (0x0400)       /* USB - Time Stamp Event Select Bit 1 */
3298
#define TSE3                   (0x0800)       /* USB - Time Stamp Event #3 Bit */
3299
//#define RESERVED       (0x1000)  /* USB -  */
3300
#define UTSEL0                 (0x2000)       /* USB - Timer Select Bit 0 */
3301
#define UTSEL1                 (0x4000)       /* USB - Timer Select Bit 1 */
3302
#define UTSEL2                 (0x8000)       /* USB - Timer Select Bit 2 */
3303
 
3304
/* USBMAINT Control Bits */
3305
#define UTIFG_L                (0x0001)       /* USB - Timer Interrupt Flag */
3306
#define UTIE_L                 (0x0002)       /* USB - Timer Interrupt Enable */
3307
//#define RESERVED       (0x0004)  /* USB -  */
3308
//#define RESERVED       (0x0008)  /* USB -  */
3309
//#define RESERVED       (0x0010)  /* USB -  */
3310
//#define RESERVED       (0x0020)  /* USB -  */
3311
//#define RESERVED       (0x0040)  /* USB -  */
3312
//#define RESERVED       (0x0080)  /* USB -  */
3313
//#define RESERVED       (0x1000)  /* USB -  */
3314
 
3315
/* USBMAINT Control Bits */
3316
//#define RESERVED       (0x0004)  /* USB -  */
3317
//#define RESERVED       (0x0008)  /* USB -  */
3318
//#define RESERVED       (0x0010)  /* USB -  */
3319
//#define RESERVED       (0x0020)  /* USB -  */
3320
//#define RESERVED       (0x0040)  /* USB -  */
3321
//#define RESERVED       (0x0080)  /* USB -  */
3322
#define TSGEN_H                (0x0001)       /* USB - Time Stamp Generator Enable */
3323
#define TSESEL0_H              (0x0002)       /* USB - Time Stamp Event Select Bit 0 */
3324
#define TSESEL1_H              (0x0004)       /* USB - Time Stamp Event Select Bit 1 */
3325
#define TSE3_H                 (0x0008)       /* USB - Time Stamp Event #3 Bit */
3326
//#define RESERVED       (0x1000)  /* USB -  */
3327
#define UTSEL0_H               (0x0020)       /* USB - Timer Select Bit 0 */
3328
#define UTSEL1_H               (0x0040)       /* USB - Timer Select Bit 1 */
3329
#define UTSEL2_H               (0x0080)       /* USB - Timer Select Bit 2 */
3330
 
3331
#define TSESEL_0               (0x0000)       /* USB - Time Stamp Event Select: 0 */
3332
#define TSESEL_1               (0x0200)       /* USB - Time Stamp Event Select: 1 */
3333
#define TSESEL_2               (0x0400)       /* USB - Time Stamp Event Select: 2 */
3334
#define TSESEL_3               (0x0600)       /* USB - Time Stamp Event Select: 3 */
3335
 
3336
#define UTSEL_0                (0x0000)       /* USB - Timer Select: 0 */
3337
#define UTSEL_1                (0x2000)       /* USB - Timer Select: 1 */
3338
#define UTSEL_2                (0x4000)       /* USB - Timer Select: 2 */
3339
#define UTSEL_3                (0x6000)       /* USB - Timer Select: 3 */
3340
#define UTSEL_4                (0x8000)       /* USB - Timer Select: 4 */
3341
#define UTSEL_5                (0xA000)       /* USB - Timer Select: 5 */
3342
#define UTSEL_6                (0xC000)       /* USB - Timer Select: 6 */
3343
#define UTSEL_7                (0xE000)       /* USB - Timer Select: 7 */
3344
 
3345
/* USBCTL Control Bits */
3346
#define DIR                    (0x0001)       /* USB - Data Response Bit */
3347
//#define RESERVED       (0x0002)  /* USB -  */
3348
//#define RESERVED       (0x0004)  /* USB -  */
3349
//#define RESERVED       (0x0008)  /* USB -  */
3350
#define FRSTE                  (0x0010)       /* USB - Function Reset Connection Enable */
3351
#define RWUP                   (0x0020)       /* USB - Device Remote Wakeup Request */
3352
#define FEN                    (0x0040)       /* USB - Function Enable Bit */
3353
//#define RESERVED       (0x0080)  /* USB -  */
3354
 
3355
/* USBIE Control Bits */
3356
#define STPOWIE                (0x0001)       /* USB - Setup Overwrite Interrupt Enable */
3357
//#define RESERVED       (0x0002)  /* USB -  */
3358
#define SETUPIE                (0x0004)       /* USB - Setup Interrupt Enable */
3359
//#define RESERVED       (0x0008)  /* USB -  */
3360
//#define RESERVED       (0x0010)  /* USB -  */
3361
#define RESRIE                 (0x0020)       /* USB - Function Resume Request Interrupt Enable */
3362
#define SUSRIE                 (0x0040)       /* USB - Function Suspend Request Interrupt Enable */
3363
#define RSTRIE                 (0x0080)       /* USB - Function Reset Request Interrupt Enable */
3364
 
3365
/* USBIFG Control Bits */
3366
#define STPOWIFG               (0x0001)       /* USB - Setup Overwrite Interrupt Flag */
3367
//#define RESERVED       (0x0002)  /* USB -  */
3368
#define SETUPIFG               (0x0004)       /* USB - Setup Interrupt Flag */
3369
//#define RESERVED       (0x0008)  /* USB -  */
3370
//#define RESERVED       (0x0010)  /* USB -  */
3371
#define RESRIFG                (0x0020)       /* USB - Function Resume Request Interrupt Flag */
3372
#define SUSRIFG                (0x0040)       /* USB - Function Suspend Request Interrupt Flag */
3373
#define RSTRIFG                (0x0080)       /* USB - Function Reset Request Interrupt Flag */
3374
 
3375
//values of USBVECINT when USB-interrupt occured
3376
#define     USBVECINT_NONE     0x00
3377
#define     USBVECINT_PWR_DROP 0x02
3378
#define     USBVECINT_PLL_LOCK 0x04
3379
#define     USBVECINT_PLL_SIGNAL 0x06
3380
#define     USBVECINT_PLL_RANGE 0x08
3381
#define     USBVECINT_PWR_VBUSOn 0x0A
3382
#define     USBVECINT_PWR_VBUSOff 0x0C
3383
#define     USBVECINT_USB_TIMESTAMP 0x10
3384
#define     USBVECINT_INPUT_ENDPOINT0 0x12
3385
#define     USBVECINT_OUTPUT_ENDPOINT0 0x14
3386
#define     USBVECINT_RSTR     0x16
3387
#define     USBVECINT_SUSR     0x18
3388
#define     USBVECINT_RESR     0x1A
3389
#define     USBVECINT_SETUP_PACKET_RECEIVED 0x20
3390
#define     USBVECINT_STPOW_PACKET_RECEIVED 0x22
3391
#define     USBVECINT_INPUT_ENDPOINT1 0x24
3392
#define     USBVECINT_INPUT_ENDPOINT2 0x26
3393
#define     USBVECINT_INPUT_ENDPOINT3 0x28
3394
#define     USBVECINT_INPUT_ENDPOINT4 0x2A
3395
#define     USBVECINT_INPUT_ENDPOINT5 0x2C
3396
#define     USBVECINT_INPUT_ENDPOINT6 0x2E
3397
#define     USBVECINT_INPUT_ENDPOINT7 0x30
3398
#define     USBVECINT_OUTPUT_ENDPOINT1 0x32
3399
#define     USBVECINT_OUTPUT_ENDPOINT2 0x34
3400
#define     USBVECINT_OUTPUT_ENDPOINT3 0x36
3401
#define     USBVECINT_OUTPUT_ENDPOINT4 0x38
3402
#define     USBVECINT_OUTPUT_ENDPOINT5 0x3A
3403
#define     USBVECINT_OUTPUT_ENDPOINT6 0x3C
3404
#define     USBVECINT_OUTPUT_ENDPOINT7 0x3E
3405
 
3406
 
3407
/* ========================================================================= */
3408
/* USB Operation Registers */
3409
/* ========================================================================= */
3410
 
3411
SFR_8BIT(USBIEPSIZXY_7);                      /* Input Endpoint_7: X/Y-buffer size  */
3412
SFR_8BIT(USBIEPBCTY_7);                       /* Input Endpoint_7: Y-byte count  */
3413
SFR_8BIT(USBIEPBBAY_7);                       /* Input Endpoint_7: Y-buffer base addr.  */
3414
//sfrb    Spare    (0x23FC)   /* Not used  */
3415
//sfrb    Spare    (0x23FB)   /* Not used  */
3416
SFR_8BIT(USBIEPBCTX_7);                       /* Input Endpoint_7: X-byte count  */
3417
SFR_8BIT(USBIEPBBAX_7);                       /* Input Endpoint_7: X-buffer base addr. */
3418
SFR_8BIT(USBIEPCNF_7);                        /* Input Endpoint_7: Configuration  */
3419
SFR_8BIT(USBIEPSIZXY_6);                      /* Input Endpoint_6: X/Y-buffer size  */
3420
SFR_8BIT(USBIEPBCTY_6);                       /* Input Endpoint_6: Y-byte count */
3421
SFR_8BIT(USBIEPBBAY_6);                       /* Input Endpoint_6: Y-buffer base addr. */
3422
//sfrb    Spare    (0x23F4)   /* Not used  */
3423
//sfrb    Spare    (0x23F3)   /* Not used  */
3424
SFR_8BIT(USBIEPBCTX_6);                       /* Input Endpoint_6: X-byte count */
3425
SFR_8BIT(USBIEPBBAX_6);                       /* Input Endpoint_6: X-buffer base addr. */
3426
SFR_8BIT(USBIEPCNF_6);                        /* Input Endpoint_6: Configuration */
3427
SFR_8BIT(USBIEPSIZXY_5);                      /* Input Endpoint_5: X/Y-buffer size */
3428
SFR_8BIT(USBIEPBCTY_5);                       /* Input Endpoint_5: Y-byte count */
3429
SFR_8BIT(USBIEPBBAY_5);                       /* Input Endpoint_5: Y-buffer base addr. */
3430
//sfrb    Spare    (0x23EC)   /* Not used */
3431
//sfrb    Spare    (0x23EB)   /* Not used */
3432
SFR_8BIT(USBIEPBCTX_5);                       /* Input Endpoint_5: X-byte count */
3433
SFR_8BIT(USBIEPBBAX_5);                       /* Input Endpoint_5: X-buffer base addr. */
3434
SFR_8BIT(USBIEPCNF_5);                        /* Input Endpoint_5: Configuration */
3435
SFR_8BIT(USBIEPSIZXY_4);                      /* Input Endpoint_4: X/Y-buffer size */
3436
SFR_8BIT(USBIEPBCTY_4);                       /* Input Endpoint_4: Y-byte count */
3437
SFR_8BIT(USBIEPBBAY_4);                       /* Input Endpoint_4: Y-buffer base addr. */
3438
//sfrb    Spare    (0x23E4)   /* Not used */
3439
//sfrb    Spare    (0x23E3)   /* Not used */
3440
SFR_8BIT(USBIEPBCTX_4);                       /* Input Endpoint_4: X-byte count */
3441
SFR_8BIT(USBIEPBBAX_4);                       /* Input Endpoint_4: X-buffer base addr. */
3442
SFR_8BIT(USBIEPCNF_4);                        /* Input Endpoint_4: Configuration */
3443
SFR_8BIT(USBIEPSIZXY_3);                      /* Input Endpoint_3: X/Y-buffer size */
3444
SFR_8BIT(USBIEPBCTY_3);                       /* Input Endpoint_3: Y-byte count */
3445
SFR_8BIT(USBIEPBBAY_3);                       /* Input Endpoint_3: Y-buffer base addr. */
3446
//sfrb    Spare    (0x23DC)   /* Not used */
3447
//sfrb    Spare    (0x23DB)   /* Not used */
3448
SFR_8BIT(USBIEPBCTX_3);                       /* Input Endpoint_3: X-byte count */
3449
SFR_8BIT(USBIEPBBAX_3);                       /* Input Endpoint_3: X-buffer base addr. */
3450
SFR_8BIT(USBIEPCNF_3);                        /* Input Endpoint_3: Configuration */
3451
SFR_8BIT(USBIEPSIZXY_2);                      /* Input Endpoint_2: X/Y-buffer size */
3452
SFR_8BIT(USBIEPBCTY_2);                       /* Input Endpoint_2: Y-byte count */
3453
SFR_8BIT(USBIEPBBAY_2);                       /* Input Endpoint_2: Y-buffer base addr. */
3454
//sfrb    Spare    (0x23D4)   /* Not used */
3455
//sfrb    Spare    (0x23D3)   /* Not used */
3456
SFR_8BIT(USBIEPBCTX_2);                       /* Input Endpoint_2: X-byte count */
3457
SFR_8BIT(USBIEPBBAX_2);                       /* Input Endpoint_2: X-buffer base addr. */
3458
SFR_8BIT(USBIEPCNF_2);                        /* Input Endpoint_2: Configuration */
3459
SFR_8BIT(USBIEPSIZXY_1);                      /* Input Endpoint_1: X/Y-buffer size */
3460
SFR_8BIT(USBIEPBCTY_1);                       /* Input Endpoint_1: Y-byte count */
3461
SFR_8BIT(USBIEPBBAY_1);                       /* Input Endpoint_1: Y-buffer base addr. */
3462
//sfrb    Spare    (0x23CC)   /* Not used */
3463
//sfrb    Spare    (0x23CB)   /* Not used */
3464
SFR_8BIT(USBIEPBCTX_1);                       /* Input Endpoint_1: X-byte count */
3465
SFR_8BIT(USBIEPBBAX_1);                       /* Input Endpoint_1: X-buffer base addr. */
3466
SFR_8BIT(USBIEPCNF_1);                        /* Input Endpoint_1: Configuration */
3467
//sfrb       (0x23C7)   0x0000 */
3468
//sfrb     RESERVED      (0x1C00)    /* */
3469
//sfrb       (0x23C0)   0x0000 */
3470
SFR_8BIT(USBOEPSIZXY_7);                      /* Output Endpoint_7: X/Y-buffer size */
3471
SFR_8BIT(USBOEPBCTY_7);                       /* Output Endpoint_7: Y-byte count */
3472
SFR_8BIT(USBOEPBBAY_7);                       /* Output Endpoint_7: Y-buffer base addr. */
3473
//sfrb    Spare    (0x23BC)   /* Not used */
3474
//sfrb    Spare    (0x23BB)   /* Not used */
3475
SFR_8BIT(USBOEPBCTX_7);                       /* Output Endpoint_7: X-byte count */
3476
SFR_8BIT(USBOEPBBAX_7);                       /* Output Endpoint_7: X-buffer base addr. */
3477
SFR_8BIT(USBOEPCNF_7);                        /* Output Endpoint_7: Configuration */
3478
SFR_8BIT(USBOEPSIZXY_6);                      /* Output Endpoint_6: X/Y-buffer size */
3479
SFR_8BIT(USBOEPBCTY_6);                       /* Output Endpoint_6: Y-byte count */
3480
SFR_8BIT(USBOEPBBAY_6);                       /* Output Endpoint_6: Y-buffer base addr. */
3481
//sfrb    Spare    (0x23B4)   /* Not used */
3482
//sfrb    Spare    (0x23B3)   /* Not used */
3483
SFR_8BIT(USBOEPBCTX_6);                       /* Output Endpoint_6: X-byte count */
3484
SFR_8BIT(USBOEPBBAX_6);                       /* Output Endpoint_6: X-buffer base addr. */
3485
SFR_8BIT(USBOEPCNF_6);                        /* Output Endpoint_6: Configuration */
3486
SFR_8BIT(USBOEPSIZXY_5);                      /* Output Endpoint_5: X/Y-buffer size */
3487
SFR_8BIT(USBOEPBCTY_5);                       /* Output Endpoint_5: Y-byte count */
3488
SFR_8BIT(USBOEPBBAY_5);                       /* Output Endpoint_5: Y-buffer base addr. */
3489
//sfrb    Spare    (0x23AC)   /* Not used */
3490
//sfrb    Spare    (0x23AB)   /* Not used */
3491
SFR_8BIT(USBOEPBCTX_5);                       /* Output Endpoint_5: X-byte count */
3492
SFR_8BIT(USBOEPBBAX_5);                       /* Output Endpoint_5: X-buffer base addr. */
3493
SFR_8BIT(USBOEPCNF_5);                        /* Output Endpoint_5: Configuration */
3494
SFR_8BIT(USBOEPSIZXY_4);                      /* Output Endpoint_4: X/Y-buffer size */
3495
SFR_8BIT(USBOEPBCTY_4);                       /* Output Endpoint_4: Y-byte count */
3496
SFR_8BIT(USBOEPBBAY_4);                       /* Output Endpoint_4: Y-buffer base addr. */
3497
//sfrb    Spare    (0x23A4)   /* Not used */
3498
//sfrb    Spare    (0x23A3)   /* Not used */
3499
SFR_8BIT(USBOEPBCTX_4);                       /* Output Endpoint_4: X-byte count */
3500
SFR_8BIT(USBOEPBBAX_4);                       /* Output Endpoint_4: X-buffer base addr. */
3501
SFR_8BIT(USBOEPCNF_4);                        /* Output Endpoint_4: Configuration */
3502
SFR_8BIT(USBOEPSIZXY_3);                      /* Output Endpoint_3: X/Y-buffer size */
3503
SFR_8BIT(USBOEPBCTY_3);                       /* Output Endpoint_3: Y-byte count */
3504
SFR_8BIT(USBOEPBBAY_3);                       /* Output Endpoint_3: Y-buffer base addr. */
3505
//sfrb    Spare    (0x239C)   /* Not used */
3506
//sfrb    Spare    (0x239B)   /* Not used */
3507
SFR_8BIT(USBOEPBCTX_3);                       /* Output Endpoint_3: X-byte count */
3508
SFR_8BIT(USBOEPBBAX_3);                       /* Output Endpoint_3: X-buffer base addr. */
3509
SFR_8BIT(USBOEPCNF_3);                        /* Output Endpoint_3: Configuration */
3510
SFR_8BIT(USBOEPSIZXY_2);                      /* Output Endpoint_2: X/Y-buffer size */
3511
SFR_8BIT(USBOEPBCTY_2);                       /* Output Endpoint_2: Y-byte count */
3512
SFR_8BIT(USBOEPBBAY_2);                       /* Output Endpoint_2: Y-buffer base addr. */
3513
//sfrb    Spare    (0x2394)   /* Not used */
3514
//sfrb    Spare    (0x2393)   /* Not used */
3515
SFR_8BIT(USBOEPBCTX_2);                       /* Output Endpoint_2: X-byte count */
3516
SFR_8BIT(USBOEPBBAX_2);                       /* Output Endpoint_2: X-buffer base addr. */
3517
SFR_8BIT(USBOEPCNF_2);                        /* Output Endpoint_2: Configuration */
3518
SFR_8BIT(USBOEPSIZXY_1);                      /* Output Endpoint_1: X/Y-buffer size */
3519
SFR_8BIT(USBOEPBCTY_1);                       /* Output Endpoint_1: Y-byte count */
3520
SFR_8BIT(USBOEPBBAY_1);                       /* Output Endpoint_1: Y-buffer base addr. */
3521
//sfrb    Spare    (0x238C)   /* Not used */
3522
//sfrb    Spare    (0x238B)   /* Not used */
3523
SFR_8BIT(USBOEPBCTX_1);                       /* Output Endpoint_1: X-byte count */
3524
SFR_8BIT(USBOEPBBAX_1);                       /* Output Endpoint_1: X-buffer base addr. */
3525
SFR_8BIT(USBOEPCNF_1);                        /* Output Endpoint_1: Configuration */
3526
SFR_8BIT(USBSUBLK);                           /* Setup Packet Block */
3527
SFR_8BIT(USBIEP0BUF);                         /* Input endpoint_0 buffer */
3528
SFR_8BIT(USBOEP0BUF);                         /* Output endpoint_0 buffer */
3529
SFR_8BIT(USBTOPBUFF);                         /* Top of buffer space */
3530
//         (1904 Bytes)               /* Buffer space */
3531
SFR_8BIT(USBSTABUFF);                         /* Start of buffer space */
3532
 
3533
/* USBIEPCNF_n Control Bits */
3534
/* USBOEPCNF_n Control Bits */
3535
//#define RESERVED       (0x0001)  /* USB -  */
3536
//#define RESERVED       (0x0001)  /* USB -  */
3537
#define DBUF                   (0x0010)       /* USB - Double Buffer Enable */
3538
//#define RESERVED       (0x0040)  /* USB -  */
3539
 
3540
/* USBIEPBCNT_n Control Bits */
3541
/* USBOEPBCNT_n Control Bits */
3542
#define CNT4                   (0x0010)       /* USB - Byte Count Bit 3 */
3543
#define CNT5                   (0x0020)       /* USB - Byte Count Bit 3 */
3544
#define CNT6                   (0x0040)       /* USB - Byte Count Bit 3 */
3545
/************************************************************
3546
* UNIFIED CLOCK SYSTEM
3547
************************************************************/
3548
#define __MSP430_HAS_UCS__                    /* Definition to show that Module is available */
3549
#define __MSP430_BASEADDRESS_UCS__ 0x0160
3550
 
3551
SFR_16BIT(UCSCTL0);                           /* UCS Control Register 0 */
3552
SFR_8BIT(UCSCTL0_L);                          /* UCS Control Register 0 */
3553
SFR_8BIT(UCSCTL0_H);                          /* UCS Control Register 0 */
3554
SFR_16BIT(UCSCTL1);                           /* UCS Control Register 1 */
3555
SFR_8BIT(UCSCTL1_L);                          /* UCS Control Register 1 */
3556
SFR_8BIT(UCSCTL1_H);                          /* UCS Control Register 1 */
3557
SFR_16BIT(UCSCTL2);                           /* UCS Control Register 2 */
3558
SFR_8BIT(UCSCTL2_L);                          /* UCS Control Register 2 */
3559
SFR_8BIT(UCSCTL2_H);                          /* UCS Control Register 2 */
3560
SFR_16BIT(UCSCTL3);                           /* UCS Control Register 3 */
3561
SFR_8BIT(UCSCTL3_L);                          /* UCS Control Register 3 */
3562
SFR_8BIT(UCSCTL3_H);                          /* UCS Control Register 3 */
3563
SFR_16BIT(UCSCTL4);                           /* UCS Control Register 4 */
3564
SFR_8BIT(UCSCTL4_L);                          /* UCS Control Register 4 */
3565
SFR_8BIT(UCSCTL4_H);                          /* UCS Control Register 4 */
3566
SFR_16BIT(UCSCTL5);                           /* UCS Control Register 5 */
3567
SFR_8BIT(UCSCTL5_L);                          /* UCS Control Register 5 */
3568
SFR_8BIT(UCSCTL5_H);                          /* UCS Control Register 5 */
3569
SFR_16BIT(UCSCTL6);                           /* UCS Control Register 6 */
3570
SFR_8BIT(UCSCTL6_L);                          /* UCS Control Register 6 */
3571
SFR_8BIT(UCSCTL6_H);                          /* UCS Control Register 6 */
3572
SFR_16BIT(UCSCTL7);                           /* UCS Control Register 7 */
3573
SFR_8BIT(UCSCTL7_L);                          /* UCS Control Register 7 */
3574
SFR_8BIT(UCSCTL7_H);                          /* UCS Control Register 7 */
3575
SFR_16BIT(UCSCTL8);                           /* UCS Control Register 8 */
3576
SFR_8BIT(UCSCTL8_L);                          /* UCS Control Register 8 */
3577
SFR_8BIT(UCSCTL8_H);                          /* UCS Control Register 8 */
3578
 
3579
/* UCSCTL0 Control Bits */
3580
//#define RESERVED            (0x0001)    /* RESERVED */
3581
//#define RESERVED            (0x0002)    /* RESERVED */
3582
//#define RESERVED            (0x0004)    /* RESERVED */
3583
#define MOD0                   (0x0008)       /* Modulation Bit Counter Bit : 0 */
3584
#define MOD1                   (0x0010)       /* Modulation Bit Counter Bit : 1 */
3585
#define MOD2                   (0x0020)       /* Modulation Bit Counter Bit : 2 */
3586
#define MOD3                   (0x0040)       /* Modulation Bit Counter Bit : 3 */
3587
#define MOD4                   (0x0080)       /* Modulation Bit Counter Bit : 4 */
3588
#define DCO0                   (0x0100)       /* DCO TAP Bit : 0 */
3589
#define DCO1                   (0x0200)       /* DCO TAP Bit : 1 */
3590
#define DCO2                   (0x0400)       /* DCO TAP Bit : 2 */
3591
#define DCO3                   (0x0800)       /* DCO TAP Bit : 3 */
3592
#define DCO4                   (0x1000)       /* DCO TAP Bit : 4 */
3593
//#define RESERVED            (0x2000)    /* RESERVED */
3594
//#define RESERVED            (0x4000)    /* RESERVED */
3595
//#define RESERVED            (0x8000)    /* RESERVED */
3596
 
3597
/* UCSCTL0 Control Bits */
3598
//#define RESERVED            (0x0001)    /* RESERVED */
3599
//#define RESERVED            (0x0002)    /* RESERVED */
3600
//#define RESERVED            (0x0004)    /* RESERVED */
3601
#define MOD0_L                 (0x0008)       /* Modulation Bit Counter Bit : 0 */
3602
#define MOD1_L                 (0x0010)       /* Modulation Bit Counter Bit : 1 */
3603
#define MOD2_L                 (0x0020)       /* Modulation Bit Counter Bit : 2 */
3604
#define MOD3_L                 (0x0040)       /* Modulation Bit Counter Bit : 3 */
3605
#define MOD4_L                 (0x0080)       /* Modulation Bit Counter Bit : 4 */
3606
//#define RESERVED            (0x2000)    /* RESERVED */
3607
//#define RESERVED            (0x4000)    /* RESERVED */
3608
//#define RESERVED            (0x8000)    /* RESERVED */
3609
 
3610
/* UCSCTL0 Control Bits */
3611
//#define RESERVED            (0x0001)    /* RESERVED */
3612
//#define RESERVED            (0x0002)    /* RESERVED */
3613
//#define RESERVED            (0x0004)    /* RESERVED */
3614
#define DCO0_H                 (0x0001)       /* DCO TAP Bit : 0 */
3615
#define DCO1_H                 (0x0002)       /* DCO TAP Bit : 1 */
3616
#define DCO2_H                 (0x0004)       /* DCO TAP Bit : 2 */
3617
#define DCO3_H                 (0x0008)       /* DCO TAP Bit : 3 */
3618
#define DCO4_H                 (0x0010)       /* DCO TAP Bit : 4 */
3619
//#define RESERVED            (0x2000)    /* RESERVED */
3620
//#define RESERVED            (0x4000)    /* RESERVED */
3621
//#define RESERVED            (0x8000)    /* RESERVED */
3622
 
3623
/* UCSCTL1 Control Bits */
3624
#define DISMOD                 (0x0001)       /* Disable Modulation */
3625
//#define RESERVED            (0x0002)    /* RESERVED */
3626
//#define RESERVED            (0x0004)    /* RESERVED */
3627
//#define RESERVED            (0x0008)    /* RESERVED */
3628
#define DCORSEL0               (0x0010)       /* DCO Freq. Range Select Bit : 0 */
3629
#define DCORSEL1               (0x0020)       /* DCO Freq. Range Select Bit : 1 */
3630
#define DCORSEL2               (0x0040)       /* DCO Freq. Range Select Bit : 2 */
3631
//#define RESERVED            (0x0080)    /* RESERVED */
3632
//#define RESERVED            (0x0100)    /* RESERVED */
3633
//#define RESERVED            (0x0200)    /* RESERVED */
3634
//#define RESERVED            (0x0400)    /* RESERVED */
3635
//#define RESERVED            (0x0800)    /* RESERVED */
3636
//#define RESERVED            (0x1000)    /* RESERVED */
3637
//#define RESERVED            (0x2000)    /* RESERVED */
3638
//#define RESERVED            (0x4000)    /* RESERVED */
3639
//#define RESERVED            (0x8000)    /* RESERVED */
3640
 
3641
/* UCSCTL1 Control Bits */
3642
#define DISMOD_L               (0x0001)       /* Disable Modulation */
3643
//#define RESERVED            (0x0002)    /* RESERVED */
3644
//#define RESERVED            (0x0004)    /* RESERVED */
3645
//#define RESERVED            (0x0008)    /* RESERVED */
3646
#define DCORSEL0_L             (0x0010)       /* DCO Freq. Range Select Bit : 0 */
3647
#define DCORSEL1_L             (0x0020)       /* DCO Freq. Range Select Bit : 1 */
3648
#define DCORSEL2_L             (0x0040)       /* DCO Freq. Range Select Bit : 2 */
3649
//#define RESERVED            (0x0080)    /* RESERVED */
3650
//#define RESERVED            (0x0100)    /* RESERVED */
3651
//#define RESERVED            (0x0200)    /* RESERVED */
3652
//#define RESERVED            (0x0400)    /* RESERVED */
3653
//#define RESERVED            (0x0800)    /* RESERVED */
3654
//#define RESERVED            (0x1000)    /* RESERVED */
3655
//#define RESERVED            (0x2000)    /* RESERVED */
3656
//#define RESERVED            (0x4000)    /* RESERVED */
3657
//#define RESERVED            (0x8000)    /* RESERVED */
3658
 
3659
/* UCSCTL1 Control Bits */
3660
//#define RESERVED            (0x0002)    /* RESERVED */
3661
//#define RESERVED            (0x0004)    /* RESERVED */
3662
//#define RESERVED            (0x0008)    /* RESERVED */
3663
//#define RESERVED            (0x0080)    /* RESERVED */
3664
//#define RESERVED            (0x0100)    /* RESERVED */
3665
//#define RESERVED            (0x0200)    /* RESERVED */
3666
//#define RESERVED            (0x0400)    /* RESERVED */
3667
//#define RESERVED            (0x0800)    /* RESERVED */
3668
//#define RESERVED            (0x1000)    /* RESERVED */
3669
//#define RESERVED            (0x2000)    /* RESERVED */
3670
//#define RESERVED            (0x4000)    /* RESERVED */
3671
//#define RESERVED            (0x8000)    /* RESERVED */
3672
 
3673
#define DCORSEL_0              (0x0000)       /* DCO RSEL 0 */
3674
#define DCORSEL_1              (0x0010)       /* DCO RSEL 1 */
3675
#define DCORSEL_2              (0x0020)       /* DCO RSEL 2 */
3676
#define DCORSEL_3              (0x0030)       /* DCO RSEL 3 */
3677
#define DCORSEL_4              (0x0040)       /* DCO RSEL 4 */
3678
#define DCORSEL_5              (0x0050)       /* DCO RSEL 5 */
3679
#define DCORSEL_6              (0x0060)       /* DCO RSEL 6 */
3680
#define DCORSEL_7              (0x0070)       /* DCO RSEL 7 */
3681
 
3682
/* UCSCTL2 Control Bits */
3683
#define FLLN0                  (0x0001)       /* FLL Multipier Bit : 0 */
3684
#define FLLN1                  (0x0002)       /* FLL Multipier Bit : 1 */
3685
#define FLLN2                  (0x0004)       /* FLL Multipier Bit : 2 */
3686
#define FLLN3                  (0x0008)       /* FLL Multipier Bit : 3 */
3687
#define FLLN4                  (0x0010)       /* FLL Multipier Bit : 4 */
3688
#define FLLN5                  (0x0020)       /* FLL Multipier Bit : 5 */
3689
#define FLLN6                  (0x0040)       /* FLL Multipier Bit : 6 */
3690
#define FLLN7                  (0x0080)       /* FLL Multipier Bit : 7 */
3691
#define FLLN8                  (0x0100)       /* FLL Multipier Bit : 8 */
3692
#define FLLN9                  (0x0200)       /* FLL Multipier Bit : 9 */
3693
//#define RESERVED            (0x0400)    /* RESERVED */
3694
//#define RESERVED            (0x0800)    /* RESERVED */
3695
#define FLLD0                  (0x1000)       /* Loop Divider Bit : 0 */
3696
#define FLLD1                  (0x2000)       /* Loop Divider Bit : 1 */
3697
#define FLLD2                  (0x4000)       /* Loop Divider Bit : 1 */
3698
//#define RESERVED            (0x8000)    /* RESERVED */
3699
 
3700
/* UCSCTL2 Control Bits */
3701
#define FLLN0_L                (0x0001)       /* FLL Multipier Bit : 0 */
3702
#define FLLN1_L                (0x0002)       /* FLL Multipier Bit : 1 */
3703
#define FLLN2_L                (0x0004)       /* FLL Multipier Bit : 2 */
3704
#define FLLN3_L                (0x0008)       /* FLL Multipier Bit : 3 */
3705
#define FLLN4_L                (0x0010)       /* FLL Multipier Bit : 4 */
3706
#define FLLN5_L                (0x0020)       /* FLL Multipier Bit : 5 */
3707
#define FLLN6_L                (0x0040)       /* FLL Multipier Bit : 6 */
3708
#define FLLN7_L                (0x0080)       /* FLL Multipier Bit : 7 */
3709
//#define RESERVED            (0x0400)    /* RESERVED */
3710
//#define RESERVED            (0x0800)    /* RESERVED */
3711
//#define RESERVED            (0x8000)    /* RESERVED */
3712
 
3713
/* UCSCTL2 Control Bits */
3714
#define FLLN8_H                (0x0001)       /* FLL Multipier Bit : 8 */
3715
#define FLLN9_H                (0x0002)       /* FLL Multipier Bit : 9 */
3716
//#define RESERVED            (0x0400)    /* RESERVED */
3717
//#define RESERVED            (0x0800)    /* RESERVED */
3718
#define FLLD0_H                (0x0010)       /* Loop Divider Bit : 0 */
3719
#define FLLD1_H                (0x0020)       /* Loop Divider Bit : 1 */
3720
#define FLLD2_H                (0x0040)       /* Loop Divider Bit : 1 */
3721
//#define RESERVED            (0x8000)    /* RESERVED */
3722
 
3723
#define FLLD_0                 (0x0000)       /* Multiply Selected Loop Freq. 1 */
3724
#define FLLD_1                 (0x1000)       /* Multiply Selected Loop Freq. 2 */
3725
#define FLLD_2                 (0x2000)       /* Multiply Selected Loop Freq. 4 */
3726
#define FLLD_3                 (0x3000)       /* Multiply Selected Loop Freq. 8 */
3727
#define FLLD_4                 (0x4000)       /* Multiply Selected Loop Freq. 16 */
3728
#define FLLD_5                 (0x5000)       /* Multiply Selected Loop Freq. 32 */
3729
#define FLLD_6                 (0x6000)       /* Multiply Selected Loop Freq. 32 */
3730
#define FLLD_7                 (0x7000)       /* Multiply Selected Loop Freq. 32 */
3731
#define FLLD__1                (0x0000)       /* Multiply Selected Loop Freq. By 1 */
3732
#define FLLD__2                (0x1000)       /* Multiply Selected Loop Freq. By 2 */
3733
#define FLLD__4                (0x2000)       /* Multiply Selected Loop Freq. By 4 */
3734
#define FLLD__8                (0x3000)       /* Multiply Selected Loop Freq. By 8 */
3735
#define FLLD__16               (0x4000)       /* Multiply Selected Loop Freq. By 16 */
3736
#define FLLD__32               (0x5000)       /* Multiply Selected Loop Freq. By 32 */
3737
 
3738
/* UCSCTL3 Control Bits */
3739
#define FLLREFDIV0             (0x0001)       /* Reference Divider Bit : 0 */
3740
#define FLLREFDIV1             (0x0002)       /* Reference Divider Bit : 1 */
3741
#define FLLREFDIV2             (0x0004)       /* Reference Divider Bit : 2 */
3742
//#define RESERVED            (0x0008)    /* RESERVED */
3743
#define SELREF0                (0x0010)       /* FLL Reference Clock Select Bit : 0 */
3744
#define SELREF1                (0x0020)       /* FLL Reference Clock Select Bit : 1 */
3745
#define SELREF2                (0x0040)       /* FLL Reference Clock Select Bit : 2 */
3746
//#define RESERVED            (0x0080)    /* RESERVED */
3747
//#define RESERVED            (0x0100)    /* RESERVED */
3748
//#define RESERVED            (0x0200)    /* RESERVED */
3749
//#define RESERVED            (0x0400)    /* RESERVED */
3750
//#define RESERVED            (0x0800)    /* RESERVED */
3751
//#define RESERVED            (0x1000)    /* RESERVED */
3752
//#define RESERVED            (0x2000)    /* RESERVED */
3753
//#define RESERVED            (0x4000)    /* RESERVED */
3754
//#define RESERVED            (0x8000)    /* RESERVED */
3755
 
3756
/* UCSCTL3 Control Bits */
3757
#define FLLREFDIV0_L           (0x0001)       /* Reference Divider Bit : 0 */
3758
#define FLLREFDIV1_L           (0x0002)       /* Reference Divider Bit : 1 */
3759
#define FLLREFDIV2_L           (0x0004)       /* Reference Divider Bit : 2 */
3760
//#define RESERVED            (0x0008)    /* RESERVED */
3761
#define SELREF0_L              (0x0010)       /* FLL Reference Clock Select Bit : 0 */
3762
#define SELREF1_L              (0x0020)       /* FLL Reference Clock Select Bit : 1 */
3763
#define SELREF2_L              (0x0040)       /* FLL Reference Clock Select Bit : 2 */
3764
//#define RESERVED            (0x0080)    /* RESERVED */
3765
//#define RESERVED            (0x0100)    /* RESERVED */
3766
//#define RESERVED            (0x0200)    /* RESERVED */
3767
//#define RESERVED            (0x0400)    /* RESERVED */
3768
//#define RESERVED            (0x0800)    /* RESERVED */
3769
//#define RESERVED            (0x1000)    /* RESERVED */
3770
//#define RESERVED            (0x2000)    /* RESERVED */
3771
//#define RESERVED            (0x4000)    /* RESERVED */
3772
//#define RESERVED            (0x8000)    /* RESERVED */
3773
 
3774
/* UCSCTL3 Control Bits */
3775
//#define RESERVED            (0x0008)    /* RESERVED */
3776
//#define RESERVED            (0x0080)    /* RESERVED */
3777
//#define RESERVED            (0x0100)    /* RESERVED */
3778
//#define RESERVED            (0x0200)    /* RESERVED */
3779
//#define RESERVED            (0x0400)    /* RESERVED */
3780
//#define RESERVED            (0x0800)    /* RESERVED */
3781
//#define RESERVED            (0x1000)    /* RESERVED */
3782
//#define RESERVED            (0x2000)    /* RESERVED */
3783
//#define RESERVED            (0x4000)    /* RESERVED */
3784
//#define RESERVED            (0x8000)    /* RESERVED */
3785
 
3786
#define FLLREFDIV_0            (0x0000)       /* Reference Divider: f(LFCLK)/1 */
3787
#define FLLREFDIV_1            (0x0001)       /* Reference Divider: f(LFCLK)/2 */
3788
#define FLLREFDIV_2            (0x0002)       /* Reference Divider: f(LFCLK)/4 */
3789
#define FLLREFDIV_3            (0x0003)       /* Reference Divider: f(LFCLK)/8 */
3790
#define FLLREFDIV_4            (0x0004)       /* Reference Divider: f(LFCLK)/12 */
3791
#define FLLREFDIV_5            (0x0005)       /* Reference Divider: f(LFCLK)/16 */
3792
#define FLLREFDIV_6            (0x0006)       /* Reference Divider: f(LFCLK)/16 */
3793
#define FLLREFDIV_7            (0x0007)       /* Reference Divider: f(LFCLK)/16 */
3794
#define FLLREFDIV__1           (0x0000)       /* Reference Divider: f(LFCLK)/1 */
3795
#define FLLREFDIV__2           (0x0001)       /* Reference Divider: f(LFCLK)/2 */
3796
#define FLLREFDIV__4           (0x0002)       /* Reference Divider: f(LFCLK)/4 */
3797
#define FLLREFDIV__8           (0x0003)       /* Reference Divider: f(LFCLK)/8 */
3798
#define FLLREFDIV__12          (0x0004)       /* Reference Divider: f(LFCLK)/12 */
3799
#define FLLREFDIV__16          (0x0005)       /* Reference Divider: f(LFCLK)/16 */
3800
#define SELREF_0               (0x0000)       /* FLL Reference Clock Select 0 */
3801
#define SELREF_1               (0x0010)       /* FLL Reference Clock Select 1 */
3802
#define SELREF_2               (0x0020)       /* FLL Reference Clock Select 2 */
3803
#define SELREF_3               (0x0030)       /* FLL Reference Clock Select 3 */
3804
#define SELREF_4               (0x0040)       /* FLL Reference Clock Select 4 */
3805
#define SELREF_5               (0x0050)       /* FLL Reference Clock Select 5 */
3806
#define SELREF_6               (0x0060)       /* FLL Reference Clock Select 6 */
3807
#define SELREF_7               (0x0070)       /* FLL Reference Clock Select 7 */
3808
#define SELREF__XT1CLK         (0x0000)       /* Multiply Selected Loop Freq. By XT1CLK */
3809
#define SELREF__REFOCLK        (0x0020)       /* Multiply Selected Loop Freq. By REFOCLK */
3810
#define SELREF__XT2CLK         (0x0050)       /* Multiply Selected Loop Freq. By XT2CLK */
3811
 
3812
/* UCSCTL4 Control Bits */
3813
#define SELM0                  (0x0001)       /* MCLK Source Select Bit: 0 */
3814
#define SELM1                  (0x0002)       /* MCLK Source Select Bit: 1 */
3815
#define SELM2                  (0x0004)       /* MCLK Source Select Bit: 2 */
3816
//#define RESERVED            (0x0008)    /* RESERVED */
3817
#define SELS0                  (0x0010)       /* SMCLK Source Select Bit: 0 */
3818
#define SELS1                  (0x0020)       /* SMCLK Source Select Bit: 1 */
3819
#define SELS2                  (0x0040)       /* SMCLK Source Select Bit: 2 */
3820
//#define RESERVED            (0x0080)    /* RESERVED */
3821
#define SELA0                  (0x0100)       /* ACLK Source Select Bit: 0 */
3822
#define SELA1                  (0x0200)       /* ACLK Source Select Bit: 1 */
3823
#define SELA2                  (0x0400)       /* ACLK Source Select Bit: 2 */
3824
//#define RESERVED            (0x0800)    /* RESERVED */
3825
//#define RESERVED            (0x1000)    /* RESERVED */
3826
//#define RESERVED            (0x2000)    /* RESERVED */
3827
//#define RESERVED            (0x4000)    /* RESERVED */
3828
//#define RESERVED            (0x8000)    /* RESERVED */
3829
 
3830
/* UCSCTL4 Control Bits */
3831
#define SELM0_L                (0x0001)       /* MCLK Source Select Bit: 0 */
3832
#define SELM1_L                (0x0002)       /* MCLK Source Select Bit: 1 */
3833
#define SELM2_L                (0x0004)       /* MCLK Source Select Bit: 2 */
3834
//#define RESERVED            (0x0008)    /* RESERVED */
3835
#define SELS0_L                (0x0010)       /* SMCLK Source Select Bit: 0 */
3836
#define SELS1_L                (0x0020)       /* SMCLK Source Select Bit: 1 */
3837
#define SELS2_L                (0x0040)       /* SMCLK Source Select Bit: 2 */
3838
//#define RESERVED            (0x0080)    /* RESERVED */
3839
//#define RESERVED            (0x0800)    /* RESERVED */
3840
//#define RESERVED            (0x1000)    /* RESERVED */
3841
//#define RESERVED            (0x2000)    /* RESERVED */
3842
//#define RESERVED            (0x4000)    /* RESERVED */
3843
//#define RESERVED            (0x8000)    /* RESERVED */
3844
 
3845
/* UCSCTL4 Control Bits */
3846
//#define RESERVED            (0x0008)    /* RESERVED */
3847
//#define RESERVED            (0x0080)    /* RESERVED */
3848
#define SELA0_H                (0x0001)       /* ACLK Source Select Bit: 0 */
3849
#define SELA1_H                (0x0002)       /* ACLK Source Select Bit: 1 */
3850
#define SELA2_H                (0x0004)       /* ACLK Source Select Bit: 2 */
3851
//#define RESERVED            (0x0800)    /* RESERVED */
3852
//#define RESERVED            (0x1000)    /* RESERVED */
3853
//#define RESERVED            (0x2000)    /* RESERVED */
3854
//#define RESERVED            (0x4000)    /* RESERVED */
3855
//#define RESERVED            (0x8000)    /* RESERVED */
3856
 
3857
#define SELM_0                 (0x0000)       /* MCLK Source Select 0 */
3858
#define SELM_1                 (0x0001)       /* MCLK Source Select 1 */
3859
#define SELM_2                 (0x0002)       /* MCLK Source Select 2 */
3860
#define SELM_3                 (0x0003)       /* MCLK Source Select 3 */
3861
#define SELM_4                 (0x0004)       /* MCLK Source Select 4 */
3862
#define SELM_5                 (0x0005)       /* MCLK Source Select 5 */
3863
#define SELM_6                 (0x0006)       /* MCLK Source Select 6 */
3864
#define SELM_7                 (0x0007)       /* MCLK Source Select 7 */
3865
#define SELM__XT1CLK           (0x0000)       /* MCLK Source Select XT1CLK */
3866
#define SELM__VLOCLK           (0x0001)       /* MCLK Source Select VLOCLK */
3867
#define SELM__REFOCLK          (0x0002)       /* MCLK Source Select REFOCLK */
3868
#define SELM__DCOCLK           (0x0003)       /* MCLK Source Select DCOCLK */
3869
#define SELM__DCOCLKDIV        (0x0004)       /* MCLK Source Select DCOCLKDIV */
3870
#define SELM__XT2CLK           (0x0005)       /* MCLK Source Select XT2CLK */
3871
 
3872
#define SELS_0                 (0x0000)       /* SMCLK Source Select 0 */
3873
#define SELS_1                 (0x0010)       /* SMCLK Source Select 1 */
3874
#define SELS_2                 (0x0020)       /* SMCLK Source Select 2 */
3875
#define SELS_3                 (0x0030)       /* SMCLK Source Select 3 */
3876
#define SELS_4                 (0x0040)       /* SMCLK Source Select 4 */
3877
#define SELS_5                 (0x0050)       /* SMCLK Source Select 5 */
3878
#define SELS_6                 (0x0060)       /* SMCLK Source Select 6 */
3879
#define SELS_7                 (0x0070)       /* SMCLK Source Select 7 */
3880
#define SELS__XT1CLK           (0x0000)       /* SMCLK Source Select XT1CLK */
3881
#define SELS__VLOCLK           (0x0010)       /* SMCLK Source Select VLOCLK */
3882
#define SELS__REFOCLK          (0x0020)       /* SMCLK Source Select REFOCLK */
3883
#define SELS__DCOCLK           (0x0030)       /* SMCLK Source Select DCOCLK */
3884
#define SELS__DCOCLKDIV        (0x0040)       /* SMCLK Source Select DCOCLKDIV */
3885
#define SELS__XT2CLK           (0x0050)       /* SMCLK Source Select XT2CLK */
3886
 
3887
#define SELA_0                 (0x0000)       /* ACLK Source Select 0 */
3888
#define SELA_1                 (0x0100)       /* ACLK Source Select 1 */
3889
#define SELA_2                 (0x0200)       /* ACLK Source Select 2 */
3890
#define SELA_3                 (0x0300)       /* ACLK Source Select 3 */
3891
#define SELA_4                 (0x0400)       /* ACLK Source Select 4 */
3892
#define SELA_5                 (0x0500)       /* ACLK Source Select 5 */
3893
#define SELA_6                 (0x0600)       /* ACLK Source Select 6 */
3894
#define SELA_7                 (0x0700)       /* ACLK Source Select 7 */
3895
#define SELA__XT1CLK           (0x0000)       /* ACLK Source Select XT1CLK */
3896
#define SELA__VLOCLK           (0x0100)       /* ACLK Source Select VLOCLK */
3897
#define SELA__REFOCLK          (0x0200)       /* ACLK Source Select REFOCLK */
3898
#define SELA__DCOCLK           (0x0300)       /* ACLK Source Select DCOCLK */
3899
#define SELA__DCOCLKDIV        (0x0400)       /* ACLK Source Select DCOCLKDIV */
3900
#define SELA__XT2CLK           (0x0500)       /* ACLK Source Select XT2CLK */
3901
 
3902
/* UCSCTL5 Control Bits */
3903
#define DIVM0                  (0x0001)       /* MCLK Divider Bit: 0 */
3904
#define DIVM1                  (0x0002)       /* MCLK Divider Bit: 1 */
3905
#define DIVM2                  (0x0004)       /* MCLK Divider Bit: 2 */
3906
//#define RESERVED            (0x0008)    /* RESERVED */
3907
#define DIVS0                  (0x0010)       /* SMCLK Divider Bit: 0 */
3908
#define DIVS1                  (0x0020)       /* SMCLK Divider Bit: 1 */
3909
#define DIVS2                  (0x0040)       /* SMCLK Divider Bit: 2 */
3910
//#define RESERVED            (0x0080)    /* RESERVED */
3911
#define DIVA0                  (0x0100)       /* ACLK Divider Bit: 0 */
3912
#define DIVA1                  (0x0200)       /* ACLK Divider Bit: 1 */
3913
#define DIVA2                  (0x0400)       /* ACLK Divider Bit: 2 */
3914
//#define RESERVED            (0x0800)    /* RESERVED */
3915
#define DIVPA0                 (0x1000)       /* ACLK from Pin Divider Bit: 0 */
3916
#define DIVPA1                 (0x2000)       /* ACLK from Pin Divider Bit: 1 */
3917
#define DIVPA2                 (0x4000)       /* ACLK from Pin Divider Bit: 2 */
3918
//#define RESERVED            (0x8000)    /* RESERVED */
3919
 
3920
/* UCSCTL5 Control Bits */
3921
#define DIVM0_L                (0x0001)       /* MCLK Divider Bit: 0 */
3922
#define DIVM1_L                (0x0002)       /* MCLK Divider Bit: 1 */
3923
#define DIVM2_L                (0x0004)       /* MCLK Divider Bit: 2 */
3924
//#define RESERVED            (0x0008)    /* RESERVED */
3925
#define DIVS0_L                (0x0010)       /* SMCLK Divider Bit: 0 */
3926
#define DIVS1_L                (0x0020)       /* SMCLK Divider Bit: 1 */
3927
#define DIVS2_L                (0x0040)       /* SMCLK Divider Bit: 2 */
3928
//#define RESERVED            (0x0080)    /* RESERVED */
3929
//#define RESERVED            (0x0800)    /* RESERVED */
3930
//#define RESERVED            (0x8000)    /* RESERVED */
3931
 
3932
/* UCSCTL5 Control Bits */
3933
//#define RESERVED            (0x0008)    /* RESERVED */
3934
//#define RESERVED            (0x0080)    /* RESERVED */
3935
#define DIVA0_H                (0x0001)       /* ACLK Divider Bit: 0 */
3936
#define DIVA1_H                (0x0002)       /* ACLK Divider Bit: 1 */
3937
#define DIVA2_H                (0x0004)       /* ACLK Divider Bit: 2 */
3938
//#define RESERVED            (0x0800)    /* RESERVED */
3939
#define DIVPA0_H               (0x0010)       /* ACLK from Pin Divider Bit: 0 */
3940
#define DIVPA1_H               (0x0020)       /* ACLK from Pin Divider Bit: 1 */
3941
#define DIVPA2_H               (0x0040)       /* ACLK from Pin Divider Bit: 2 */
3942
//#define RESERVED            (0x8000)    /* RESERVED */
3943
 
3944
#define DIVM_0                 (0x0000)       /* MCLK Source Divider 0 */
3945
#define DIVM_1                 (0x0001)       /* MCLK Source Divider 1 */
3946
#define DIVM_2                 (0x0002)       /* MCLK Source Divider 2 */
3947
#define DIVM_3                 (0x0003)       /* MCLK Source Divider 3 */
3948
#define DIVM_4                 (0x0004)       /* MCLK Source Divider 4 */
3949
#define DIVM_5                 (0x0005)       /* MCLK Source Divider 5 */
3950
#define DIVM_6                 (0x0006)       /* MCLK Source Divider 6 */
3951
#define DIVM_7                 (0x0007)       /* MCLK Source Divider 7 */
3952
#define DIVM__1                (0x0000)       /* MCLK Source Divider f(MCLK)/1 */
3953
#define DIVM__2                (0x0001)       /* MCLK Source Divider f(MCLK)/2 */
3954
#define DIVM__4                (0x0002)       /* MCLK Source Divider f(MCLK)/4 */
3955
#define DIVM__8                (0x0003)       /* MCLK Source Divider f(MCLK)/8 */
3956
#define DIVM__16               (0x0004)       /* MCLK Source Divider f(MCLK)/16 */
3957
#define DIVM__32               (0x0005)       /* MCLK Source Divider f(MCLK)/32 */
3958
 
3959
#define DIVS_0                 (0x0000)       /* SMCLK Source Divider 0 */
3960
#define DIVS_1                 (0x0010)       /* SMCLK Source Divider 1 */
3961
#define DIVS_2                 (0x0020)       /* SMCLK Source Divider 2 */
3962
#define DIVS_3                 (0x0030)       /* SMCLK Source Divider 3 */
3963
#define DIVS_4                 (0x0040)       /* SMCLK Source Divider 4 */
3964
#define DIVS_5                 (0x0050)       /* SMCLK Source Divider 5 */
3965
#define DIVS_6                 (0x0060)       /* SMCLK Source Divider 6 */
3966
#define DIVS_7                 (0x0070)       /* SMCLK Source Divider 7 */
3967
#define DIVS__1                (0x0000)       /* SMCLK Source Divider f(SMCLK)/1 */
3968
#define DIVS__2                (0x0010)       /* SMCLK Source Divider f(SMCLK)/2 */
3969
#define DIVS__4                (0x0020)       /* SMCLK Source Divider f(SMCLK)/4 */
3970
#define DIVS__8                (0x0030)       /* SMCLK Source Divider f(SMCLK)/8 */
3971
#define DIVS__16               (0x0040)       /* SMCLK Source Divider f(SMCLK)/16 */
3972
#define DIVS__32               (0x0050)       /* SMCLK Source Divider f(SMCLK)/32 */
3973
 
3974
#define DIVA_0                 (0x0000)       /* ACLK Source Divider 0 */
3975
#define DIVA_1                 (0x0100)       /* ACLK Source Divider 1 */
3976
#define DIVA_2                 (0x0200)       /* ACLK Source Divider 2 */
3977
#define DIVA_3                 (0x0300)       /* ACLK Source Divider 3 */
3978
#define DIVA_4                 (0x0400)       /* ACLK Source Divider 4 */
3979
#define DIVA_5                 (0x0500)       /* ACLK Source Divider 5 */
3980
#define DIVA_6                 (0x0600)       /* ACLK Source Divider 6 */
3981
#define DIVA_7                 (0x0700)       /* ACLK Source Divider 7 */
3982
#define DIVA__1                (0x0000)       /* ACLK Source Divider f(ACLK)/1 */
3983
#define DIVA__2                (0x0100)       /* ACLK Source Divider f(ACLK)/2 */
3984
#define DIVA__4                (0x0200)       /* ACLK Source Divider f(ACLK)/4 */
3985
#define DIVA__8                (0x0300)       /* ACLK Source Divider f(ACLK)/8 */
3986
#define DIVA__16               (0x0400)       /* ACLK Source Divider f(ACLK)/16 */
3987
#define DIVA__32               (0x0500)       /* ACLK Source Divider f(ACLK)/32 */
3988
 
3989
#define DIVPA_0                (0x0000)       /* ACLK from Pin Source Divider 0 */
3990
#define DIVPA_1                (0x1000)       /* ACLK from Pin Source Divider 1 */
3991
#define DIVPA_2                (0x2000)       /* ACLK from Pin Source Divider 2 */
3992
#define DIVPA_3                (0x3000)       /* ACLK from Pin Source Divider 3 */
3993
#define DIVPA_4                (0x4000)       /* ACLK from Pin Source Divider 4 */
3994
#define DIVPA_5                (0x5000)       /* ACLK from Pin Source Divider 5 */
3995
#define DIVPA_6                (0x6000)       /* ACLK from Pin Source Divider 6 */
3996
#define DIVPA_7                (0x7000)       /* ACLK from Pin Source Divider 7 */
3997
#define DIVPA__1               (0x0000)       /* ACLK from Pin Source Divider f(ACLK)/1 */
3998
#define DIVPA__2               (0x1000)       /* ACLK from Pin Source Divider f(ACLK)/2 */
3999
#define DIVPA__4               (0x2000)       /* ACLK from Pin Source Divider f(ACLK)/4 */
4000
#define DIVPA__8               (0x3000)       /* ACLK from Pin Source Divider f(ACLK)/8 */
4001
#define DIVPA__16              (0x4000)       /* ACLK from Pin Source Divider f(ACLK)/16 */
4002
#define DIVPA__32              (0x5000)       /* ACLK from Pin Source Divider f(ACLK)/32 */
4003
 
4004
/* UCSCTL6 Control Bits */
4005
#define XT1OFF                 (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
4006
#define SMCLKOFF               (0x0002)       /* SMCLK Off */
4007
#define XCAP0                  (0x0004)       /* XIN/XOUT Cap Bit: 0 */
4008
#define XCAP1                  (0x0008)       /* XIN/XOUT Cap Bit: 1 */
4009
#define XT1BYPASS              (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
4010
#define XTS                    (0x0020)       /* 1: Selects high-freq. oscillator */
4011
#define XT1DRIVE0              (0x0040)       /* XT1 Drive Level mode Bit 0 */
4012
#define XT1DRIVE1              (0x0080)       /* XT1 Drive Level mode Bit 1 */
4013
#define XT2OFF                 (0x0100)       /* High Frequency Oscillator 2 (XT2) disable */
4014
//#define RESERVED            (0x0200)    /* RESERVED */
4015
//#define RESERVED            (0x0400)    /* RESERVED */
4016
//#define RESERVED            (0x0800)    /* RESERVED */
4017
#define XT2BYPASS              (0x1000)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
4018
//#define RESERVED            (0x2000)    /* RESERVED */
4019
#define XT2DRIVE0              (0x4000)       /* XT2 Drive Level mode Bit 0 */
4020
#define XT2DRIVE1              (0x8000)       /* XT2 Drive Level mode Bit 1 */
4021
 
4022
/* UCSCTL6 Control Bits */
4023
#define XT1OFF_L               (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
4024
#define SMCLKOFF_L             (0x0002)       /* SMCLK Off */
4025
#define XCAP0_L                (0x0004)       /* XIN/XOUT Cap Bit: 0 */
4026
#define XCAP1_L                (0x0008)       /* XIN/XOUT Cap Bit: 1 */
4027
#define XT1BYPASS_L            (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
4028
#define XTS_L                  (0x0020)       /* 1: Selects high-freq. oscillator */
4029
#define XT1DRIVE0_L            (0x0040)       /* XT1 Drive Level mode Bit 0 */
4030
#define XT1DRIVE1_L            (0x0080)       /* XT1 Drive Level mode Bit 1 */
4031
//#define RESERVED            (0x0200)    /* RESERVED */
4032
//#define RESERVED            (0x0400)    /* RESERVED */
4033
//#define RESERVED            (0x0800)    /* RESERVED */
4034
//#define RESERVED            (0x2000)    /* RESERVED */
4035
 
4036
/* UCSCTL6 Control Bits */
4037
#define XT2OFF_H               (0x0001)       /* High Frequency Oscillator 2 (XT2) disable */
4038
//#define RESERVED            (0x0200)    /* RESERVED */
4039
//#define RESERVED            (0x0400)    /* RESERVED */
4040
//#define RESERVED            (0x0800)    /* RESERVED */
4041
#define XT2BYPASS_H            (0x0010)       /* XT2 bypass mode : 0: internal 1:sourced from external pin */
4042
//#define RESERVED            (0x2000)    /* RESERVED */
4043
#define XT2DRIVE0_H            (0x0040)       /* XT2 Drive Level mode Bit 0 */
4044
#define XT2DRIVE1_H            (0x0080)       /* XT2 Drive Level mode Bit 1 */
4045
 
4046
#define XCAP_0                 (0x0000)       /* XIN/XOUT Cap 0 */
4047
#define XCAP_1                 (0x0004)       /* XIN/XOUT Cap 1 */
4048
#define XCAP_2                 (0x0008)       /* XIN/XOUT Cap 2 */
4049
#define XCAP_3                 (0x000C)       /* XIN/XOUT Cap 3 */
4050
#define XT1DRIVE_0             (0x0000)       /* XT1 Drive Level mode: 0 */
4051
#define XT1DRIVE_1             (0x0040)       /* XT1 Drive Level mode: 1 */
4052
#define XT1DRIVE_2             (0x0080)       /* XT1 Drive Level mode: 2 */
4053
#define XT1DRIVE_3             (0x00C0)       /* XT1 Drive Level mode: 3 */
4054
#define XT2DRIVE_0             (0x0000)       /* XT2 Drive Level mode: 0 */
4055
#define XT2DRIVE_1             (0x4000)       /* XT2 Drive Level mode: 1 */
4056
#define XT2DRIVE_2             (0x8000)       /* XT2 Drive Level mode: 2 */
4057
#define XT2DRIVE_3             (0xC000)       /* XT2 Drive Level mode: 3 */
4058
 
4059
/* UCSCTL7 Control Bits */
4060
#define DCOFFG                 (0x0001)       /* DCO Fault Flag */
4061
#define XT1LFOFFG              (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
4062
//#define RESERVED            (0x0004)    /* RESERVED */
4063
#define XT2OFFG                (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
4064
//#define RESERVED            (0x0010)    /* RESERVED */
4065
//#define RESERVED            (0x0020)    /* RESERVED */
4066
//#define RESERVED            (0x0040)    /* RESERVED */
4067
//#define RESERVED            (0x0080)    /* RESERVED */
4068
//#define RESERVED            (0x0100)    /* RESERVED */
4069
//#define RESERVED            (0x0200)    /* RESERVED */
4070
//#define RESERVED            (0x0400)    /* RESERVED */
4071
//#define RESERVED            (0x0800)    /* RESERVED */
4072
//#define RESERVED            (0x1000)    /* RESERVED */
4073
//#define RESERVED            (0x2000)    /* RESERVED */
4074
//#define RESERVED            (0x4000)    /* RESERVED */
4075
//#define RESERVED            (0x8000)    /* RESERVED */
4076
 
4077
/* UCSCTL7 Control Bits */
4078
#define DCOFFG_L               (0x0001)       /* DCO Fault Flag */
4079
#define XT1LFOFFG_L            (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
4080
//#define RESERVED            (0x0004)    /* RESERVED */
4081
#define XT2OFFG_L              (0x0008)       /* High Frequency Oscillator 2 Fault Flag */
4082
//#define RESERVED            (0x0010)    /* RESERVED */
4083
//#define RESERVED            (0x0020)    /* RESERVED */
4084
//#define RESERVED            (0x0040)    /* RESERVED */
4085
//#define RESERVED            (0x0080)    /* RESERVED */
4086
//#define RESERVED            (0x0100)    /* RESERVED */
4087
//#define RESERVED            (0x0200)    /* RESERVED */
4088
//#define RESERVED            (0x0400)    /* RESERVED */
4089
//#define RESERVED            (0x0800)    /* RESERVED */
4090
//#define RESERVED            (0x1000)    /* RESERVED */
4091
//#define RESERVED            (0x2000)    /* RESERVED */
4092
//#define RESERVED            (0x4000)    /* RESERVED */
4093
//#define RESERVED            (0x8000)    /* RESERVED */
4094
 
4095
/* UCSCTL7 Control Bits */
4096
//#define RESERVED            (0x0004)    /* RESERVED */
4097
//#define RESERVED            (0x0010)    /* RESERVED */
4098
//#define RESERVED            (0x0020)    /* RESERVED */
4099
//#define RESERVED            (0x0040)    /* RESERVED */
4100
//#define RESERVED            (0x0080)    /* RESERVED */
4101
//#define RESERVED            (0x0100)    /* RESERVED */
4102
//#define RESERVED            (0x0200)    /* RESERVED */
4103
//#define RESERVED            (0x0400)    /* RESERVED */
4104
//#define RESERVED            (0x0800)    /* RESERVED */
4105
//#define RESERVED            (0x1000)    /* RESERVED */
4106
//#define RESERVED            (0x2000)    /* RESERVED */
4107
//#define RESERVED            (0x4000)    /* RESERVED */
4108
//#define RESERVED            (0x8000)    /* RESERVED */
4109
 
4110
/* UCSCTL8 Control Bits */
4111
#define ACLKREQEN              (0x0001)       /* ACLK Clock Request Enable */
4112
#define MCLKREQEN              (0x0002)       /* MCLK Clock Request Enable */
4113
#define SMCLKREQEN             (0x0004)       /* SMCLK Clock Request Enable */
4114
#define MODOSCREQEN            (0x0008)       /* MODOSC Clock Request Enable */
4115
//#define RESERVED            (0x0010)    /* RESERVED */
4116
//#define RESERVED            (0x0020)    /* RESERVED */
4117
//#define RESERVED            (0x0040)    /* RESERVED */
4118
//#define RESERVED            (0x0080)    /* RESERVED */
4119
//#define RESERVED            (0x0100)    /* RESERVED */
4120
//#define RESERVED            (0x0200)    /* RESERVED */
4121
//#define RESERVED            (0x0400)    /* RESERVED */
4122
//#define RESERVED            (0x0800)    /* RESERVED */
4123
//#define RESERVED            (0x1000)    /* RESERVED */
4124
//#define RESERVED            (0x2000)    /* RESERVED */
4125
//#define RESERVED            (0x4000)    /* RESERVED */
4126
//#define RESERVED            (0x8000)    /* RESERVED */
4127
 
4128
/* UCSCTL8 Control Bits */
4129
#define ACLKREQEN_L            (0x0001)       /* ACLK Clock Request Enable */
4130
#define MCLKREQEN_L            (0x0002)       /* MCLK Clock Request Enable */
4131
#define SMCLKREQEN_L           (0x0004)       /* SMCLK Clock Request Enable */
4132
#define MODOSCREQEN_L          (0x0008)       /* MODOSC Clock Request Enable */
4133
//#define RESERVED            (0x0010)    /* RESERVED */
4134
//#define RESERVED            (0x0020)    /* RESERVED */
4135
//#define RESERVED            (0x0040)    /* RESERVED */
4136
//#define RESERVED            (0x0080)    /* RESERVED */
4137
//#define RESERVED            (0x0100)    /* RESERVED */
4138
//#define RESERVED            (0x0200)    /* RESERVED */
4139
//#define RESERVED            (0x0400)    /* RESERVED */
4140
//#define RESERVED            (0x0800)    /* RESERVED */
4141
//#define RESERVED            (0x1000)    /* RESERVED */
4142
//#define RESERVED            (0x2000)    /* RESERVED */
4143
//#define RESERVED            (0x4000)    /* RESERVED */
4144
//#define RESERVED            (0x8000)    /* RESERVED */
4145
 
4146
/* UCSCTL8 Control Bits */
4147
//#define RESERVED            (0x0010)    /* RESERVED */
4148
//#define RESERVED            (0x0020)    /* RESERVED */
4149
//#define RESERVED            (0x0040)    /* RESERVED */
4150
//#define RESERVED            (0x0080)    /* RESERVED */
4151
//#define RESERVED            (0x0100)    /* RESERVED */
4152
//#define RESERVED            (0x0200)    /* RESERVED */
4153
//#define RESERVED            (0x0400)    /* RESERVED */
4154
//#define RESERVED            (0x0800)    /* RESERVED */
4155
//#define RESERVED            (0x1000)    /* RESERVED */
4156
//#define RESERVED            (0x2000)    /* RESERVED */
4157
//#define RESERVED            (0x4000)    /* RESERVED */
4158
//#define RESERVED            (0x8000)    /* RESERVED */
4159
 
4160
/************************************************************
4161
* USCI A0
4162
************************************************************/
4163
#define __MSP430_HAS_USCI_A0__                /* Definition to show that Module is available */
4164
#define __MSP430_BASEADDRESS_USCI_A0__ 0x05C0
4165
 
4166
SFR_16BIT(UCA0CTLW0);                         /* USCI A0 Control Word Register 0 */
4167
SFR_8BIT(UCA0CTLW0_L);                        /* USCI A0 Control Word Register 0 */
4168
SFR_8BIT(UCA0CTLW0_H);                        /* USCI A0 Control Word Register 0 */
4169
#define UCA0CTL1               UCA0CTLW0_L    /* USCI A0 Control Register 1 */
4170
#define UCA0CTL0               UCA0CTLW0_H    /* USCI A0 Control Register 0 */
4171
SFR_16BIT(UCA0BRW);                           /* USCI A0 Baud Word Rate 0 */
4172
SFR_8BIT(UCA0BRW_L);                          /* USCI A0 Baud Word Rate 0 */
4173
SFR_8BIT(UCA0BRW_H);                          /* USCI A0 Baud Word Rate 0 */
4174
#define UCA0BR0                UCA0BRW_L      /* USCI A0 Baud Rate 0 */
4175
#define UCA0BR1                UCA0BRW_H      /* USCI A0 Baud Rate 1 */
4176
SFR_8BIT(UCA0MCTL);                           /* USCI A0 Modulation Control */
4177
SFR_8BIT(UCA0STAT);                           /* USCI A0 Status Register */
4178
SFR_8BIT(UCA0RXBUF);                          /* USCI A0 Receive Buffer */
4179
SFR_8BIT(UCA0TXBUF);                          /* USCI A0 Transmit Buffer */
4180
SFR_8BIT(UCA0ABCTL);                          /* USCI A0 LIN Control */
4181
SFR_16BIT(UCA0IRCTL);                         /* USCI A0 IrDA Transmit Control */
4182
SFR_8BIT(UCA0IRCTL_L);                        /* USCI A0 IrDA Transmit Control */
4183
SFR_8BIT(UCA0IRCTL_H);                        /* USCI A0 IrDA Transmit Control */
4184
#define UCA0IRTCTL             UCA0IRCTL_L    /* USCI A0 IrDA Transmit Control */
4185
#define UCA0IRRCTL             UCA0IRCTL_H    /* USCI A0 IrDA Receive Control */
4186
SFR_16BIT(UCA0ICTL);                          /* USCI A0 Interrupt Enable Register */
4187
SFR_8BIT(UCA0ICTL_L);                         /* USCI A0 Interrupt Enable Register */
4188
SFR_8BIT(UCA0ICTL_H);                         /* USCI A0 Interrupt Enable Register */
4189
#define UCA0IE                 UCA0ICTL_L     /* USCI A0 Interrupt Enable Register */
4190
#define UCA0IFG                UCA0ICTL_H     /* USCI A0 Interrupt Flags Register */
4191
SFR_16BIT(UCA0IV);                            /* USCI A0 Interrupt Vector Register */
4192
 
4193
 
4194
/************************************************************
4195
* USCI B0
4196
************************************************************/
4197
#define __MSP430_HAS_USCI_B0__                /* Definition to show that Module is available */
4198
#define __MSP430_BASEADDRESS_USCI_B0__ 0x05E0
4199
 
4200
 
4201
SFR_16BIT(UCB0CTLW0);                         /* USCI B0 Control Word Register 0 */
4202
SFR_8BIT(UCB0CTLW0_L);                        /* USCI B0 Control Word Register 0 */
4203
SFR_8BIT(UCB0CTLW0_H);                        /* USCI B0 Control Word Register 0 */
4204
#define UCB0CTL1               UCB0CTLW0_L    /* USCI B0 Control Register 1 */
4205
#define UCB0CTL0               UCB0CTLW0_H    /* USCI B0 Control Register 0 */
4206
SFR_16BIT(UCB0BRW);                           /* USCI B0 Baud Word Rate 0 */
4207
SFR_8BIT(UCB0BRW_L);                          /* USCI B0 Baud Word Rate 0 */
4208
SFR_8BIT(UCB0BRW_H);                          /* USCI B0 Baud Word Rate 0 */
4209
#define UCB0BR0                UCB0BRW_L      /* USCI B0 Baud Rate 0 */
4210
#define UCB0BR1                UCB0BRW_H      /* USCI B0 Baud Rate 1 */
4211
SFR_8BIT(UCB0STAT);                           /* USCI B0 Status Register */
4212
SFR_8BIT(UCB0RXBUF);                          /* USCI B0 Receive Buffer */
4213
SFR_8BIT(UCB0TXBUF);                          /* USCI B0 Transmit Buffer */
4214
SFR_16BIT(UCB0I2COA);                         /* USCI B0 I2C Own Address */
4215
SFR_8BIT(UCB0I2COA_L);                        /* USCI B0 I2C Own Address */
4216
SFR_8BIT(UCB0I2COA_H);                        /* USCI B0 I2C Own Address */
4217
SFR_16BIT(UCB0I2CSA);                         /* USCI B0 I2C Slave Address */
4218
SFR_8BIT(UCB0I2CSA_L);                        /* USCI B0 I2C Slave Address */
4219
SFR_8BIT(UCB0I2CSA_H);                        /* USCI B0 I2C Slave Address */
4220
SFR_16BIT(UCB0ICTL);                          /* USCI B0 Interrupt Enable Register */
4221
SFR_8BIT(UCB0ICTL_L);                         /* USCI B0 Interrupt Enable Register */
4222
SFR_8BIT(UCB0ICTL_H);                         /* USCI B0 Interrupt Enable Register */
4223
#define UCB0IE                 UCB0ICTL_L     /* USCI B0 Interrupt Enable Register */
4224
#define UCB0IFG                UCB0ICTL_H     /* USCI B0 Interrupt Flags Register */
4225
SFR_16BIT(UCB0IV);                            /* USCI B0 Interrupt Vector Register */
4226
 
4227
// UCAxCTL0 UART-Mode Control Bits
4228
#define UCPEN                  (0x80)         /* Async. Mode: Parity enable */
4229
#define UCPAR                  (0x40)         /* Async. Mode: Parity     0:odd / 1:even */
4230
#define UCMSB                  (0x20)         /* Async. Mode: MSB first  0:LSB / 1:MSB */
4231
#define UC7BIT                 (0x10)         /* Async. Mode: Data Bits  0:8-bits / 1:7-bits */
4232
#define UCSPB                  (0x08)         /* Async. Mode: Stop Bits  0:one / 1: two */
4233
#define UCMODE1                (0x04)         /* Async. Mode: USCI Mode 1 */
4234
#define UCMODE0                (0x02)         /* Async. Mode: USCI Mode 0 */
4235
#define UCSYNC                 (0x01)         /* Sync-Mode  0:UART-Mode / 1:SPI-Mode */
4236
 
4237
// UCxxCTL0 SPI-Mode Control Bits
4238
#define UCCKPH                 (0x80)         /* Sync. Mode: Clock Phase */
4239
#define UCCKPL                 (0x40)         /* Sync. Mode: Clock Polarity */
4240
#define UCMST                  (0x08)         /* Sync. Mode: Master Select */
4241
 
4242
// UCBxCTL0 I2C-Mode Control Bits
4243
#define UCA10                  (0x80)         /* 10-bit Address Mode */
4244
#define UCSLA10                (0x40)         /* 10-bit Slave Address Mode */
4245
#define UCMM                   (0x20)         /* Multi-Master Environment */
4246
//#define res               (0x10)    /* reserved */
4247
#define UCMODE_0               (0x00)         /* Sync. Mode: USCI Mode: 0 */
4248
#define UCMODE_1               (0x02)         /* Sync. Mode: USCI Mode: 1 */
4249
#define UCMODE_2               (0x04)         /* Sync. Mode: USCI Mode: 2 */
4250
#define UCMODE_3               (0x06)         /* Sync. Mode: USCI Mode: 3 */
4251
 
4252
// UCAxCTL1 UART-Mode Control Bits
4253
#define UCSSEL1                (0x80)         /* USCI 0 Clock Source Select 1 */
4254
#define UCSSEL0                (0x40)         /* USCI 0 Clock Source Select 0 */
4255
#define UCRXEIE                (0x20)         /* RX Error interrupt enable */
4256
#define UCBRKIE                (0x10)         /* Break interrupt enable */
4257
#define UCDORM                 (0x08)         /* Dormant (Sleep) Mode */
4258
#define UCTXADDR               (0x04)         /* Send next Data as Address */
4259
#define UCTXBRK                (0x02)         /* Send next Data as Break */
4260
#define UCSWRST                (0x01)         /* USCI Software Reset */
4261
 
4262
// UCxxCTL1 SPI-Mode Control Bits
4263
//#define res               (0x20)    /* reserved */
4264
//#define res               (0x10)    /* reserved */
4265
//#define res               (0x08)    /* reserved */
4266
//#define res               (0x04)    /* reserved */
4267
//#define res               (0x02)    /* reserved */
4268
 
4269
// UCBxCTL1 I2C-Mode Control Bits
4270
//#define res               (0x20)    /* reserved */
4271
#define UCTR                   (0x10)         /* Transmit/Receive Select/Flag */
4272
#define UCTXNACK               (0x08)         /* Transmit NACK */
4273
#define UCTXSTP                (0x04)         /* Transmit STOP */
4274
#define UCTXSTT                (0x02)         /* Transmit START */
4275
#define UCSSEL_0               (0x00)         /* USCI 0 Clock Source: 0 */
4276
#define UCSSEL_1               (0x40)         /* USCI 0 Clock Source: 1 */
4277
#define UCSSEL_2               (0x80)         /* USCI 0 Clock Source: 2 */
4278
#define UCSSEL_3               (0xC0)         /* USCI 0 Clock Source: 3 */
4279
#define UCSSEL__UCLK           (0x00)         /* USCI 0 Clock Source: UCLK */
4280
#define UCSSEL__ACLK           (0x40)         /* USCI 0 Clock Source: ACLK */
4281
#define UCSSEL__SMCLK          (0x80)         /* USCI 0 Clock Source: SMCLK */
4282
 
4283
/* UCAxMCTL Control Bits */
4284
#define UCBRF3                 (0x80)         /* USCI First Stage Modulation Select 3 */
4285
#define UCBRF2                 (0x40)         /* USCI First Stage Modulation Select 2 */
4286
#define UCBRF1                 (0x20)         /* USCI First Stage Modulation Select 1 */
4287
#define UCBRF0                 (0x10)         /* USCI First Stage Modulation Select 0 */
4288
#define UCBRS2                 (0x08)         /* USCI Second Stage Modulation Select 2 */
4289
#define UCBRS1                 (0x04)         /* USCI Second Stage Modulation Select 1 */
4290
#define UCBRS0                 (0x02)         /* USCI Second Stage Modulation Select 0 */
4291
#define UCOS16                 (0x01)         /* USCI 16-times Oversampling enable */
4292
 
4293
#define UCBRF_0                (0x00)         /* USCI First Stage Modulation: 0 */
4294
#define UCBRF_1                (0x10)         /* USCI First Stage Modulation: 1 */
4295
#define UCBRF_2                (0x20)         /* USCI First Stage Modulation: 2 */
4296
#define UCBRF_3                (0x30)         /* USCI First Stage Modulation: 3 */
4297
#define UCBRF_4                (0x40)         /* USCI First Stage Modulation: 4 */
4298
#define UCBRF_5                (0x50)         /* USCI First Stage Modulation: 5 */
4299
#define UCBRF_6                (0x60)         /* USCI First Stage Modulation: 6 */
4300
#define UCBRF_7                (0x70)         /* USCI First Stage Modulation: 7 */
4301
#define UCBRF_8                (0x80)         /* USCI First Stage Modulation: 8 */
4302
#define UCBRF_9                (0x90)         /* USCI First Stage Modulation: 9 */
4303
#define UCBRF_10               (0xA0)         /* USCI First Stage Modulation: A */
4304
#define UCBRF_11               (0xB0)         /* USCI First Stage Modulation: B */
4305
#define UCBRF_12               (0xC0)         /* USCI First Stage Modulation: C */
4306
#define UCBRF_13               (0xD0)         /* USCI First Stage Modulation: D */
4307
#define UCBRF_14               (0xE0)         /* USCI First Stage Modulation: E */
4308
#define UCBRF_15               (0xF0)         /* USCI First Stage Modulation: F */
4309
 
4310
#define UCBRS_0                (0x00)         /* USCI Second Stage Modulation: 0 */
4311
#define UCBRS_1                (0x02)         /* USCI Second Stage Modulation: 1 */
4312
#define UCBRS_2                (0x04)         /* USCI Second Stage Modulation: 2 */
4313
#define UCBRS_3                (0x06)         /* USCI Second Stage Modulation: 3 */
4314
#define UCBRS_4                (0x08)         /* USCI Second Stage Modulation: 4 */
4315
#define UCBRS_5                (0x0A)         /* USCI Second Stage Modulation: 5 */
4316
#define UCBRS_6                (0x0C)         /* USCI Second Stage Modulation: 6 */
4317
#define UCBRS_7                (0x0E)         /* USCI Second Stage Modulation: 7 */
4318
 
4319
/* UCAxSTAT Control Bits */
4320
#define UCLISTEN               (0x80)         /* USCI Listen mode */
4321
#define UCFE                   (0x40)         /* USCI Frame Error Flag */
4322
#define UCOE                   (0x20)         /* USCI Overrun Error Flag */
4323
#define UCPE                   (0x10)         /* USCI Parity Error Flag */
4324
#define UCBRK                  (0x08)         /* USCI Break received */
4325
#define UCRXERR                (0x04)         /* USCI RX Error Flag */
4326
#define UCADDR                 (0x02)         /* USCI Address received Flag */
4327
#define UCBUSY                 (0x01)         /* USCI Busy Flag */
4328
#define UCIDLE                 (0x02)         /* USCI Idle line detected Flag */
4329
 
4330
/* UCBxSTAT Control Bits */
4331
#define UCSCLLOW               (0x40)         /* SCL low */
4332
#define UCGC                   (0x20)         /* General Call address received Flag */
4333
#define UCBBUSY                (0x10)         /* Bus Busy Flag */
4334
 
4335
/* UCAxIRTCTL Control Bits */
4336
#define UCIRTXPL5              (0x80)         /* IRDA Transmit Pulse Length 5 */
4337
#define UCIRTXPL4              (0x40)         /* IRDA Transmit Pulse Length 4 */
4338
#define UCIRTXPL3              (0x20)         /* IRDA Transmit Pulse Length 3 */
4339
#define UCIRTXPL2              (0x10)         /* IRDA Transmit Pulse Length 2 */
4340
#define UCIRTXPL1              (0x08)         /* IRDA Transmit Pulse Length 1 */
4341
#define UCIRTXPL0              (0x04)         /* IRDA Transmit Pulse Length 0 */
4342
#define UCIRTXCLK              (0x02)         /* IRDA Transmit Pulse Clock Select */
4343
#define UCIREN                 (0x01)         /* IRDA Encoder/Decoder enable */
4344
 
4345
/* UCAxIRRCTL Control Bits */
4346
#define UCIRRXFL5              (0x80)         /* IRDA Receive Filter Length 5 */
4347
#define UCIRRXFL4              (0x40)         /* IRDA Receive Filter Length 4 */
4348
#define UCIRRXFL3              (0x20)         /* IRDA Receive Filter Length 3 */
4349
#define UCIRRXFL2              (0x10)         /* IRDA Receive Filter Length 2 */
4350
#define UCIRRXFL1              (0x08)         /* IRDA Receive Filter Length 1 */
4351
#define UCIRRXFL0              (0x04)         /* IRDA Receive Filter Length 0 */
4352
#define UCIRRXPL               (0x02)         /* IRDA Receive Input Polarity */
4353
#define UCIRRXFE               (0x01)         /* IRDA Receive Filter enable */
4354
 
4355
/* UCAxABCTL Control Bits */
4356
//#define res               (0x80)    /* reserved */
4357
//#define res               (0x40)    /* reserved */
4358
#define UCDELIM1               (0x20)         /* Break Sync Delimiter 1 */
4359
#define UCDELIM0               (0x10)         /* Break Sync Delimiter 0 */
4360
#define UCSTOE                 (0x08)         /* Sync-Field Timeout error */
4361
#define UCBTOE                 (0x04)         /* Break Timeout error */
4362
//#define res               (0x02)    /* reserved */
4363
#define UCABDEN                (0x01)         /* Auto Baud Rate detect enable */
4364
 
4365
/* UCBxI2COA Control Bits */
4366
#define UCGCEN                 (0x8000)       /* I2C General Call enable */
4367
#define UCOA9                  (0x0200)       /* I2C Own Address 9 */
4368
#define UCOA8                  (0x0100)       /* I2C Own Address 8 */
4369
#define UCOA7                  (0x0080)       /* I2C Own Address 7 */
4370
#define UCOA6                  (0x0040)       /* I2C Own Address 6 */
4371
#define UCOA5                  (0x0020)       /* I2C Own Address 5 */
4372
#define UCOA4                  (0x0010)       /* I2C Own Address 4 */
4373
#define UCOA3                  (0x0008)       /* I2C Own Address 3 */
4374
#define UCOA2                  (0x0004)       /* I2C Own Address 2 */
4375
#define UCOA1                  (0x0002)       /* I2C Own Address 1 */
4376
#define UCOA0                  (0x0001)       /* I2C Own Address 0 */
4377
 
4378
/* UCBxI2COA Control Bits */
4379
#define UCOA7_L                (0x0080)       /* I2C Own Address 7 */
4380
#define UCOA6_L                (0x0040)       /* I2C Own Address 6 */
4381
#define UCOA5_L                (0x0020)       /* I2C Own Address 5 */
4382
#define UCOA4_L                (0x0010)       /* I2C Own Address 4 */
4383
#define UCOA3_L                (0x0008)       /* I2C Own Address 3 */
4384
#define UCOA2_L                (0x0004)       /* I2C Own Address 2 */
4385
#define UCOA1_L                (0x0002)       /* I2C Own Address 1 */
4386
#define UCOA0_L                (0x0001)       /* I2C Own Address 0 */
4387
 
4388
/* UCBxI2COA Control Bits */
4389
#define UCGCEN_H               (0x0080)       /* I2C General Call enable */
4390
#define UCOA9_H                (0x0002)       /* I2C Own Address 9 */
4391
#define UCOA8_H                (0x0001)       /* I2C Own Address 8 */
4392
 
4393
/* UCBxI2CSA Control Bits */
4394
#define UCSA9                  (0x0200)       /* I2C Slave Address 9 */
4395
#define UCSA8                  (0x0100)       /* I2C Slave Address 8 */
4396
#define UCSA7                  (0x0080)       /* I2C Slave Address 7 */
4397
#define UCSA6                  (0x0040)       /* I2C Slave Address 6 */
4398
#define UCSA5                  (0x0020)       /* I2C Slave Address 5 */
4399
#define UCSA4                  (0x0010)       /* I2C Slave Address 4 */
4400
#define UCSA3                  (0x0008)       /* I2C Slave Address 3 */
4401
#define UCSA2                  (0x0004)       /* I2C Slave Address 2 */
4402
#define UCSA1                  (0x0002)       /* I2C Slave Address 1 */
4403
#define UCSA0                  (0x0001)       /* I2C Slave Address 0 */
4404
 
4405
/* UCBxI2CSA Control Bits */
4406
#define UCSA7_L                (0x0080)       /* I2C Slave Address 7 */
4407
#define UCSA6_L                (0x0040)       /* I2C Slave Address 6 */
4408
#define UCSA5_L                (0x0020)       /* I2C Slave Address 5 */
4409
#define UCSA4_L                (0x0010)       /* I2C Slave Address 4 */
4410
#define UCSA3_L                (0x0008)       /* I2C Slave Address 3 */
4411
#define UCSA2_L                (0x0004)       /* I2C Slave Address 2 */
4412
#define UCSA1_L                (0x0002)       /* I2C Slave Address 1 */
4413
#define UCSA0_L                (0x0001)       /* I2C Slave Address 0 */
4414
 
4415
/* UCBxI2CSA Control Bits */
4416
#define UCSA9_H                (0x0002)       /* I2C Slave Address 9 */
4417
#define UCSA8_H                (0x0001)       /* I2C Slave Address 8 */
4418
 
4419
/* UCAxIE Control Bits */
4420
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
4421
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
4422
 
4423
/* UCBxIE Control Bits */
4424
#define UCNACKIE               (0x0020)       /* NACK Condition interrupt enable */
4425
#define UCALIE                 (0x0010)       /* Arbitration Lost interrupt enable */
4426
#define UCSTPIE                (0x0008)       /* STOP Condition interrupt enable */
4427
#define UCSTTIE                (0x0004)       /* START Condition interrupt enable */
4428
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
4429
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
4430
 
4431
/* UCAxIFG Control Bits */
4432
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
4433
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
4434
 
4435
/* UCBxIFG Control Bits */
4436
#define UCNACKIFG              (0x0020)       /* NAK Condition interrupt Flag */
4437
#define UCALIFG                (0x0010)       /* Arbitration Lost interrupt Flag */
4438
#define UCSTPIFG               (0x0008)       /* STOP Condition interrupt Flag */
4439
#define UCSTTIFG               (0x0004)       /* START Condition interrupt Flag */
4440
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
4441
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
4442
 
4443
/* USCI Definitions */
4444
#define USCI_NONE              (0x0000)       /* No Interrupt pending */
4445
#define USCI_UCRXIFG           (0x0002)       /* USCI UCRXIFG */
4446
#define USCI_UCTXIFG           (0x0004)       /* USCI UCTXIFG */
4447
#define USCI_I2C_UCALIFG       (0x0002)       /* USCI I2C Mode: UCALIFG */
4448
#define USCI_I2C_UCNACKIFG     (0x0004)       /* USCI I2C Mode: UCNACKIFG */
4449
#define USCI_I2C_UCSTTIFG      (0x0006)       /* USCI I2C Mode: UCSTTIFG*/
4450
#define USCI_I2C_UCSTPIFG      (0x0008)       /* USCI I2C Mode: UCSTPIFG*/
4451
#define USCI_I2C_UCRXIFG       (0x000A)       /* USCI I2C Mode: UCRXIFG */
4452
#define USCI_I2C_UCTXIFG       (0x000C)       /* USCI I2C Mode: UCTXIFG */
4453
 
4454
/************************************************************
4455
* USCI A1
4456
************************************************************/
4457
#define __MSP430_HAS_USCI_A1__                /* Definition to show that Module is available */
4458
#define __MSP430_BASEADDRESS_USCI_A1__ 0x0600
4459
 
4460
SFR_16BIT(UCA1CTLW0);                         /* USCI A1 Control Word Register 0 */
4461
SFR_8BIT(UCA1CTLW0_L);                        /* USCI A1 Control Word Register 0 */
4462
SFR_8BIT(UCA1CTLW0_H);                        /* USCI A1 Control Word Register 0 */
4463
#define UCA1CTL1               UCA1CTLW0_L    /* USCI A1 Control Register 1 */
4464
#define UCA1CTL0               UCA1CTLW0_H    /* USCI A1 Control Register 0 */
4465
SFR_16BIT(UCA1BRW);                           /* USCI A1 Baud Word Rate 0 */
4466
SFR_8BIT(UCA1BRW_L);                          /* USCI A1 Baud Word Rate 0 */
4467
SFR_8BIT(UCA1BRW_H);                          /* USCI A1 Baud Word Rate 0 */
4468
#define UCA1BR0                UCA1BRW_L      /* USCI A1 Baud Rate 0 */
4469
#define UCA1BR1                UCA1BRW_H      /* USCI A1 Baud Rate 1 */
4470
SFR_8BIT(UCA1MCTL);                           /* USCI A1 Modulation Control */
4471
SFR_8BIT(UCA1STAT);                           /* USCI A1 Status Register */
4472
SFR_8BIT(UCA1RXBUF);                          /* USCI A1 Receive Buffer */
4473
SFR_8BIT(UCA1TXBUF);                          /* USCI A1 Transmit Buffer */
4474
SFR_8BIT(UCA1ABCTL);                          /* USCI A1 LIN Control */
4475
SFR_16BIT(UCA1IRCTL);                         /* USCI A1 IrDA Transmit Control */
4476
SFR_8BIT(UCA1IRCTL_L);                        /* USCI A1 IrDA Transmit Control */
4477
SFR_8BIT(UCA1IRCTL_H);                        /* USCI A1 IrDA Transmit Control */
4478
#define UCA1IRTCTL             UCA1IRCTL_L    /* USCI A1 IrDA Transmit Control */
4479
#define UCA1IRRCTL             UCA1IRCTL_H    /* USCI A1 IrDA Receive Control */
4480
SFR_16BIT(UCA1ICTL);                          /* USCI A1 Interrupt Enable Register */
4481
SFR_8BIT(UCA1ICTL_L);                         /* USCI A1 Interrupt Enable Register */
4482
SFR_8BIT(UCA1ICTL_H);                         /* USCI A1 Interrupt Enable Register */
4483
#define UCA1IE                 UCA1ICTL_L     /* USCI A1 Interrupt Enable Register */
4484
#define UCA1IFG                UCA1ICTL_H     /* USCI A1 Interrupt Flags Register */
4485
SFR_16BIT(UCA1IV);                            /* USCI A1 Interrupt Vector Register */
4486
 
4487
 
4488
/************************************************************
4489
* USCI B1
4490
************************************************************/
4491
#define __MSP430_HAS_USCI_B1__                /* Definition to show that Module is available */
4492
#define __MSP430_BASEADDRESS_USCI_B1__ 0x0620
4493
 
4494
 
4495
SFR_16BIT(UCB1CTLW0);                         /* USCI B1 Control Word Register 0 */
4496
SFR_8BIT(UCB1CTLW0_L);                        /* USCI B1 Control Word Register 0 */
4497
SFR_8BIT(UCB1CTLW0_H);                        /* USCI B1 Control Word Register 0 */
4498
#define UCB1CTL1               UCB1CTLW0_L    /* USCI B1 Control Register 1 */
4499
#define UCB1CTL0               UCB1CTLW0_H    /* USCI B1 Control Register 0 */
4500
SFR_16BIT(UCB1BRW);                           /* USCI B1 Baud Word Rate 0 */
4501
SFR_8BIT(UCB1BRW_L);                          /* USCI B1 Baud Word Rate 0 */
4502
SFR_8BIT(UCB1BRW_H);                          /* USCI B1 Baud Word Rate 0 */
4503
#define UCB1BR0                UCB1BRW_L      /* USCI B1 Baud Rate 0 */
4504
#define UCB1BR1                UCB1BRW_H      /* USCI B1 Baud Rate 1 */
4505
SFR_8BIT(UCB1STAT);                           /* USCI B1 Status Register */
4506
SFR_8BIT(UCB1RXBUF);                          /* USCI B1 Receive Buffer */
4507
SFR_8BIT(UCB1TXBUF);                          /* USCI B1 Transmit Buffer */
4508
SFR_16BIT(UCB1I2COA);                         /* USCI B1 I2C Own Address */
4509
SFR_8BIT(UCB1I2COA_L);                        /* USCI B1 I2C Own Address */
4510
SFR_8BIT(UCB1I2COA_H);                        /* USCI B1 I2C Own Address */
4511
SFR_16BIT(UCB1I2CSA);                         /* USCI B1 I2C Slave Address */
4512
SFR_8BIT(UCB1I2CSA_L);                        /* USCI B1 I2C Slave Address */
4513
SFR_8BIT(UCB1I2CSA_H);                        /* USCI B1 I2C Slave Address */
4514
SFR_16BIT(UCB1ICTL);                          /* USCI B1 Interrupt Enable Register */
4515
SFR_8BIT(UCB1ICTL_L);                         /* USCI B1 Interrupt Enable Register */
4516
SFR_8BIT(UCB1ICTL_H);                         /* USCI B1 Interrupt Enable Register */
4517
#define UCB1IE                 UCB1ICTL_L     /* USCI B1 Interrupt Enable Register */
4518
#define UCB1IFG                UCB1ICTL_H     /* USCI B1 Interrupt Flags Register */
4519
SFR_16BIT(UCB1IV);                            /* USCI B1 Interrupt Vector Register */
4520
 
4521
/************************************************************
4522
* WATCHDOG TIMER A
4523
************************************************************/
4524
#define __MSP430_HAS_WDT_A__                  /* Definition to show that Module is available */
4525
#define __MSP430_BASEADDRESS_WDT_A__ 0x0150
4526
 
4527
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
4528
SFR_8BIT(WDTCTL_L);                           /* Watchdog Timer Control */
4529
SFR_8BIT(WDTCTL_H);                           /* Watchdog Timer Control */
4530
/* The bit names have been prefixed with "WDT" */
4531
/* WDTCTL Control Bits */
4532
#define WDTIS0                 (0x0001)       /* WDT - Timer Interval Select 0 */
4533
#define WDTIS1                 (0x0002)       /* WDT - Timer Interval Select 1 */
4534
#define WDTIS2                 (0x0004)       /* WDT - Timer Interval Select 2 */
4535
#define WDTCNTCL               (0x0008)       /* WDT - Timer Clear */
4536
#define WDTTMSEL               (0x0010)       /* WDT - Timer Mode Select */
4537
#define WDTSSEL0               (0x0020)       /* WDT - Timer Clock Source Select 0 */
4538
#define WDTSSEL1               (0x0040)       /* WDT - Timer Clock Source Select 1 */
4539
#define WDTHOLD                (0x0080)       /* WDT - Timer hold */
4540
 
4541
/* WDTCTL Control Bits */
4542
#define WDTIS0_L               (0x0001)       /* WDT - Timer Interval Select 0 */
4543
#define WDTIS1_L               (0x0002)       /* WDT - Timer Interval Select 1 */
4544
#define WDTIS2_L               (0x0004)       /* WDT - Timer Interval Select 2 */
4545
#define WDTCNTCL_L             (0x0008)       /* WDT - Timer Clear */
4546
#define WDTTMSEL_L             (0x0010)       /* WDT - Timer Mode Select */
4547
#define WDTSSEL0_L             (0x0020)       /* WDT - Timer Clock Source Select 0 */
4548
#define WDTSSEL1_L             (0x0040)       /* WDT - Timer Clock Source Select 1 */
4549
#define WDTHOLD_L              (0x0080)       /* WDT - Timer hold */
4550
 
4551
/* WDTCTL Control Bits */
4552
 
4553
#define WDTPW                  (0x5A00)
4554
 
4555
#define WDTIS_0                (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
4556
#define WDTIS_1                (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
4557
#define WDTIS_2                (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
4558
#define WDTIS_3                (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
4559
#define WDTIS_4                (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
4560
#define WDTIS_5                (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
4561
#define WDTIS_6                (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
4562
#define WDTIS_7                (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
4563
#define WDTIS__2G              (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
4564
#define WDTIS__128M            (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
4565
#define WDTIS__8192K           (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
4566
#define WDTIS__512K            (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
4567
#define WDTIS__32K             (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
4568
#define WDTIS__8192            (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
4569
#define WDTIS__512             (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
4570
#define WDTIS__64              (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
4571
 
4572
#define WDTSSEL_0              (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
4573
#define WDTSSEL_1              (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
4574
#define WDTSSEL_2              (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
4575
#define WDTSSEL_3              (3*0x0020u)    /* WDT - Timer Clock Source Select: reserved */
4576
#define WDTSSEL__SMCLK         (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
4577
#define WDTSSEL__ACLK          (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
4578
#define WDTSSEL__VLO           (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
4579
 
4580
/* WDT-interval times [1ms] coded with Bits 0-2 */
4581
/* WDT is clocked by fSMCLK (assumed 1MHz) */
4582
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2)                         /* 32ms interval (default) */
4583
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS0)                  /* 8ms     " */
4584
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1)                  /* 0.5ms   " */
4585
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)           /* 0.064ms " */
4586
/* WDT is clocked by fACLK (assumed 32KHz) */
4587
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0)                /* 1000ms  " */
4588
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS0)         /* 250ms   " */
4589
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1)         /* 16ms    " */
4590
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1+WDTIS0)  /* 1.9ms   " */
4591
/* Watchdog mode -> reset after expired time */
4592
/* WDT is clocked by fSMCLK (assumed 1MHz) */
4593
#define WDT_MRST_32         (WDTPW+WDTCNTCL+WDTIS2)                                  /* 32ms interval (default) */
4594
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS2+WDTIS0)                           /* 8ms     " */
4595
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS2+WDTIS1)                           /* 0.5ms   " */
4596
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)                    /* 0.064ms " */
4597
/* WDT is clocked by fACLK (assumed 32KHz) */
4598
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2)                         /* 1000ms  " */
4599
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS0)                  /* 250ms   " */
4600
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1)                  /* 16ms    " */
4601
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1+WDTIS0)           /* 1.9ms   " */
4602
 
4603
 
4604
/************************************************************
4605
* TLV Descriptors
4606
************************************************************/
4607
#define __MSP430_HAS_TLV__                    /* Definition to show that Module is available */
4608
 
4609
#define TLV_START              (0x1A08)       /* Start Address of the TLV structure */
4610
#define TLV_END                (0x1AFF)       /* End Address of the TLV structure */
4611
 
4612
#define TLV_LDTAG              (0x01)         /*  Legacy descriptor (1xx, 2xx, 4xx families) */
4613
#define TLV_PDTAG              (0x02)         /*  Peripheral discovery descriptor */
4614
#define TLV_Reserved3          (0x03)         /*  Future usage */
4615
#define TLV_Reserved4          (0x04)         /*  Future usage */
4616
#define TLV_BLANK              (0x05)         /*  Blank descriptor */
4617
#define TLV_Reserved6          (0x06)         /*  Future usage */
4618
#define TLV_Reserved7          (0x07)         /*  Serial Number */
4619
#define TLV_DIERECORD          (0x08)         /*  Die Record  */
4620
#define TLV_ADCCAL             (0x11)         /*  ADC12 calibration */
4621
#define TLV_ADC12CAL           (0x11)         /*  ADC12 calibration */
4622
#define TLV_ADC10CAL           (0x13)         /*  ADC10 calibration */
4623
#define TLV_REFCAL             (0x12)         /*  REF calibration */
4624
#define TLV_TAGEXT             (0xFE)         /*  Tag extender */
4625
#define TLV_TAGEND             (0xFF)         //  Tag End of Table
4626
 
4627
/************************************************************
4628
* Interrupt Vectors (offset from 0xFF80)
4629
************************************************************/
4630
 
4631
#pragma diag_suppress 1107
4632
#define VECTOR_NAME(name)             name##_ptr
4633
#define EMIT_PRAGMA(x)                _Pragma(#x)
4634
#define CREATE_VECTOR(name)           void * const VECTOR_NAME(name) = (void *)(long)&name
4635
#define PLACE_VECTOR(vector,section)  EMIT_PRAGMA(DATA_SECTION(vector,section))
4636
#define PLACE_INTERRUPT(func)         EMIT_PRAGMA(CODE_SECTION(func,".text:_isr"))
4637
#define ISR_VECTOR(func,offset)       CREATE_VECTOR(func); \
4638
                                      PLACE_VECTOR(VECTOR_NAME(func), offset) \
4639
                                      PLACE_INTERRUPT(func)
4640
 
4641
 
4642
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4643
#define RTC_VECTOR              ".int41"                    /* 0xFFD2 RTC */
4644
#else
4645
#define RTC_VECTOR              (41 * 1u)                    /* 0xFFD2 RTC */
4646
/*#define RTC_ISR(func)           ISR_VECTOR(func, ".int41")  */ /* 0xFFD2 RTC */ /* CCE V2 Style */
4647
#endif
4648
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4649
#define PORT2_VECTOR            ".int42"                    /* 0xFFD4 Port 2 */
4650
#else
4651
#define PORT2_VECTOR            (42 * 1u)                    /* 0xFFD4 Port 2 */
4652
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int42")  */ /* 0xFFD4 Port 2 */ /* CCE V2 Style */
4653
#endif
4654
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4655
#define TIMER2_A1_VECTOR        ".int43"                    /* 0xFFD6 Timer0_A5 CC1-4, TA */
4656
#else
4657
#define TIMER2_A1_VECTOR        (43 * 1u)                    /* 0xFFD6 Timer0_A5 CC1-4, TA */
4658
/*#define TIMER2_A1_ISR(func)     ISR_VECTOR(func, ".int43")  */ /* 0xFFD6 Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
4659
#endif
4660
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4661
#define TIMER2_A0_VECTOR        ".int44"                    /* 0xFFD8 Timer0_A5 CC0 */
4662
#else
4663
#define TIMER2_A0_VECTOR        (44 * 1u)                    /* 0xFFD8 Timer0_A5 CC0 */
4664
/*#define TIMER2_A0_ISR(func)     ISR_VECTOR(func, ".int44")  */ /* 0xFFD8 Timer0_A5 CC0 */ /* CCE V2 Style */
4665
#endif
4666
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4667
#define USCI_B1_VECTOR          ".int45"                    /* 0xFFDA USCI B1 Receive/Transmit */
4668
#else
4669
#define USCI_B1_VECTOR          (45 * 1u)                    /* 0xFFDA USCI B1 Receive/Transmit */
4670
/*#define USCI_B1_ISR(func)       ISR_VECTOR(func, ".int45")  */ /* 0xFFDA USCI B1 Receive/Transmit */ /* CCE V2 Style */
4671
#endif
4672
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4673
#define USCI_A1_VECTOR          ".int46"                    /* 0xFFDC USCI A1 Receive/Transmit */
4674
#else
4675
#define USCI_A1_VECTOR          (46 * 1u)                    /* 0xFFDC USCI A1 Receive/Transmit */
4676
/*#define USCI_A1_ISR(func)       ISR_VECTOR(func, ".int46")  */ /* 0xFFDC USCI A1 Receive/Transmit */ /* CCE V2 Style */
4677
#endif
4678
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4679
#define PORT1_VECTOR            ".int47"                    /* 0xFFDE Port 1 */
4680
#else
4681
#define PORT1_VECTOR            (47 * 1u)                    /* 0xFFDE Port 1 */
4682
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int47")  */ /* 0xFFDE Port 1 */ /* CCE V2 Style */
4683
#endif
4684
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4685
#define TIMER1_A1_VECTOR        ".int48"                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
4686
#else
4687
#define TIMER1_A1_VECTOR        (48 * 1u)                    /* 0xFFE0 Timer1_A3 CC1-2, TA1 */
4688
/*#define TIMER1_A1_ISR(func)     ISR_VECTOR(func, ".int48")  */ /* 0xFFE0 Timer1_A3 CC1-2, TA1 */ /* CCE V2 Style */
4689
#endif
4690
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4691
#define TIMER1_A0_VECTOR        ".int49"                    /* 0xFFE2 Timer1_A3 CC0 */
4692
#else
4693
#define TIMER1_A0_VECTOR        (49 * 1u)                    /* 0xFFE2 Timer1_A3 CC0 */
4694
/*#define TIMER1_A0_ISR(func)     ISR_VECTOR(func, ".int49")  */ /* 0xFFE2 Timer1_A3 CC0 */ /* CCE V2 Style */
4695
#endif
4696
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4697
#define DMA_VECTOR              ".int50"                    /* 0xFFE4 DMA */
4698
#else
4699
#define DMA_VECTOR              (50 * 1u)                    /* 0xFFE4 DMA */
4700
/*#define DMA_ISR(func)           ISR_VECTOR(func, ".int50")  */ /* 0xFFE4 DMA */ /* CCE V2 Style */
4701
#endif
4702
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4703
#define USB_UBM_VECTOR          ".int51"                    /* 0xFFE6 USB Timer / cable event / USB reset */
4704
#else
4705
#define USB_UBM_VECTOR          (51 * 1u)                    /* 0xFFE6 USB Timer / cable event / USB reset */
4706
/*#define USB_UBM_ISR(func)       ISR_VECTOR(func, ".int51")  */ /* 0xFFE6 USB Timer / cable event / USB reset */ /* CCE V2 Style */
4707
#endif
4708
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4709
#define TIMER0_A1_VECTOR        ".int52"                    /* 0xFFE8 Timer0_A5 CC1-4, TA */
4710
#else
4711
#define TIMER0_A1_VECTOR        (52 * 1u)                    /* 0xFFE8 Timer0_A5 CC1-4, TA */
4712
/*#define TIMER0_A1_ISR(func)     ISR_VECTOR(func, ".int52")  */ /* 0xFFE8 Timer0_A5 CC1-4, TA */ /* CCE V2 Style */
4713
#endif
4714
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4715
#define TIMER0_A0_VECTOR        ".int53"                    /* 0xFFEA Timer0_A5 CC0 */
4716
#else
4717
#define TIMER0_A0_VECTOR        (53 * 1u)                    /* 0xFFEA Timer0_A5 CC0 */
4718
/*#define TIMER0_A0_ISR(func)     ISR_VECTOR(func, ".int53")  */ /* 0xFFEA Timer0_A5 CC0 */ /* CCE V2 Style */
4719
#endif
4720
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4721
#define ADC10_VECTOR            ".int54"                    /* 0xFFEC ADC */
4722
#else
4723
#define ADC10_VECTOR            (54 * 1u)                    /* 0xFFEC ADC */
4724
/*#define ADC10_ISR(func)         ISR_VECTOR(func, ".int54")  */ /* 0xFFEC ADC */ /* CCE V2 Style */
4725
#endif
4726
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4727
#define USCI_B0_VECTOR          ".int55"                    /* 0xFFEE USCI B0 Receive/Transmit */
4728
#else
4729
#define USCI_B0_VECTOR          (55 * 1u)                    /* 0xFFEE USCI B0 Receive/Transmit */
4730
/*#define USCI_B0_ISR(func)       ISR_VECTOR(func, ".int55")  */ /* 0xFFEE USCI B0 Receive/Transmit */ /* CCE V2 Style */
4731
#endif
4732
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4733
#define USCI_A0_VECTOR          ".int56"                    /* 0xFFF0 USCI A0 Receive/Transmit */
4734
#else
4735
#define USCI_A0_VECTOR          (56 * 1u)                    /* 0xFFF0 USCI A0 Receive/Transmit */
4736
/*#define USCI_A0_ISR(func)       ISR_VECTOR(func, ".int56")  */ /* 0xFFF0 USCI A0 Receive/Transmit */ /* CCE V2 Style */
4737
#endif
4738
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4739
#define WDT_VECTOR              ".int57"                    /* 0xFFF2 Watchdog Timer */
4740
#else
4741
#define WDT_VECTOR              (57 * 1u)                    /* 0xFFF2 Watchdog Timer */
4742
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int57")  */ /* 0xFFF2 Watchdog Timer */ /* CCE V2 Style */
4743
#endif
4744
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4745
#define TIMER0_B1_VECTOR        ".int58"                    /* 0xFFF4 Timer0_B7 CC1-6, TB */
4746
#else
4747
#define TIMER0_B1_VECTOR        (58 * 1u)                    /* 0xFFF4 Timer0_B7 CC1-6, TB */
4748
/*#define TIMER0_B1_ISR(func)     ISR_VECTOR(func, ".int58")  */ /* 0xFFF4 Timer0_B7 CC1-6, TB */ /* CCE V2 Style */
4749
#endif
4750
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4751
#define TIMER0_B0_VECTOR        ".int59"                    /* 0xFFF6 Timer0_B7 CC0 */
4752
#else
4753
#define TIMER0_B0_VECTOR        (59 * 1u)                    /* 0xFFF6 Timer0_B7 CC0 */
4754
/*#define TIMER0_B0_ISR(func)     ISR_VECTOR(func, ".int59")  */ /* 0xFFF6 Timer0_B7 CC0 */ /* CCE V2 Style */
4755
#endif
4756
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4757
#define COMP_B_VECTOR           ".int60"                    /* 0xFFF8 Comparator B */
4758
#else
4759
#define COMP_B_VECTOR           (60 * 1u)                    /* 0xFFF8 Comparator B */
4760
/*#define COMP_B_ISR(func)        ISR_VECTOR(func, ".int60")  */ /* 0xFFF8 Comparator B */ /* CCE V2 Style */
4761
#endif
4762
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4763
#define UNMI_VECTOR             ".int61"                    /* 0xFFFA User Non-maskable */
4764
#else
4765
#define UNMI_VECTOR             (61 * 1u)                    /* 0xFFFA User Non-maskable */
4766
/*#define UNMI_ISR(func)          ISR_VECTOR(func, ".int61")  */ /* 0xFFFA User Non-maskable */ /* CCE V2 Style */
4767
#endif
4768
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4769
#define SYSNMI_VECTOR           ".int62"                    /* 0xFFFC System Non-maskable */
4770
#else
4771
#define SYSNMI_VECTOR           (62 * 1u)                    /* 0xFFFC System Non-maskable */
4772
/*#define SYSNMI_ISR(func)        ISR_VECTOR(func, ".int62")  */ /* 0xFFFC System Non-maskable */ /* CCE V2 Style */
4773
#endif
4774
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
4775
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
4776
#else
4777
#define RESET_VECTOR            (63 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
4778
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int63")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
4779
#endif
4780
 
4781
/************************************************************
4782
* End of Modules
4783
************************************************************/
4784
 
4785
#ifdef __cplusplus
4786
}
4787
#endif /* extern "C" */
4788
 
4789
#endif /* #ifndef __MSP430F5509 */
4790