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
* MSP430F5132 device.
8
*
9
* Texas Instruments, Version 1.2
10
*
11
* Rev. 1.0, Setup
12
* Rev. 1.1  Changed access type of TimerA/D registers to word only
13
* Rev. 1.2  Fixed PortMapper Definitons
14
*
15
*
16
********************************************************************/
17
 
18
#ifndef __MSP430F5132
19
#define __MSP430F5132
20
 
21
#ifdef __cplusplus
22
extern "C" {
23
#endif
24
 
25
 
26
/*----------------------------------------------------------------------------*/
27
/* PERIPHERAL FILE MAP                                                        */
28
/*----------------------------------------------------------------------------*/
29
 
30
/* External references resolved by a device-specific linker command file */
31
#define SFR_8BIT(address)   extern volatile unsigned char address
32
#define SFR_16BIT(address)  extern volatile unsigned int address
33
//#define SFR_20BIT(address)  extern volatile unsigned int address
34
typedef void (* __SFR_FARPTR)();
35
#define SFR_20BIT(address) extern __SFR_FARPTR address
36
#define SFR_32BIT(address)  extern volatile unsigned long address
37
 
38
 
39
 
40
/************************************************************
41
* STANDARD BITS
42
************************************************************/
43
 
44
#define BIT0                   (0x0001)
45
#define BIT1                   (0x0002)
46
#define BIT2                   (0x0004)
47
#define BIT3                   (0x0008)
48
#define BIT4                   (0x0010)
49
#define BIT5                   (0x0020)
50
#define BIT6                   (0x0040)
51
#define BIT7                   (0x0080)
52
#define BIT8                   (0x0100)
53
#define BIT9                   (0x0200)
54
#define BITA                   (0x0400)
55
#define BITB                   (0x0800)
56
#define BITC                   (0x1000)
57
#define BITD                   (0x2000)
58
#define BITE                   (0x4000)
59
#define BITF                   (0x8000)
60
 
61
/************************************************************
62
* STATUS REGISTER BITS
63
************************************************************/
64
 
65
#define C                      (0x0001)
66
#define Z                      (0x0002)
67
#define N                      (0x0004)
68
#define V                      (0x0100)
69
#define GIE                    (0x0008)
70
#define CPUOFF                 (0x0010)
71
#define OSCOFF                 (0x0020)
72
#define SCG0                   (0x0040)
73
#define SCG1                   (0x0080)
74
 
75
/* Low Power Modes coded with Bits 4-7 in SR */
76
 
77
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
78
#define LPM0                   (CPUOFF)
79
#define LPM1                   (SCG0+CPUOFF)
80
#define LPM2                   (SCG1+CPUOFF)
81
#define LPM3                   (SCG1+SCG0+CPUOFF)
82
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
83
/* End #defines for assembler */
84
 
85
#else /* Begin #defines for C */
86
#define LPM0_bits              (CPUOFF)
87
#define LPM1_bits              (SCG0+CPUOFF)
88
#define LPM2_bits              (SCG1+CPUOFF)
89
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
90
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
91
 
92
#include "in430.h"
93
 
94
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
95
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
96
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
97
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
98
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
99
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
100
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
101
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
102
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
103
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
104
#endif /* End #defines for C */
105
 
106
/************************************************************
107
* CPU
108
************************************************************/
109
#define __MSP430_HAS_MSP430XV2_CPU__                /* Definition to show that it has MSP430XV2 CPU */
110
 
111
/************************************************************
112
* PERIPHERAL FILE MAP
113
************************************************************/
114
 
115
/************************************************************
116
* ADC10_A
117
************************************************************/
118
#define __MSP430_HAS_ADC10_A__                /* Definition to show that Module is available */
119
#define __MSP430_BASEADDRESS_ADC10_A__ 0x0740
120
 
121
SFR_16BIT(ADC10CTL0);                         /* ADC10 Control 0 */
122
SFR_8BIT(ADC10CTL0_L);                        /* ADC10 Control 0 */
123
SFR_8BIT(ADC10CTL0_H);                        /* ADC10 Control 0 */
124
SFR_16BIT(ADC10CTL1);                         /* ADC10 Control 1 */
125
SFR_8BIT(ADC10CTL1_L);                        /* ADC10 Control 1 */
126
SFR_8BIT(ADC10CTL1_H);                        /* ADC10 Control 1 */
127
SFR_16BIT(ADC10CTL2);                         /* ADC10 Control 2 */
128
SFR_8BIT(ADC10CTL2_L);                        /* ADC10 Control 2 */
129
SFR_8BIT(ADC10CTL2_H);                        /* ADC10 Control 2 */
130
SFR_16BIT(ADC10LO);                           /* ADC10 Window Comparator High Threshold */
131
SFR_8BIT(ADC10LO_L);                          /* ADC10 Window Comparator High Threshold */
132
SFR_8BIT(ADC10LO_H);                          /* ADC10 Window Comparator High Threshold */
133
SFR_16BIT(ADC10HI);                           /* ADC10 Window Comparator High Threshold */
134
SFR_8BIT(ADC10HI_L);                          /* ADC10 Window Comparator High Threshold */
135
SFR_8BIT(ADC10HI_H);                          /* ADC10 Window Comparator High Threshold */
136
SFR_16BIT(ADC10MCTL0);                        /* ADC10 Memory Control 0 */
137
SFR_8BIT(ADC10MCTL0_L);                       /* ADC10 Memory Control 0 */
138
SFR_8BIT(ADC10MCTL0_H);                       /* ADC10 Memory Control 0 */
139
SFR_16BIT(ADC10MEM0);                         /* ADC10 Conversion Memory 0 */
140
SFR_8BIT(ADC10MEM0_L);                        /* ADC10 Conversion Memory 0 */
141
SFR_8BIT(ADC10MEM0_H);                        /* ADC10 Conversion Memory 0 */
142
SFR_16BIT(ADC10IE);                           /* ADC10 Interrupt Enable */
143
SFR_8BIT(ADC10IE_L);                          /* ADC10 Interrupt Enable */
144
SFR_8BIT(ADC10IE_H);                          /* ADC10 Interrupt Enable */
145
SFR_16BIT(ADC10IFG);                          /* ADC10 Interrupt Flag */
146
SFR_8BIT(ADC10IFG_L);                         /* ADC10 Interrupt Flag */
147
SFR_8BIT(ADC10IFG_H);                         /* ADC10 Interrupt Flag */
148
SFR_16BIT(ADC10IV);                           /* ADC10 Interrupt Vector Word */
149
SFR_8BIT(ADC10IV_L);                          /* ADC10 Interrupt Vector Word */
150
SFR_8BIT(ADC10IV_H);                          /* ADC10 Interrupt Vector Word */
151
 
152
/* ADC10CTL0 Control Bits */
153
#define ADC10SC                (0x0001)       /* ADC10 Start Conversion */
154
#define ADC10ENC               (0x0002)       /* ADC10 Enable Conversion */
155
#define ADC10ON                (0x0010)       /* ADC10 On/enable */
156
#define ADC10MSC               (0x0080)       /* ADC10 Multiple SampleConversion */
157
#define ADC10SHT0              (0x0100)       /* ADC10 Sample Hold Select Bit: 0 */
158
#define ADC10SHT1              (0x0200)       /* ADC10 Sample Hold Select Bit: 1 */
159
#define ADC10SHT2              (0x0400)       /* ADC10 Sample Hold Select Bit: 2 */
160
#define ADC10SHT3              (0x0800)       /* ADC10 Sample Hold Select Bit: 3 */
161
 
162
/* ADC10CTL0 Control Bits */
163
#define ADC10SC_L              (0x0001)       /* ADC10 Start Conversion */
164
#define ADC10ENC_L             (0x0002)       /* ADC10 Enable Conversion */
165
#define ADC10ON_L              (0x0010)       /* ADC10 On/enable */
166
#define ADC10MSC_L             (0x0080)       /* ADC10 Multiple SampleConversion */
167
 
168
/* ADC10CTL0 Control Bits */
169
#define ADC10SHT0_H            (0x0001)       /* ADC10 Sample Hold Select Bit: 0 */
170
#define ADC10SHT1_H            (0x0002)       /* ADC10 Sample Hold Select Bit: 1 */
171
#define ADC10SHT2_H            (0x0004)       /* ADC10 Sample Hold Select Bit: 2 */
172
#define ADC10SHT3_H            (0x0008)       /* ADC10 Sample Hold Select Bit: 3 */
173
 
174
#define ADC10SHT_0             (0*0x100u)     /* ADC10 Sample Hold Select 0 */
175
#define ADC10SHT_1             (1*0x100u)     /* ADC10 Sample Hold Select 1 */
176
#define ADC10SHT_2             (2*0x100u)     /* ADC10 Sample Hold Select 2 */
177
#define ADC10SHT_3             (3*0x100u)     /* ADC10 Sample Hold Select 3 */
178
#define ADC10SHT_4             (4*0x100u)     /* ADC10 Sample Hold Select 4 */
179
#define ADC10SHT_5             (5*0x100u)     /* ADC10 Sample Hold Select 5 */
180
#define ADC10SHT_6             (6*0x100u)     /* ADC10 Sample Hold Select 6 */
181
#define ADC10SHT_7             (7*0x100u)     /* ADC10 Sample Hold Select 7 */
182
#define ADC10SHT_8             (8*0x100u)     /* ADC10 Sample Hold Select 8 */
183
#define ADC10SHT_9             (9*0x100u)     /* ADC10 Sample Hold Select 9 */
184
#define ADC10SHT_10            (10*0x100u)    /* ADC10 Sample Hold Select 10 */
185
#define ADC10SHT_11            (11*0x100u)    /* ADC10 Sample Hold Select 11 */
186
#define ADC10SHT_12            (12*0x100u)    /* ADC10 Sample Hold Select 12 */
187
#define ADC10SHT_13            (13*0x100u)    /* ADC10 Sample Hold Select 13 */
188
#define ADC10SHT_14            (14*0x100u)    /* ADC10 Sample Hold Select 14 */
189
#define ADC10SHT_15            (15*0x100u)    /* ADC10 Sample Hold Select 15 */
190
 
191
/* ADC10CTL1 Control Bits */
192
#define ADC10BUSY              (0x0001)       /* ADC10 Busy */
193
#define ADC10CONSEQ0           (0x0002)       /* ADC10 Conversion Sequence Select 0 */
194
#define ADC10CONSEQ1           (0x0004)       /* ADC10 Conversion Sequence Select 1 */
195
#define ADC10SSEL0             (0x0008)       /* ADC10 Clock Source Select 0 */
196
#define ADC10SSEL1             (0x0010)       /* ADC10 Clock Source Select 1 */
197
#define ADC10DIV0              (0x0020)       /* ADC10 Clock Divider Select 0 */
198
#define ADC10DIV1              (0x0040)       /* ADC10 Clock Divider Select 1 */
199
#define ADC10DIV2              (0x0080)       /* ADC10 Clock Divider Select 2 */
200
#define ADC10ISSH              (0x0100)       /* ADC10 Invert Sample Hold Signal */
201
#define ADC10SHP               (0x0200)       /* ADC10 Sample/Hold Pulse Mode */
202
#define ADC10SHS0              (0x0400)       /* ADC10 Sample/Hold Source 0 */
203
#define ADC10SHS1              (0x0800)       /* ADC10 Sample/Hold Source 1 */
204
 
205
/* ADC10CTL1 Control Bits */
206
#define ADC10BUSY_L            (0x0001)       /* ADC10 Busy */
207
#define ADC10CONSEQ0_L         (0x0002)       /* ADC10 Conversion Sequence Select 0 */
208
#define ADC10CONSEQ1_L         (0x0004)       /* ADC10 Conversion Sequence Select 1 */
209
#define ADC10SSEL0_L           (0x0008)       /* ADC10 Clock Source Select 0 */
210
#define ADC10SSEL1_L           (0x0010)       /* ADC10 Clock Source Select 1 */
211
#define ADC10DIV0_L            (0x0020)       /* ADC10 Clock Divider Select 0 */
212
#define ADC10DIV1_L            (0x0040)       /* ADC10 Clock Divider Select 1 */
213
#define ADC10DIV2_L            (0x0080)       /* ADC10 Clock Divider Select 2 */
214
 
215
/* ADC10CTL1 Control Bits */
216
#define ADC10ISSH_H            (0x0001)       /* ADC10 Invert Sample Hold Signal */
217
#define ADC10SHP_H             (0x0002)       /* ADC10 Sample/Hold Pulse Mode */
218
#define ADC10SHS0_H            (0x0004)       /* ADC10 Sample/Hold Source 0 */
219
#define ADC10SHS1_H            (0x0008)       /* ADC10 Sample/Hold Source 1 */
220
 
221
#define ADC10CONSEQ_0          (0*2u)         /* ADC10 Conversion Sequence Select: 0 */
222
#define ADC10CONSEQ_1          (1*2u)         /* ADC10 Conversion Sequence Select: 1 */
223
#define ADC10CONSEQ_2          (2*2u)         /* ADC10 Conversion Sequence Select: 2 */
224
#define ADC10CONSEQ_3          (3*2u)         /* ADC10 Conversion Sequence Select: 3 */
225
 
226
#define ADC10SSEL_0            (0*8u)         /* ADC10 Clock Source Select: 0 */
227
#define ADC10SSEL_1            (1*8u)         /* ADC10 Clock Source Select: 1 */
228
#define ADC10SSEL_2            (2*8u)         /* ADC10 Clock Source Select: 2 */
229
#define ADC10SSEL_3            (3*8u)         /* ADC10 Clock Source Select: 3 */
230
 
231
#define ADC10DIV_0             (0*0x20u)      /* ADC10 Clock Divider Select: 0 */
232
#define ADC10DIV_1             (1*0x20u)      /* ADC10 Clock Divider Select: 1 */
233
#define ADC10DIV_2             (2*0x20u)      /* ADC10 Clock Divider Select: 2 */
234
#define ADC10DIV_3             (3*0x20u)      /* ADC10 Clock Divider Select: 3 */
235
#define ADC10DIV_4             (4*0x20u)      /* ADC10 Clock Divider Select: 4 */
236
#define ADC10DIV_5             (5*0x20u)      /* ADC10 Clock Divider Select: 5 */
237
#define ADC10DIV_6             (6*0x20u)      /* ADC10 Clock Divider Select: 6 */
238
#define ADC10DIV_7             (7*0x20u)      /* ADC10 Clock Divider Select: 7 */
239
 
240
#define ADC10SHS_0             (0*0x400u)     /* ADC10 Sample/Hold Source: 0 */
241
#define ADC10SHS_1             (1*0x400u)     /* ADC10 Sample/Hold Source: 1 */
242
#define ADC10SHS_2             (2*0x400u)     /* ADC10 Sample/Hold Source: 2 */
243
#define ADC10SHS_3             (3*0x400u)     /* ADC10 Sample/Hold Source: 3 */
244
 
245
/* ADC10CTL2 Control Bits */
246
#define ADC10REFBURST          (0x0001)       /* ADC10 Reference Burst */
247
#define ADC10SR                (0x0004)       /* ADC10 Sampling Rate */
248
#define ADC10DF                (0x0008)       /* ADC10 Data Format */
249
#define ADC10RES               (0x0010)       /* ADC10 Resolution Bit */
250
#define ADC10PDIV0             (0x0100)       /* ADC10 predivider Bit: 0 */
251
#define ADC10PDIV1             (0x0200)       /* ADC10 predivider Bit: 1 */
252
 
253
/* ADC10CTL2 Control Bits */
254
#define ADC10REFBURST_L        (0x0001)       /* ADC10 Reference Burst */
255
#define ADC10SR_L              (0x0004)       /* ADC10 Sampling Rate */
256
#define ADC10DF_L              (0x0008)       /* ADC10 Data Format */
257
#define ADC10RES_L             (0x0010)       /* ADC10 Resolution Bit */
258
 
259
/* ADC10CTL2 Control Bits */
260
#define ADC10PDIV0_H           (0x0001)       /* ADC10 predivider Bit: 0 */
261
#define ADC10PDIV1_H           (0x0002)       /* ADC10 predivider Bit: 1 */
262
 
263
#define ADC10PDIV_0            (0x0000)       /* ADC10 predivider /1 */
264
#define ADC10PDIV_1            (0x0100)       /* ADC10 predivider /2 */
265
#define ADC10PDIV_2            (0x0200)       /* ADC10 predivider /64 */
266
#define ADC10PDIV_3            (0x0300)       /* ADC10 predivider reserved */
267
 
268
#define ADC10PDIV__1           (0x0000)       /* ADC10 predivider /1 */
269
#define ADC10PDIV__4           (0x0100)       /* ADC10 predivider /2 */
270
#define ADC10PDIV__64          (0x0200)       /* ADC10 predivider /64 */
271
 
272
/* ADC10MCTL0 Control Bits */
273
#define ADC10INCH0             (0x0001)       /* ADC10 Input Channel Select Bit 0 */
274
#define ADC10INCH1             (0x0002)       /* ADC10 Input Channel Select Bit 1 */
275
#define ADC10INCH2             (0x0004)       /* ADC10 Input Channel Select Bit 2 */
276
#define ADC10INCH3             (0x0008)       /* ADC10 Input Channel Select Bit 3 */
277
#define ADC10SREF0             (0x0010)       /* ADC10 Select Reference Bit 0 */
278
#define ADC10SREF1             (0x0020)       /* ADC10 Select Reference Bit 1 */
279
#define ADC10SREF2             (0x0040)       /* ADC10 Select Reference Bit 2 */
280
 
281
/* ADC10MCTL0 Control Bits */
282
#define ADC10INCH0_L           (0x0001)       /* ADC10 Input Channel Select Bit 0 */
283
#define ADC10INCH1_L           (0x0002)       /* ADC10 Input Channel Select Bit 1 */
284
#define ADC10INCH2_L           (0x0004)       /* ADC10 Input Channel Select Bit 2 */
285
#define ADC10INCH3_L           (0x0008)       /* ADC10 Input Channel Select Bit 3 */
286
#define ADC10SREF0_L           (0x0010)       /* ADC10 Select Reference Bit 0 */
287
#define ADC10SREF1_L           (0x0020)       /* ADC10 Select Reference Bit 1 */
288
#define ADC10SREF2_L           (0x0040)       /* ADC10 Select Reference Bit 2 */
289
 
290
/* ADC10MCTL0 Control Bits */
291
 
292
#define ADC10INCH_0            (0)            /* ADC10 Input Channel 0 */
293
#define ADC10INCH_1            (1)            /* ADC10 Input Channel 1 */
294
#define ADC10INCH_2            (2)            /* ADC10 Input Channel 2 */
295
#define ADC10INCH_3            (3)            /* ADC10 Input Channel 3 */
296
#define ADC10INCH_4            (4)            /* ADC10 Input Channel 4 */
297
#define ADC10INCH_5            (5)            /* ADC10 Input Channel 5 */
298
#define ADC10INCH_6            (6)            /* ADC10 Input Channel 6 */
299
#define ADC10INCH_7            (7)            /* ADC10 Input Channel 7 */
300
#define ADC10INCH_8            (8)            /* ADC10 Input Channel 8 */
301
#define ADC10INCH_9            (9)            /* ADC10 Input Channel 9 */
302
#define ADC10INCH_10           (10)           /* ADC10 Input Channel 10 */
303
#define ADC10INCH_11           (11)           /* ADC10 Input Channel 11 */
304
#define ADC10INCH_12           (12)           /* ADC10 Input Channel 12 */
305
#define ADC10INCH_13           (13)           /* ADC10 Input Channel 13 */
306
#define ADC10INCH_14           (14)           /* ADC10 Input Channel 14 */
307
#define ADC10INCH_15           (15)           /* ADC10 Input Channel 15 */
308
 
309
#define ADC10SREF_0            (0*0x10u)      /* ADC10 Select Reference 0 */
310
#define ADC10SREF_1            (1*0x10u)      /* ADC10 Select Reference 1 */
311
#define ADC10SREF_2            (2*0x10u)      /* ADC10 Select Reference 2 */
312
#define ADC10SREF_3            (3*0x10u)      /* ADC10 Select Reference 3 */
313
#define ADC10SREF_4            (4*0x10u)      /* ADC10 Select Reference 4 */
314
#define ADC10SREF_5            (5*0x10u)      /* ADC10 Select Reference 5 */
315
#define ADC10SREF_6            (6*0x10u)      /* ADC10 Select Reference 6 */
316
#define ADC10SREF_7            (7*0x10u)      /* ADC10 Select Reference 7 */
317
 
318
/* ADC10IE Interrupt Enable Bits */
319
#define ADC10IE0               (0x0001)       /* ADC10_A Interrupt enable */
320
#define ADC10INIE              (0x0002)       /* ADC10_A Interrupt enable for the inside of window of the Window comparator */
321
#define ADC10LOIE              (0x0004)       /* ADC10_A Interrupt enable for lower threshold of the Window comparator */
322
#define ADC10HIIE              (0x0008)       /* ADC10_A Interrupt enable for upper threshold of the Window comparator */
323
#define ADC10OVIE              (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt enable */
324
#define ADC10TOVIE             (0x0020)       /* ADC10_A conversion-time-overflow Interrupt enable */
325
 
326
/* ADC10IE Interrupt Enable Bits */
327
#define ADC10IE0_L             (0x0001)       /* ADC10_A Interrupt enable */
328
#define ADC10INIE_L            (0x0002)       /* ADC10_A Interrupt enable for the inside of window of the Window comparator */
329
#define ADC10LOIE_L            (0x0004)       /* ADC10_A Interrupt enable for lower threshold of the Window comparator */
330
#define ADC10HIIE_L            (0x0008)       /* ADC10_A Interrupt enable for upper threshold of the Window comparator */
331
#define ADC10OVIE_L            (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt enable */
332
#define ADC10TOVIE_L           (0x0020)       /* ADC10_A conversion-time-overflow Interrupt enable */
333
 
334
/* ADC10IE Interrupt Enable Bits */
335
 
336
/* ADC10IFG Interrupt Flag Bits */
337
#define ADC10IFG0              (0x0001)       /* ADC10_A Interrupt Flag */
338
#define ADC10INIFG             (0x0002)       /* ADC10_A Interrupt Flag for the inside of window of the Window comparator */
339
#define ADC10LOIFG             (0x0004)       /* ADC10_A Interrupt Flag for lower threshold of the Window comparator */
340
#define ADC10HIIFG             (0x0008)       /* ADC10_A Interrupt Flag for upper threshold of the Window comparator */
341
#define ADC10OVIFG             (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt Flag */
342
#define ADC10TOVIFG            (0x0020)       /* ADC10_A conversion-time-overflow Interrupt Flag */
343
 
344
/* ADC10IFG Interrupt Flag Bits */
345
#define ADC10IFG0_L            (0x0001)       /* ADC10_A Interrupt Flag */
346
#define ADC10INIFG_L           (0x0002)       /* ADC10_A Interrupt Flag for the inside of window of the Window comparator */
347
#define ADC10LOIFG_L           (0x0004)       /* ADC10_A Interrupt Flag for lower threshold of the Window comparator */
348
#define ADC10HIIFG_L           (0x0008)       /* ADC10_A Interrupt Flag for upper threshold of the Window comparator */
349
#define ADC10OVIFG_L           (0x0010)       /* ADC10_A ADC10MEM overflow Interrupt Flag */
350
#define ADC10TOVIFG_L          (0x0020)       /* ADC10_A conversion-time-overflow Interrupt Flag */
351
 
352
/* ADC10IFG Interrupt Flag Bits */
353
 
354
/* ADC10IV Definitions */
355
#define ADC10IV_NONE           (0x0000)       /* No Interrupt pending */
356
#define ADC10IV_ADC10OVIFG     (0x0002)       /* ADC10OVIFG */
357
#define ADC10IV_ADC10TOVIFG    (0x0004)       /* ADC10TOVIFG */
358
#define ADC10IV_ADC10HIIFG     (0x0006)       /* ADC10HIIFG */
359
#define ADC10IV_ADC10LOIFG     (0x0008)       /* ADC10LOIFG */
360
#define ADC10IV_ADC10INIFG     (0x000A)       /* ADC10INIFG */
361
#define ADC10IV_ADC10IFG       (0x000C)       /* ADC10IFG */
362
 
363
/************************************************************
364
* Comparator B
365
************************************************************/
366
#define __MSP430_HAS_COMPB__                  /* Definition to show that Module is available */
367
#define __MSP430_BASEADDRESS_COMPB__ 0x08C0
368
 
369
SFR_16BIT(CBCTL0);                            /* Comparator B Control Register 0 */
370
SFR_8BIT(CBCTL0_L);                           /* Comparator B Control Register 0 */
371
SFR_8BIT(CBCTL0_H);                           /* Comparator B Control Register 0 */
372
SFR_16BIT(CBCTL1);                            /* Comparator B Control Register 1 */
373
SFR_8BIT(CBCTL1_L);                           /* Comparator B Control Register 1 */
374
SFR_8BIT(CBCTL1_H);                           /* Comparator B Control Register 1 */
375
SFR_16BIT(CBCTL2);                            /* Comparator B Control Register 2 */
376
SFR_8BIT(CBCTL2_L);                           /* Comparator B Control Register 2 */
377
SFR_8BIT(CBCTL2_H);                           /* Comparator B Control Register 2 */
378
SFR_16BIT(CBCTL3);                            /* Comparator B Control Register 3 */
379
SFR_8BIT(CBCTL3_L);                           /* Comparator B Control Register 3 */
380
SFR_8BIT(CBCTL3_H);                           /* Comparator B Control Register 3 */
381
SFR_16BIT(CBINT);                             /* Comparator B Interrupt Register */
382
SFR_8BIT(CBINT_L);                            /* Comparator B Interrupt Register */
383
SFR_8BIT(CBINT_H);                            /* Comparator B Interrupt Register */
384
SFR_16BIT(CBIV);                              /* Comparator B Interrupt Vector Word */
385
 
386
/* CBCTL0 Control Bits */
387
#define CBIPSEL0               (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
388
#define CBIPSEL1               (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
389
#define CBIPSEL2               (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
390
#define CBIPSEL3               (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
391
//#define RESERVED            (0x0010)  /* Comp. B */
392
//#define RESERVED            (0x0020)  /* Comp. B */
393
//#define RESERVED            (0x0040)  /* Comp. B */
394
#define CBIPEN                 (0x0080)       /* Comp. B Pos. Channel Input Enable */
395
#define CBIMSEL0               (0x0100)       /* Comp. B Neg. Channel Input Select 0 */
396
#define CBIMSEL1               (0x0200)       /* Comp. B Neg. Channel Input Select 1 */
397
#define CBIMSEL2               (0x0400)       /* Comp. B Neg. Channel Input Select 2 */
398
#define CBIMSEL3               (0x0800)       /* Comp. B Neg. Channel Input Select 3 */
399
//#define RESERVED            (0x1000)  /* Comp. B */
400
//#define RESERVED            (0x2000)  /* Comp. B */
401
//#define RESERVED            (0x4000)  /* Comp. B */
402
#define CBIMEN                 (0x8000)       /* Comp. B Neg. Channel Input Enable */
403
 
404
/* CBCTL0 Control Bits */
405
#define CBIPSEL0_L             (0x0001)       /* Comp. B Pos. Channel Input Select 0 */
406
#define CBIPSEL1_L             (0x0002)       /* Comp. B Pos. Channel Input Select 1 */
407
#define CBIPSEL2_L             (0x0004)       /* Comp. B Pos. Channel Input Select 2 */
408
#define CBIPSEL3_L             (0x0008)       /* Comp. B Pos. Channel Input Select 3 */
409
//#define RESERVED            (0x0010)  /* Comp. B */
410
//#define RESERVED            (0x0020)  /* Comp. B */
411
//#define RESERVED            (0x0040)  /* Comp. B */
412
#define CBIPEN_L               (0x0080)       /* Comp. B Pos. Channel Input Enable */
413
//#define RESERVED            (0x1000)  /* Comp. B */
414
//#define RESERVED            (0x2000)  /* Comp. B */
415
//#define RESERVED            (0x4000)  /* Comp. B */
416
 
417
/* CBCTL0 Control Bits */
418
//#define RESERVED            (0x0010)  /* Comp. B */
419
//#define RESERVED            (0x0020)  /* Comp. B */
420
//#define RESERVED            (0x0040)  /* Comp. B */
421
#define CBIMSEL0_H             (0x0001)       /* Comp. B Neg. Channel Input Select 0 */
422
#define CBIMSEL1_H             (0x0002)       /* Comp. B Neg. Channel Input Select 1 */
423
#define CBIMSEL2_H             (0x0004)       /* Comp. B Neg. Channel Input Select 2 */
424
#define CBIMSEL3_H             (0x0008)       /* Comp. B Neg. Channel Input Select 3 */
425
//#define RESERVED            (0x1000)  /* Comp. B */
426
//#define RESERVED            (0x2000)  /* Comp. B */
427
//#define RESERVED            (0x4000)  /* Comp. B */
428
#define CBIMEN_H               (0x0080)       /* Comp. B Neg. Channel Input Enable */
429
 
430
#define CBIPSEL_0              (0x0000)       /* Comp. B V+ terminal Input Select: Channel 0 */
431
#define CBIPSEL_1              (0x0001)       /* Comp. B V+ terminal Input Select: Channel 1 */
432
#define CBIPSEL_2              (0x0002)       /* Comp. B V+ terminal Input Select: Channel 2 */
433
#define CBIPSEL_3              (0x0003)       /* Comp. B V+ terminal Input Select: Channel 3 */
434
#define CBIPSEL_4              (0x0004)       /* Comp. B V+ terminal Input Select: Channel 4 */
435
#define CBIPSEL_5              (0x0005)       /* Comp. B V+ terminal Input Select: Channel 5 */
436
#define CBIPSEL_6              (0x0006)       /* Comp. B V+ terminal Input Select: Channel 6 */
437
#define CBIPSEL_7              (0x0007)       /* Comp. B V+ terminal Input Select: Channel 7 */
438
#define CBIPSEL_8              (0x0008)       /* Comp. B V+ terminal Input Select: Channel 8 */
439
#define CBIPSEL_9              (0x0009)       /* Comp. B V+ terminal Input Select: Channel 9 */
440
#define CBIPSEL_10             (0x000A)       /* Comp. B V+ terminal Input Select: Channel 10 */
441
#define CBIPSEL_11             (0x000B)       /* Comp. B V+ terminal Input Select: Channel 11 */
442
#define CBIPSEL_12             (0x000C)       /* Comp. B V+ terminal Input Select: Channel 12 */
443
#define CBIPSEL_13             (0x000D)       /* Comp. B V+ terminal Input Select: Channel 13 */
444
#define CBIPSEL_14             (0x000E)       /* Comp. B V+ terminal Input Select: Channel 14 */
445
#define CBIPSEL_15             (0x000F)       /* Comp. B V+ terminal Input Select: Channel 15 */
446
 
447
#define CBIMSEL_0              (0x0000)       /* Comp. B V- Terminal Input Select: Channel 0 */
448
#define CBIMSEL_1              (0x0100)       /* Comp. B V- Terminal Input Select: Channel 1 */
449
#define CBIMSEL_2              (0x0200)       /* Comp. B V- Terminal Input Select: Channel 2 */
450
#define CBIMSEL_3              (0x0300)       /* Comp. B V- Terminal Input Select: Channel 3 */
451
#define CBIMSEL_4              (0x0400)       /* Comp. B V- Terminal Input Select: Channel 4 */
452
#define CBIMSEL_5              (0x0500)       /* Comp. B V- Terminal Input Select: Channel 5 */
453
#define CBIMSEL_6              (0x0600)       /* Comp. B V- Terminal Input Select: Channel 6 */
454
#define CBIMSEL_7              (0x0700)       /* Comp. B V- Terminal Input Select: Channel 7 */
455
#define CBIMSEL_8              (0x0800)       /* Comp. B V- terminal Input Select: Channel 8 */
456
#define CBIMSEL_9              (0x0900)       /* Comp. B V- terminal Input Select: Channel 9 */
457
#define CBIMSEL_10             (0x0A00)       /* Comp. B V- terminal Input Select: Channel 10 */
458
#define CBIMSEL_11             (0x0B00)       /* Comp. B V- terminal Input Select: Channel 11 */
459
#define CBIMSEL_12             (0x0C00)       /* Comp. B V- terminal Input Select: Channel 12 */
460
#define CBIMSEL_13             (0x0D00)       /* Comp. B V- terminal Input Select: Channel 13 */
461
#define CBIMSEL_14             (0x0E00)       /* Comp. B V- terminal Input Select: Channel 14 */
462
#define CBIMSEL_15             (0x0F00)       /* Comp. B V- terminal Input Select: Channel 15 */
463
 
464
/* CBCTL1 Control Bits */
465
#define CBOUT                  (0x0001)       /* Comp. B Output */
466
#define CBOUTPOL               (0x0002)       /* Comp. B Output Polarity */
467
#define CBF                    (0x0004)       /* Comp. B Enable Output Filter */
468
#define CBIES                  (0x0008)       /* Comp. B Interrupt Edge Select */
469
#define CBSHORT                (0x0010)       /* Comp. B Input Short */
470
#define CBEX                   (0x0020)       /* Comp. B Exchange Inputs */
471
#define CBFDLY0                (0x0040)       /* Comp. B Filter delay Bit 0 */
472
#define CBFDLY1                (0x0080)       /* Comp. B Filter delay Bit 1 */
473
#define CBPWRMD0               (0x0100)       /* Comp. B Power Mode Bit 0 */
474
#define CBPWRMD1               (0x0200)       /* Comp. B Power Mode Bit 1 */
475
#define CBON                   (0x0400)       /* Comp. B enable */
476
#define CBMRVL                 (0x0800)       /* Comp. B CBMRV Level */
477
#define CBMRVS                 (0x1000)       /* Comp. B Output selects between VREF0 or VREF1*/
478
//#define RESERVED            (0x2000)  /* Comp. B */
479
//#define RESERVED            (0x4000)  /* Comp. B */
480
//#define RESERVED            (0x8000)  /* Comp. B */
481
 
482
/* CBCTL1 Control Bits */
483
#define CBOUT_L                (0x0001)       /* Comp. B Output */
484
#define CBOUTPOL_L             (0x0002)       /* Comp. B Output Polarity */
485
#define CBF_L                  (0x0004)       /* Comp. B Enable Output Filter */
486
#define CBIES_L                (0x0008)       /* Comp. B Interrupt Edge Select */
487
#define CBSHORT_L              (0x0010)       /* Comp. B Input Short */
488
#define CBEX_L                 (0x0020)       /* Comp. B Exchange Inputs */
489
#define CBFDLY0_L              (0x0040)       /* Comp. B Filter delay Bit 0 */
490
#define CBFDLY1_L              (0x0080)       /* Comp. B Filter delay Bit 1 */
491
//#define RESERVED            (0x2000)  /* Comp. B */
492
//#define RESERVED            (0x4000)  /* Comp. B */
493
//#define RESERVED            (0x8000)  /* Comp. B */
494
 
495
/* CBCTL1 Control Bits */
496
#define CBPWRMD0_H             (0x0001)       /* Comp. B Power Mode Bit 0 */
497
#define CBPWRMD1_H             (0x0002)       /* Comp. B Power Mode Bit 1 */
498
#define CBON_H                 (0x0004)       /* Comp. B enable */
499
#define CBMRVL_H               (0x0008)       /* Comp. B CBMRV Level */
500
#define CBMRVS_H               (0x0010)       /* Comp. B Output selects between VREF0 or VREF1*/
501
//#define RESERVED            (0x2000)  /* Comp. B */
502
//#define RESERVED            (0x4000)  /* Comp. B */
503
//#define RESERVED            (0x8000)  /* Comp. B */
504
 
505
#define CBFDLY_0               (0x0000)       /* Comp. B Filter delay 0 : 450ns */
506
#define CBFDLY_1               (0x0040)       /* Comp. B Filter delay 1 : 900ns */
507
#define CBFDLY_2               (0x0080)       /* Comp. B Filter delay 2 : 1800ns */
508
#define CBFDLY_3               (0x00C0)       /* Comp. B Filter delay 3 : 3600ns */
509
 
510
#define CBPWRMD_0              (0x0000)       /* Comp. B Power Mode 0 : High speed */
511
#define CBPWRMD_1              (0x0100)       /* Comp. B Power Mode 1 : Normal */
512
#define CBPWRMD_2              (0x0200)       /* Comp. B Power Mode 2 : Ultra-Low*/
513
#define CBPWRMD_3              (0x0300)       /* Comp. B Power Mode 3 : Reserved */
514
 
515
/* CBCTL2 Control Bits */
516
#define CBREF00                (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
517
#define CBREF01                (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
518
#define CBREF02                (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
519
#define CBREF03                (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
520
#define CBREF04                (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
521
#define CBRSEL                 (0x0020)       /* Comp. B Reference select */
522
#define CBRS0                  (0x0040)       /* Comp. B Reference Source Bit : 0 */
523
#define CBRS1                  (0x0080)       /* Comp. B Reference Source Bit : 1 */
524
#define CBREF10                (0x0100)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
525
#define CBREF11                (0x0200)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
526
#define CBREF12                (0x0400)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
527
#define CBREF13                (0x0800)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
528
#define CBREF14                (0x1000)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
529
#define CBREFL0                (0x2000)       /* Comp. B Reference voltage level Bit : 0 */
530
#define CBREFL1                (0x4000)       /* Comp. B Reference voltage level Bit : 1 */
531
#define CBREFACC               (0x8000)       /* Comp. B Reference Accuracy */
532
 
533
/* CBCTL2 Control Bits */
534
#define CBREF00_L              (0x0001)       /* Comp. B Reference 0 Resistor Select Bit : 0 */
535
#define CBREF01_L              (0x0002)       /* Comp. B Reference 0 Resistor Select Bit : 1 */
536
#define CBREF02_L              (0x0004)       /* Comp. B Reference 0 Resistor Select Bit : 2 */
537
#define CBREF03_L              (0x0008)       /* Comp. B Reference 0 Resistor Select Bit : 3 */
538
#define CBREF04_L              (0x0010)       /* Comp. B Reference 0 Resistor Select Bit : 4 */
539
#define CBRSEL_L               (0x0020)       /* Comp. B Reference select */
540
#define CBRS0_L                (0x0040)       /* Comp. B Reference Source Bit : 0 */
541
#define CBRS1_L                (0x0080)       /* Comp. B Reference Source Bit : 1 */
542
 
543
/* CBCTL2 Control Bits */
544
#define CBREF10_H              (0x0001)       /* Comp. B Reference 1 Resistor Select Bit : 0 */
545
#define CBREF11_H              (0x0002)       /* Comp. B Reference 1 Resistor Select Bit : 1 */
546
#define CBREF12_H              (0x0004)       /* Comp. B Reference 1 Resistor Select Bit : 2 */
547
#define CBREF13_H              (0x0008)       /* Comp. B Reference 1 Resistor Select Bit : 3 */
548
#define CBREF14_H              (0x0010)       /* Comp. B Reference 1 Resistor Select Bit : 4 */
549
#define CBREFL0_H              (0x0020)       /* Comp. B Reference voltage level Bit : 0 */
550
#define CBREFL1_H              (0x0040)       /* Comp. B Reference voltage level Bit : 1 */
551
#define CBREFACC_H             (0x0080)       /* Comp. B Reference Accuracy */
552
 
553
#define CBREF0_0               (0x0000)       /* Comp. B Int. Ref.0 Select 0 : 1/32 */
554
#define CBREF0_1               (0x0001)       /* Comp. B Int. Ref.0 Select 1 : 2/32 */
555
#define CBREF0_2               (0x0002)       /* Comp. B Int. Ref.0 Select 2 : 3/32 */
556
#define CBREF0_3               (0x0003)       /* Comp. B Int. Ref.0 Select 3 : 4/32 */
557
#define CBREF0_4               (0x0004)       /* Comp. B Int. Ref.0 Select 4 : 5/32 */
558
#define CBREF0_5               (0x0005)       /* Comp. B Int. Ref.0 Select 5 : 6/32 */
559
#define CBREF0_6               (0x0006)       /* Comp. B Int. Ref.0 Select 6 : 7/32 */
560
#define CBREF0_7               (0x0007)       /* Comp. B Int. Ref.0 Select 7 : 8/32 */
561
#define CBREF0_8               (0x0008)       /* Comp. B Int. Ref.0 Select 0 : 9/32 */
562
#define CBREF0_9               (0x0009)       /* Comp. B Int. Ref.0 Select 1 : 10/32 */
563
#define CBREF0_10              (0x000A)       /* Comp. B Int. Ref.0 Select 2 : 11/32 */
564
#define CBREF0_11              (0x000B)       /* Comp. B Int. Ref.0 Select 3 : 12/32 */
565
#define CBREF0_12              (0x000C)       /* Comp. B Int. Ref.0 Select 4 : 13/32 */
566
#define CBREF0_13              (0x000D)       /* Comp. B Int. Ref.0 Select 5 : 14/32 */
567
#define CBREF0_14              (0x000E)       /* Comp. B Int. Ref.0 Select 6 : 15/32 */
568
#define CBREF0_15              (0x000F)       /* Comp. B Int. Ref.0 Select 7 : 16/32 */
569
#define CBREF0_16              (0x0010)       /* Comp. B Int. Ref.0 Select 0 : 17/32 */
570
#define CBREF0_17              (0x0011)       /* Comp. B Int. Ref.0 Select 1 : 18/32 */
571
#define CBREF0_18              (0x0012)       /* Comp. B Int. Ref.0 Select 2 : 19/32 */
572
#define CBREF0_19              (0x0013)       /* Comp. B Int. Ref.0 Select 3 : 20/32 */
573
#define CBREF0_20              (0x0014)       /* Comp. B Int. Ref.0 Select 4 : 21/32 */
574
#define CBREF0_21              (0x0015)       /* Comp. B Int. Ref.0 Select 5 : 22/32 */
575
#define CBREF0_22              (0x0016)       /* Comp. B Int. Ref.0 Select 6 : 23/32 */
576
#define CBREF0_23              (0x0017)       /* Comp. B Int. Ref.0 Select 7 : 24/32 */
577
#define CBREF0_24              (0x0018)       /* Comp. B Int. Ref.0 Select 0 : 25/32 */
578
#define CBREF0_25              (0x0019)       /* Comp. B Int. Ref.0 Select 1 : 26/32 */
579
#define CBREF0_26              (0x001A)       /* Comp. B Int. Ref.0 Select 2 : 27/32 */
580
#define CBREF0_27              (0x001B)       /* Comp. B Int. Ref.0 Select 3 : 28/32 */
581
#define CBREF0_28              (0x001C)       /* Comp. B Int. Ref.0 Select 4 : 29/32 */
582
#define CBREF0_29              (0x001D)       /* Comp. B Int. Ref.0 Select 5 : 30/32 */
583
#define CBREF0_30              (0x001E)       /* Comp. B Int. Ref.0 Select 6 : 31/32 */
584
#define CBREF0_31              (0x001F)       /* Comp. B Int. Ref.0 Select 7 : 32/32 */
585
 
586
#define CBRS_0                 (0x0000)       /* Comp. B Reference Source 0 : Off */
587
#define CBRS_1                 (0x0040)       /* Comp. B Reference Source 1 : Vcc */
588
#define CBRS_2                 (0x0080)       /* Comp. B Reference Source 2 : Shared Ref. */
589
#define CBRS_3                 (0x00C0)       /* Comp. B Reference Source 3 : Shared Ref. / Off */
590
 
591
#define CBREF1_0               (0x0000)       /* Comp. B Int. Ref.1 Select 0 : 1/32 */
592
#define CBREF1_1               (0x0100)       /* Comp. B Int. Ref.1 Select 1 : 2/32 */
593
#define CBREF1_2               (0x0200)       /* Comp. B Int. Ref.1 Select 2 : 3/32 */
594
#define CBREF1_3               (0x0300)       /* Comp. B Int. Ref.1 Select 3 : 4/32 */
595
#define CBREF1_4               (0x0400)       /* Comp. B Int. Ref.1 Select 4 : 5/32 */
596
#define CBREF1_5               (0x0500)       /* Comp. B Int. Ref.1 Select 5 : 6/32 */
597
#define CBREF1_6               (0x0600)       /* Comp. B Int. Ref.1 Select 6 : 7/32 */
598
#define CBREF1_7               (0x0700)       /* Comp. B Int. Ref.1 Select 7 : 8/32 */
599
#define CBREF1_8               (0x0800)       /* Comp. B Int. Ref.1 Select 0 : 9/32 */
600
#define CBREF1_9               (0x0900)       /* Comp. B Int. Ref.1 Select 1 : 10/32 */
601
#define CBREF1_10              (0x0A00)       /* Comp. B Int. Ref.1 Select 2 : 11/32 */
602
#define CBREF1_11              (0x0B00)       /* Comp. B Int. Ref.1 Select 3 : 12/32 */
603
#define CBREF1_12              (0x0C00)       /* Comp. B Int. Ref.1 Select 4 : 13/32 */
604
#define CBREF1_13              (0x0D00)       /* Comp. B Int. Ref.1 Select 5 : 14/32 */
605
#define CBREF1_14              (0x0E00)       /* Comp. B Int. Ref.1 Select 6 : 15/32 */
606
#define CBREF1_15              (0x0F00)       /* Comp. B Int. Ref.1 Select 7 : 16/32 */
607
#define CBREF1_16              (0x1000)       /* Comp. B Int. Ref.1 Select 0 : 17/32 */
608
#define CBREF1_17              (0x1100)       /* Comp. B Int. Ref.1 Select 1 : 18/32 */
609
#define CBREF1_18              (0x1200)       /* Comp. B Int. Ref.1 Select 2 : 19/32 */
610
#define CBREF1_19              (0x1300)       /* Comp. B Int. Ref.1 Select 3 : 20/32 */
611
#define CBREF1_20              (0x1400)       /* Comp. B Int. Ref.1 Select 4 : 21/32 */
612
#define CBREF1_21              (0x1500)       /* Comp. B Int. Ref.1 Select 5 : 22/32 */
613
#define CBREF1_22              (0x1600)       /* Comp. B Int. Ref.1 Select 6 : 23/32 */
614
#define CBREF1_23              (0x1700)       /* Comp. B Int. Ref.1 Select 7 : 24/32 */
615
#define CBREF1_24              (0x1800)       /* Comp. B Int. Ref.1 Select 0 : 25/32 */
616
#define CBREF1_25              (0x1900)       /* Comp. B Int. Ref.1 Select 1 : 26/32 */
617
#define CBREF1_26              (0x1A00)       /* Comp. B Int. Ref.1 Select 2 : 27/32 */
618
#define CBREF1_27              (0x1B00)       /* Comp. B Int. Ref.1 Select 3 : 28/32 */
619
#define CBREF1_28              (0x1C00)       /* Comp. B Int. Ref.1 Select 4 : 29/32 */
620
#define CBREF1_29              (0x1D00)       /* Comp. B Int. Ref.1 Select 5 : 30/32 */
621
#define CBREF1_30              (0x1E00)       /* Comp. B Int. Ref.1 Select 6 : 31/32 */
622
#define CBREF1_31              (0x1F00)       /* Comp. B Int. Ref.1 Select 7 : 32/32 */
623
 
624
#define CBREFL_0               (0x0000)       /* Comp. B Reference voltage level 0 : None */
625
#define CBREFL_1               (0x2000)       /* Comp. B Reference voltage level 1 : 1.5V */
626
#define CBREFL_2               (0x4000)       /* Comp. B Reference voltage level 2 : 2.0V  */
627
#define CBREFL_3               (0x6000)       /* Comp. B Reference voltage level 3 : 2.5V  */
628
 
629
#define CBPD0                  (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
630
#define CBPD1                  (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
631
#define CBPD2                  (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
632
#define CBPD3                  (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
633
#define CBPD4                  (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
634
#define CBPD5                  (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
635
#define CBPD6                  (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
636
#define CBPD7                  (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
637
#define CBPD8                  (0x0100)       /* Comp. B Disable Input Buffer of Port Register .8 */
638
#define CBPD9                  (0x0200)       /* Comp. B Disable Input Buffer of Port Register .9 */
639
#define CBPD10                 (0x0400)       /* Comp. B Disable Input Buffer of Port Register .10 */
640
#define CBPD11                 (0x0800)       /* Comp. B Disable Input Buffer of Port Register .11 */
641
#define CBPD12                 (0x1000)       /* Comp. B Disable Input Buffer of Port Register .12 */
642
#define CBPD13                 (0x2000)       /* Comp. B Disable Input Buffer of Port Register .13 */
643
#define CBPD14                 (0x4000)       /* Comp. B Disable Input Buffer of Port Register .14 */
644
#define CBPD15                 (0x8000)       /* Comp. B Disable Input Buffer of Port Register .15 */
645
 
646
#define CBPD0_L                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .0 */
647
#define CBPD1_L                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .1 */
648
#define CBPD2_L                (0x0004)       /* Comp. B Disable Input Buffer of Port Register .2 */
649
#define CBPD3_L                (0x0008)       /* Comp. B Disable Input Buffer of Port Register .3 */
650
#define CBPD4_L                (0x0010)       /* Comp. B Disable Input Buffer of Port Register .4 */
651
#define CBPD5_L                (0x0020)       /* Comp. B Disable Input Buffer of Port Register .5 */
652
#define CBPD6_L                (0x0040)       /* Comp. B Disable Input Buffer of Port Register .6 */
653
#define CBPD7_L                (0x0080)       /* Comp. B Disable Input Buffer of Port Register .7 */
654
 
655
#define CBPD8_H                (0x0001)       /* Comp. B Disable Input Buffer of Port Register .8 */
656
#define CBPD9_H                (0x0002)       /* Comp. B Disable Input Buffer of Port Register .9 */
657
#define CBPD10_H               (0x0004)       /* Comp. B Disable Input Buffer of Port Register .10 */
658
#define CBPD11_H               (0x0008)       /* Comp. B Disable Input Buffer of Port Register .11 */
659
#define CBPD12_H               (0x0010)       /* Comp. B Disable Input Buffer of Port Register .12 */
660
#define CBPD13_H               (0x0020)       /* Comp. B Disable Input Buffer of Port Register .13 */
661
#define CBPD14_H               (0x0040)       /* Comp. B Disable Input Buffer of Port Register .14 */
662
#define CBPD15_H               (0x0080)       /* Comp. B Disable Input Buffer of Port Register .15 */
663
 
664
/* CBINT Control Bits */
665
#define CBIFG                  (0x0001)       /* Comp. B Interrupt Flag */
666
#define CBIIFG                 (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
667
//#define RESERVED             (0x0004)  /* Comp. B */
668
//#define RESERVED             (0x0008)  /* Comp. B */
669
//#define RESERVED             (0x0010)  /* Comp. B */
670
//#define RESERVED             (0x0020)  /* Comp. B */
671
//#define RESERVED             (0x0040)  /* Comp. B */
672
//#define RESERVED             (0x0080)  /* Comp. B */
673
#define CBIE                   (0x0100)       /* Comp. B Interrupt Enable */
674
#define CBIIE                  (0x0200)       /* Comp. B Interrupt Enable Inverted Polarity */
675
//#define RESERVED             (0x0400)  /* Comp. B */
676
//#define RESERVED             (0x0800)  /* Comp. B */
677
//#define RESERVED             (0x1000)  /* Comp. B */
678
//#define RESERVED             (0x2000)  /* Comp. B */
679
//#define RESERVED             (0x4000)  /* Comp. B */
680
//#define RESERVED             (0x8000)  /* Comp. B */
681
 
682
/* CBINT Control Bits */
683
#define CBIFG_L                (0x0001)       /* Comp. B Interrupt Flag */
684
#define CBIIFG_L               (0x0002)       /* Comp. B Interrupt Flag Inverted Polarity */
685
//#define RESERVED             (0x0004)  /* Comp. B */
686
//#define RESERVED             (0x0008)  /* Comp. B */
687
//#define RESERVED             (0x0010)  /* Comp. B */
688
//#define RESERVED             (0x0020)  /* Comp. B */
689
//#define RESERVED             (0x0040)  /* Comp. B */
690
//#define RESERVED             (0x0080)  /* Comp. B */
691
//#define RESERVED             (0x0400)  /* Comp. B */
692
//#define RESERVED             (0x0800)  /* Comp. B */
693
//#define RESERVED             (0x1000)  /* Comp. B */
694
//#define RESERVED             (0x2000)  /* Comp. B */
695
//#define RESERVED             (0x4000)  /* Comp. B */
696
//#define RESERVED             (0x8000)  /* Comp. B */
697
 
698
/* CBINT Control Bits */
699
//#define RESERVED             (0x0004)  /* Comp. B */
700
//#define RESERVED             (0x0008)  /* Comp. B */
701
//#define RESERVED             (0x0010)  /* Comp. B */
702
//#define RESERVED             (0x0020)  /* Comp. B */
703
//#define RESERVED             (0x0040)  /* Comp. B */
704
//#define RESERVED             (0x0080)  /* Comp. B */
705
#define CBIE_H                 (0x0001)       /* Comp. B Interrupt Enable */
706
#define CBIIE_H                (0x0002)       /* Comp. B Interrupt Enable Inverted Polarity */
707
//#define RESERVED             (0x0400)  /* Comp. B */
708
//#define RESERVED             (0x0800)  /* Comp. B */
709
//#define RESERVED             (0x1000)  /* Comp. B */
710
//#define RESERVED             (0x2000)  /* Comp. B */
711
//#define RESERVED             (0x4000)  /* Comp. B */
712
//#define RESERVED             (0x8000)  /* Comp. B */
713
 
714
/* CBIV Definitions */
715
#define CBIV_NONE              (0x0000)       /* No Interrupt pending */
716
#define CBIV_CBIFG             (0x0002)       /* CBIFG */
717
#define CBIV_CBIIFG            (0x0004)       /* CBIIFG */
718
 
719
/*************************************************************
720
* CRC Module
721
*************************************************************/
722
#define __MSP430_HAS_CRC__                    /* Definition to show that Module is available */
723
#define __MSP430_BASEADDRESS_CRC__ 0x0150
724
 
725
SFR_16BIT(CRCDI);                             /* CRC Data In Register */
726
SFR_8BIT(CRCDI_L);                            /* CRC Data In Register */
727
SFR_8BIT(CRCDI_H);                            /* CRC Data In Register */
728
SFR_16BIT(CRCDIRB);                           /* CRC data in reverse byte Register */
729
SFR_8BIT(CRCDIRB_L);                          /* CRC data in reverse byte Register */
730
SFR_8BIT(CRCDIRB_H);                          /* CRC data in reverse byte Register */
731
SFR_16BIT(CRCINIRES);                         /* CRC Initialisation Register and Result Register */
732
SFR_8BIT(CRCINIRES_L);                        /* CRC Initialisation Register and Result Register */
733
SFR_8BIT(CRCINIRES_H);                        /* CRC Initialisation Register and Result Register */
734
SFR_16BIT(CRCRESR);                           /* CRC reverse result Register */
735
SFR_8BIT(CRCRESR_L);                          /* CRC reverse result Register */
736
SFR_8BIT(CRCRESR_H);                          /* CRC reverse result Register */
737
 
738
/************************************************************
739
* DMA_X
740
************************************************************/
741
#define __MSP430_HAS_DMAX_3__                 /* Definition to show that Module is available */
742
#define __MSP430_BASEADDRESS_DMAX_3__ 0x0500
743
 
744
SFR_16BIT(DMACTL0);                           /* DMA Module Control 0 */
745
SFR_8BIT(DMACTL0_L);                          /* DMA Module Control 0 */
746
SFR_8BIT(DMACTL0_H);                          /* DMA Module Control 0 */
747
SFR_16BIT(DMACTL1);                           /* DMA Module Control 1 */
748
SFR_8BIT(DMACTL1_L);                          /* DMA Module Control 1 */
749
SFR_8BIT(DMACTL1_H);                          /* DMA Module Control 1 */
750
SFR_16BIT(DMACTL2);                           /* DMA Module Control 2 */
751
SFR_8BIT(DMACTL2_L);                          /* DMA Module Control 2 */
752
SFR_8BIT(DMACTL2_H);                          /* DMA Module Control 2 */
753
SFR_16BIT(DMACTL3);                           /* DMA Module Control 3 */
754
SFR_8BIT(DMACTL3_L);                          /* DMA Module Control 3 */
755
SFR_8BIT(DMACTL3_H);                          /* DMA Module Control 3 */
756
SFR_16BIT(DMACTL4);                           /* DMA Module Control 4 */
757
SFR_8BIT(DMACTL4_L);                          /* DMA Module Control 4 */
758
SFR_8BIT(DMACTL4_H);                          /* DMA Module Control 4 */
759
SFR_16BIT(DMAIV);                             /* DMA Interrupt Vector Word */
760
SFR_8BIT(DMAIV_L);                            /* DMA Interrupt Vector Word */
761
SFR_8BIT(DMAIV_H);                            /* DMA Interrupt Vector Word */
762
 
763
SFR_16BIT(DMA0CTL);                           /* DMA Channel 0 Control */
764
SFR_8BIT(DMA0CTL_L);                          /* DMA Channel 0 Control */
765
SFR_8BIT(DMA0CTL_H);                          /* DMA Channel 0 Control */
766
SFR_20BIT(DMA0SA);                            /* DMA Channel 0 Source Address */
767
SFR_16BIT(DMA0SAL);                           /* DMA Channel 0 Source Address */
768
SFR_20BIT(DMA0DA);                            /* DMA Channel 0 Destination Address */
769
SFR_16BIT(DMA0DAL);                           /* DMA Channel 0 Destination Address */
770
SFR_16BIT(DMA0SZ);                            /* DMA Channel 0 Transfer Size */
771
 
772
SFR_16BIT(DMA1CTL);                           /* DMA Channel 1 Control */
773
SFR_8BIT(DMA1CTL_L);                          /* DMA Channel 1 Control */
774
SFR_8BIT(DMA1CTL_H);                          /* DMA Channel 1 Control */
775
SFR_20BIT(DMA1SA);                            /* DMA Channel 1 Source Address */
776
SFR_16BIT(DMA1SAL);                           /* DMA Channel 1 Source Address */
777
SFR_20BIT(DMA1DA);                            /* DMA Channel 1 Destination Address */
778
SFR_16BIT(DMA1DAL);                           /* DMA Channel 1 Destination Address */
779
SFR_16BIT(DMA1SZ);                            /* DMA Channel 1 Transfer Size */
780
 
781
SFR_16BIT(DMA2CTL);                           /* DMA Channel 2 Control */
782
SFR_8BIT(DMA2CTL_L);                          /* DMA Channel 2 Control */
783
SFR_8BIT(DMA2CTL_H);                          /* DMA Channel 2 Control */
784
SFR_20BIT(DMA2SA);                            /* DMA Channel 2 Source Address */
785
SFR_16BIT(DMA2SAL);                           /* DMA Channel 2 Source Address */
786
SFR_20BIT(DMA2DA);                            /* DMA Channel 2 Destination Address */
787
SFR_16BIT(DMA2DAL);                           /* DMA Channel 2 Destination Address */
788
SFR_16BIT(DMA2SZ);                            /* DMA Channel 2 Transfer Size */
789
 
790
/* DMACTL0 Control Bits */
791
#define DMA0TSEL0              (0x0001)       /* DMA channel 0 transfer select bit 0 */
792
#define DMA0TSEL1              (0x0002)       /* DMA channel 0 transfer select bit 1 */
793
#define DMA0TSEL2              (0x0004)       /* DMA channel 0 transfer select bit 2 */
794
#define DMA0TSEL3              (0x0008)       /* DMA channel 0 transfer select bit 3 */
795
#define DMA0TSEL4              (0x0010)       /* DMA channel 0 transfer select bit 4 */
796
#define DMA1TSEL0              (0x0100)       /* DMA channel 1 transfer select bit 0 */
797
#define DMA1TSEL1              (0x0200)       /* DMA channel 1 transfer select bit 1 */
798
#define DMA1TSEL2              (0x0400)       /* DMA channel 1 transfer select bit 2 */
799
#define DMA1TSEL3              (0x0800)       /* DMA channel 1 transfer select bit 3 */
800
#define DMA1TSEL4              (0x1000)       /* DMA channel 1 transfer select bit 4 */
801
 
802
/* DMACTL0 Control Bits */
803
#define DMA0TSEL0_L            (0x0001)       /* DMA channel 0 transfer select bit 0 */
804
#define DMA0TSEL1_L            (0x0002)       /* DMA channel 0 transfer select bit 1 */
805
#define DMA0TSEL2_L            (0x0004)       /* DMA channel 0 transfer select bit 2 */
806
#define DMA0TSEL3_L            (0x0008)       /* DMA channel 0 transfer select bit 3 */
807
#define DMA0TSEL4_L            (0x0010)       /* DMA channel 0 transfer select bit 4 */
808
 
809
/* DMACTL0 Control Bits */
810
#define DMA1TSEL0_H            (0x0001)       /* DMA channel 1 transfer select bit 0 */
811
#define DMA1TSEL1_H            (0x0002)       /* DMA channel 1 transfer select bit 1 */
812
#define DMA1TSEL2_H            (0x0004)       /* DMA channel 1 transfer select bit 2 */
813
#define DMA1TSEL3_H            (0x0008)       /* DMA channel 1 transfer select bit 3 */
814
#define DMA1TSEL4_H            (0x0010)       /* DMA channel 1 transfer select bit 4 */
815
 
816
/* DMACTL01 Control Bits */
817
#define DMA2TSEL0              (0x0001)       /* DMA channel 2 transfer select bit 0 */
818
#define DMA2TSEL1              (0x0002)       /* DMA channel 2 transfer select bit 1 */
819
#define DMA2TSEL2              (0x0004)       /* DMA channel 2 transfer select bit 2 */
820
#define DMA2TSEL3              (0x0008)       /* DMA channel 2 transfer select bit 3 */
821
#define DMA2TSEL4              (0x0010)       /* DMA channel 2 transfer select bit 4 */
822
 
823
/* DMACTL01 Control Bits */
824
#define DMA2TSEL0_L            (0x0001)       /* DMA channel 2 transfer select bit 0 */
825
#define DMA2TSEL1_L            (0x0002)       /* DMA channel 2 transfer select bit 1 */
826
#define DMA2TSEL2_L            (0x0004)       /* DMA channel 2 transfer select bit 2 */
827
#define DMA2TSEL3_L            (0x0008)       /* DMA channel 2 transfer select bit 3 */
828
#define DMA2TSEL4_L            (0x0010)       /* DMA channel 2 transfer select bit 4 */
829
 
830
/* DMACTL01 Control Bits */
831
 
832
/* DMACTL4 Control Bits */
833
#define ENNMI                  (0x0001)       /* Enable NMI interruption of DMA */
834
#define ROUNDROBIN             (0x0002)       /* Round-Robin DMA channel priorities */
835
#define DMARMWDIS              (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
836
 
837
/* DMACTL4 Control Bits */
838
#define ENNMI_L                (0x0001)       /* Enable NMI interruption of DMA */
839
#define ROUNDROBIN_L           (0x0002)       /* Round-Robin DMA channel priorities */
840
#define DMARMWDIS_L            (0x0004)       /* Inhibited DMA transfers during read-modify-write CPU operations */
841
 
842
/* DMACTL4 Control Bits */
843
 
844
/* DMAxCTL Control Bits */
845
#define DMAREQ                 (0x0001)       /* Initiate DMA transfer with DMATSEL */
846
#define DMAABORT               (0x0002)       /* DMA transfer aborted by NMI */
847
#define DMAIE                  (0x0004)       /* DMA interrupt enable */
848
#define DMAIFG                 (0x0008)       /* DMA interrupt flag */
849
#define DMAEN                  (0x0010)       /* DMA enable */
850
#define DMALEVEL               (0x0020)       /* DMA level sensitive trigger select */
851
#define DMASRCBYTE             (0x0040)       /* DMA source byte */
852
#define DMADSTBYTE             (0x0080)       /* DMA destination byte */
853
#define DMASRCINCR0            (0x0100)       /* DMA source increment bit 0 */
854
#define DMASRCINCR1            (0x0200)       /* DMA source increment bit 1 */
855
#define DMADSTINCR0            (0x0400)       /* DMA destination increment bit 0 */
856
#define DMADSTINCR1            (0x0800)       /* DMA destination increment bit 1 */
857
#define DMADT0                 (0x1000)       /* DMA transfer mode bit 0 */
858
#define DMADT1                 (0x2000)       /* DMA transfer mode bit 1 */
859
#define DMADT2                 (0x4000)       /* DMA transfer mode bit 2 */
860
 
861
/* DMAxCTL Control Bits */
862
#define DMAREQ_L               (0x0001)       /* Initiate DMA transfer with DMATSEL */
863
#define DMAABORT_L             (0x0002)       /* DMA transfer aborted by NMI */
864
#define DMAIE_L                (0x0004)       /* DMA interrupt enable */
865
#define DMAIFG_L               (0x0008)       /* DMA interrupt flag */
866
#define DMAEN_L                (0x0010)       /* DMA enable */
867
#define DMALEVEL_L             (0x0020)       /* DMA level sensitive trigger select */
868
#define DMASRCBYTE_L           (0x0040)       /* DMA source byte */
869
#define DMADSTBYTE_L           (0x0080)       /* DMA destination byte */
870
 
871
/* DMAxCTL Control Bits */
872
#define DMASRCINCR0_H          (0x0001)       /* DMA source increment bit 0 */
873
#define DMASRCINCR1_H          (0x0002)       /* DMA source increment bit 1 */
874
#define DMADSTINCR0_H          (0x0004)       /* DMA destination increment bit 0 */
875
#define DMADSTINCR1_H          (0x0008)       /* DMA destination increment bit 1 */
876
#define DMADT0_H               (0x0010)       /* DMA transfer mode bit 0 */
877
#define DMADT1_H               (0x0020)       /* DMA transfer mode bit 1 */
878
#define DMADT2_H               (0x0040)       /* DMA transfer mode bit 2 */
879
 
880
#define DMASWDW                (0*0x0040u)    /* DMA transfer: source word to destination word */
881
#define DMASBDW                (1*0x0040u)    /* DMA transfer: source byte to destination word */
882
#define DMASWDB                (2*0x0040u)    /* DMA transfer: source word to destination byte */
883
#define DMASBDB                (3*0x0040u)    /* DMA transfer: source byte to destination byte */
884
 
885
#define DMASRCINCR_0           (0*0x0100u)    /* DMA source increment 0: source address unchanged */
886
#define DMASRCINCR_1           (1*0x0100u)    /* DMA source increment 1: source address unchanged */
887
#define DMASRCINCR_2           (2*0x0100u)    /* DMA source increment 2: source address decremented */
888
#define DMASRCINCR_3           (3*0x0100u)    /* DMA source increment 3: source address incremented */
889
 
890
#define DMADSTINCR_0           (0*0x0400u)    /* DMA destination increment 0: destination address unchanged */
891
#define DMADSTINCR_1           (1*0x0400u)    /* DMA destination increment 1: destination address unchanged */
892
#define DMADSTINCR_2           (2*0x0400u)    /* DMA destination increment 2: destination address decremented */
893
#define DMADSTINCR_3           (3*0x0400u)    /* DMA destination increment 3: destination address incremented */
894
 
895
#define DMADT_0                (0*0x1000u)    /* DMA transfer mode 0: Single transfer */
896
#define DMADT_1                (1*0x1000u)    /* DMA transfer mode 1: Block transfer */
897
#define DMADT_2                (2*0x1000u)    /* DMA transfer mode 2: Burst-Block transfer */
898
#define DMADT_3                (3*0x1000u)    /* DMA transfer mode 3: Burst-Block transfer */
899
#define DMADT_4                (4*0x1000u)    /* DMA transfer mode 4: Repeated Single transfer */
900
#define DMADT_5                (5*0x1000u)    /* DMA transfer mode 5: Repeated Block transfer */
901
#define DMADT_6                (6*0x1000u)    /* DMA transfer mode 6: Repeated Burst-Block transfer */
902
#define DMADT_7                (7*0x1000u)    /* DMA transfer mode 7: Repeated Burst-Block transfer */
903
 
904
/* DMAIV Definitions */
905
#define DMAIV_NONE             (0x0000)       /* No Interrupt pending */
906
#define DMAIV_DMA0IFG          (0x0002)       /* DMA0IFG*/
907
#define DMAIV_DMA1IFG          (0x0004)       /* DMA1IFG*/
908
#define DMAIV_DMA2IFG          (0x0006)       /* DMA2IFG*/
909
 
910
#define DMA0TSEL_0             (0*0x0001u)    /* DMA channel 0 transfer select 0  */
911
#define DMA0TSEL_1             (1*0x0001u)    /* DMA channel 0 transfer select 1  */
912
#define DMA0TSEL_2             (2*0x0001u)    /* DMA channel 0 transfer select 2  */
913
#define DMA0TSEL_3             (3*0x0001u)    /* DMA channel 0 transfer select 3  */
914
#define DMA0TSEL_4             (4*0x0001u)    /* DMA channel 0 transfer select 4  */
915
#define DMA0TSEL_5             (5*0x0001u)    /* DMA channel 0 transfer select 5  */
916
#define DMA0TSEL_6             (6*0x0001u)    /* DMA channel 0 transfer select 6  */
917
#define DMA0TSEL_7             (7*0x0001u)    /* DMA channel 0 transfer select 7  */
918
#define DMA0TSEL_8             (8*0x0001u)    /* DMA channel 0 transfer select 8  */
919
#define DMA0TSEL_9             (9*0x0001u)    /* DMA channel 0 transfer select 9  */
920
#define DMA0TSEL_10            (10*0x0001u)   /* DMA channel 0 transfer select 10 */
921
#define DMA0TSEL_11            (11*0x0001u)   /* DMA channel 0 transfer select 11 */
922
#define DMA0TSEL_12            (12*0x0001u)   /* DMA channel 0 transfer select 12 */
923
#define DMA0TSEL_13            (13*0x0001u)   /* DMA channel 0 transfer select 13 */
924
#define DMA0TSEL_14            (14*0x0001u)   /* DMA channel 0 transfer select 14 */
925
#define DMA0TSEL_15            (15*0x0001u)   /* DMA channel 0 transfer select 15 */
926
#define DMA0TSEL_16            (16*0x0001u)   /* DMA channel 0 transfer select 16 */
927
#define DMA0TSEL_17            (17*0x0001u)   /* DMA channel 0 transfer select 17 */
928
#define DMA0TSEL_18            (18*0x0001u)   /* DMA channel 0 transfer select 18 */
929
#define DMA0TSEL_19            (19*0x0001u)   /* DMA channel 0 transfer select 19 */
930
#define DMA0TSEL_20            (20*0x0001u)   /* DMA channel 0 transfer select 20 */
931
#define DMA0TSEL_21            (21*0x0001u)   /* DMA channel 0 transfer select 21 */
932
#define DMA0TSEL_22            (22*0x0001u)   /* DMA channel 0 transfer select 22 */
933
#define DMA0TSEL_23            (23*0x0001u)   /* DMA channel 0 transfer select 23 */
934
#define DMA0TSEL_24            (24*0x0001u)   /* DMA channel 0 transfer select 24 */
935
#define DMA0TSEL_25            (25*0x0001u)   /* DMA channel 0 transfer select 25 */
936
#define DMA0TSEL_26            (26*0x0001u)   /* DMA channel 0 transfer select 26 */
937
#define DMA0TSEL_27            (27*0x0001u)   /* DMA channel 0 transfer select 27 */
938
#define DMA0TSEL_28            (28*0x0001u)   /* DMA channel 0 transfer select 28 */
939
#define DMA0TSEL_29            (29*0x0001u)   /* DMA channel 0 transfer select 29 */
940
#define DMA0TSEL_30            (30*0x0001u)   /* DMA channel 0 transfer select 30 */
941
#define DMA0TSEL_31            (31*0x0001u)   /* DMA channel 0 transfer select 31 */
942
 
943
#define DMA1TSEL_0             (0*0x0100u)    /* DMA channel 1 transfer select 0  */
944
#define DMA1TSEL_1             (1*0x0100u)    /* DMA channel 1 transfer select 1  */
945
#define DMA1TSEL_2             (2*0x0100u)    /* DMA channel 1 transfer select 2  */
946
#define DMA1TSEL_3             (3*0x0100u)    /* DMA channel 1 transfer select 3  */
947
#define DMA1TSEL_4             (4*0x0100u)    /* DMA channel 1 transfer select 4  */
948
#define DMA1TSEL_5             (5*0x0100u)    /* DMA channel 1 transfer select 5  */
949
#define DMA1TSEL_6             (6*0x0100u)    /* DMA channel 1 transfer select 6  */
950
#define DMA1TSEL_7             (7*0x0100u)    /* DMA channel 1 transfer select 7  */
951
#define DMA1TSEL_8             (8*0x0100u)    /* DMA channel 1 transfer select 8  */
952
#define DMA1TSEL_9             (9*0x0100u)    /* DMA channel 1 transfer select 9  */
953
#define DMA1TSEL_10            (10*0x0100u)   /* DMA channel 1 transfer select 10 */
954
#define DMA1TSEL_11            (11*0x0100u)   /* DMA channel 1 transfer select 11 */
955
#define DMA1TSEL_12            (12*0x0100u)   /* DMA channel 1 transfer select 12 */
956
#define DMA1TSEL_13            (13*0x0100u)   /* DMA channel 1 transfer select 13 */
957
#define DMA1TSEL_14            (14*0x0100u)   /* DMA channel 1 transfer select 14 */
958
#define DMA1TSEL_15            (15*0x0100u)   /* DMA channel 1 transfer select 15 */
959
#define DMA1TSEL_16            (16*0x0100u)   /* DMA channel 1 transfer select 16 */
960
#define DMA1TSEL_17            (17*0x0100u)   /* DMA channel 1 transfer select 17 */
961
#define DMA1TSEL_18            (18*0x0100u)   /* DMA channel 1 transfer select 18 */
962
#define DMA1TSEL_19            (19*0x0100u)   /* DMA channel 1 transfer select 19 */
963
#define DMA1TSEL_20            (20*0x0100u)   /* DMA channel 1 transfer select 20 */
964
#define DMA1TSEL_21            (21*0x0100u)   /* DMA channel 1 transfer select 21 */
965
#define DMA1TSEL_22            (22*0x0100u)   /* DMA channel 1 transfer select 22 */
966
#define DMA1TSEL_23            (23*0x0100u)   /* DMA channel 1 transfer select 23 */
967
#define DMA1TSEL_24            (24*0x0100u)   /* DMA channel 1 transfer select 24 */
968
#define DMA1TSEL_25            (25*0x0100u)   /* DMA channel 1 transfer select 25 */
969
#define DMA1TSEL_26            (26*0x0100u)   /* DMA channel 1 transfer select 26 */
970
#define DMA1TSEL_27            (27*0x0100u)   /* DMA channel 1 transfer select 27 */
971
#define DMA1TSEL_28            (28*0x0100u)   /* DMA channel 1 transfer select 28 */
972
#define DMA1TSEL_29            (29*0x0100u)   /* DMA channel 1 transfer select 29 */
973
#define DMA1TSEL_30            (30*0x0100u)   /* DMA channel 1 transfer select 30 */
974
#define DMA1TSEL_31            (31*0x0100u)   /* DMA channel 1 transfer select 31 */
975
 
976
#define DMA2TSEL_0             (0*0x0001u)    /* DMA channel 2 transfer select 0  */
977
#define DMA2TSEL_1             (1*0x0001u)    /* DMA channel 2 transfer select 1  */
978
#define DMA2TSEL_2             (2*0x0001u)    /* DMA channel 2 transfer select 2  */
979
#define DMA2TSEL_3             (3*0x0001u)    /* DMA channel 2 transfer select 3  */
980
#define DMA2TSEL_4             (4*0x0001u)    /* DMA channel 2 transfer select 4  */
981
#define DMA2TSEL_5             (5*0x0001u)    /* DMA channel 2 transfer select 5  */
982
#define DMA2TSEL_6             (6*0x0001u)    /* DMA channel 2 transfer select 6  */
983
#define DMA2TSEL_7             (7*0x0001u)    /* DMA channel 2 transfer select 7  */
984
#define DMA2TSEL_8             (8*0x0001u)    /* DMA channel 2 transfer select 8  */
985
#define DMA2TSEL_9             (9*0x0001u)    /* DMA channel 2 transfer select 9  */
986
#define DMA2TSEL_10            (10*0x0001u)   /* DMA channel 2 transfer select 10 */
987
#define DMA2TSEL_11            (11*0x0001u)   /* DMA channel 2 transfer select 11 */
988
#define DMA2TSEL_12            (12*0x0001u)   /* DMA channel 2 transfer select 12 */
989
#define DMA2TSEL_13            (13*0x0001u)   /* DMA channel 2 transfer select 13 */
990
#define DMA2TSEL_14            (14*0x0001u)   /* DMA channel 2 transfer select 14 */
991
#define DMA2TSEL_15            (15*0x0001u)   /* DMA channel 2 transfer select 15 */
992
#define DMA2TSEL_16            (16*0x0001u)   /* DMA channel 2 transfer select 16 */
993
#define DMA2TSEL_17            (17*0x0001u)   /* DMA channel 2 transfer select 17 */
994
#define DMA2TSEL_18            (18*0x0001u)   /* DMA channel 2 transfer select 18 */
995
#define DMA2TSEL_19            (19*0x0001u)   /* DMA channel 2 transfer select 19 */
996
#define DMA2TSEL_20            (20*0x0001u)   /* DMA channel 2 transfer select 20 */
997
#define DMA2TSEL_21            (21*0x0001u)   /* DMA channel 2 transfer select 21 */
998
#define DMA2TSEL_22            (22*0x0001u)   /* DMA channel 2 transfer select 22 */
999
#define DMA2TSEL_23            (23*0x0001u)   /* DMA channel 2 transfer select 23 */
1000
#define DMA2TSEL_24            (24*0x0001u)   /* DMA channel 2 transfer select 24 */
1001
#define DMA2TSEL_25            (25*0x0001u)   /* DMA channel 2 transfer select 25 */
1002
#define DMA2TSEL_26            (26*0x0001u)   /* DMA channel 2 transfer select 26 */
1003
#define DMA2TSEL_27            (27*0x0001u)   /* DMA channel 2 transfer select 27 */
1004
#define DMA2TSEL_28            (28*0x0001u)   /* DMA channel 2 transfer select 28 */
1005
#define DMA2TSEL_29            (29*0x0001u)   /* DMA channel 2 transfer select 29 */
1006
#define DMA2TSEL_30            (30*0x0001u)   /* DMA channel 2 transfer select 30 */
1007
#define DMA2TSEL_31            (31*0x0001u)   /* DMA channel 2 transfer select 31 */
1008
 
1009
#define DMA0TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 0 transfer select 0:  DMA_REQ (sw) */
1010
#define DMA0TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 0 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1011
#define DMA0TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 0 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1012
#define DMA0TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 0 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1013
#define DMA0TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 0 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1014
#define DMA0TSEL__TB0CCR0      (5*0x0001u)    /* DMA channel 0 transfer select 5:  TimerB (TB0CCR0.IFG) */
1015
#define DMA0TSEL__TB0CCR2      (6*0x0001u)    /* DMA channel 0 transfer select 6:  TimerB (TB0CCR2.IFG) */
1016
#define DMA0TSEL__RES7         (7*0x0001u)    /* DMA channel 0 transfer select 7:  Reserved */
1017
#define DMA0TSEL__RES8         (8*0x0001u)    /* DMA channel 0 transfer select 8:  Reserved */
1018
#define DMA0TSEL__RES9         (9*0x0001u)    /* DMA channel 0 transfer select 9:  Reserved */
1019
#define DMA0TSEL__RES10        (10*0x0001u)   /* DMA channel 0 transfer select 10: Reserved */
1020
#define DMA0TSEL__RES11        (11*0x0001u)   /* DMA channel 0 transfer select 11: Reserved */
1021
#define DMA0TSEL__RES12        (12*0x0001u)   /* DMA channel 0 transfer select 12: Reserved */
1022
#define DMA0TSEL__RES13        (13*0x0001u)   /* DMA channel 0 transfer select 13: Reserved */
1023
#define DMA0TSEL__RES14        (14*0x0001u)   /* DMA channel 0 transfer select 14: Reserved */
1024
#define DMA0TSEL__RES15        (15*0x0001u)   /* DMA channel 0 transfer select 15: Reserved */
1025
#define DMA0TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 0 transfer select 16: USCIA0 receive */
1026
#define DMA0TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 0 transfer select 17: USCIA0 transmit */
1027
#define DMA0TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 0 transfer select 18: USCIB0 receive */
1028
#define DMA0TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 0 transfer select 19: USCIB0 transmit */
1029
#define DMA0TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 0 transfer select 20: USCIA1 receive */
1030
#define DMA0TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 0 transfer select 21: USCIA1 transmit */
1031
#define DMA0TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 0 transfer select 22: USCIB1 receive */
1032
#define DMA0TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 0 transfer select 23: USCIB1 transmit */
1033
#define DMA0TSEL__ADC10IFG     (24*0x0001u)   /* DMA channel 0 transfer select 24: ADC10IFGx */
1034
#define DMA0TSEL__RES25        (25*0x0001u)   /* DMA channel 0 transfer select 25: Reserved */
1035
#define DMA0TSEL__RES26        (26*0x0001u)   /* DMA channel 0 transfer select 26: Reserved */
1036
#define DMA0TSEL__RES27        (27*0x0001u)   /* DMA channel 0 transfer select 27: Reserved */
1037
#define DMA0TSEL__RES28        (28*0x0001u)   /* DMA channel 0 transfer select 28: Reserved */
1038
#define DMA0TSEL__MPY          (29*0x0001u)   /* DMA channel 0 transfer select 29: Multiplier ready */
1039
#define DMA0TSEL__DMA2IFG      (30*0x0001u)   /* DMA channel 0 transfer select 30: previous DMA channel DMA2IFG */
1040
#define DMA0TSEL__DMAE0        (31*0x0001u)   /* DMA channel 0 transfer select 31: ext. Trigger (DMAE0) */
1041
 
1042
#define DMA1TSEL__DMA_REQ      (0*0x0100u)    /* DMA channel 1 transfer select 0:  DMA_REQ (sw) */
1043
#define DMA1TSEL__TA0CCR0      (1*0x0100u)    /* DMA channel 1 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1044
#define DMA1TSEL__TA0CCR2      (2*0x0100u)    /* DMA channel 1 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1045
#define DMA1TSEL__TA1CCR0      (3*0x0100u)    /* DMA channel 1 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1046
#define DMA1TSEL__TA1CCR2      (4*0x0100u)    /* DMA channel 1 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1047
#define DMA1TSEL__TB0CCR0      (5*0x0100u)    /* DMA channel 1 transfer select 5:  TimerB (TB0CCR0.IFG) */
1048
#define DMA1TSEL__TB0CCR2      (6*0x0100u)    /* DMA channel 1 transfer select 6:  TimerB (TB0CCR2.IFG) */
1049
#define DMA1TSEL__RES7         (7*0x0100u)    /* DMA channel 1 transfer select 7:  Reserved */
1050
#define DMA1TSEL__RES8         (8*0x0100u)    /* DMA channel 1 transfer select 8:  Reserved */
1051
#define DMA1TSEL__RES9         (9*0x0100u)    /* DMA channel 1 transfer select 9:  Reserved */
1052
#define DMA1TSEL__RES10        (10*0x0100u)   /* DMA channel 1 transfer select 10: Reserved */
1053
#define DMA1TSEL__RES11        (11*0x0100u)   /* DMA channel 1 transfer select 11: Reserved */
1054
#define DMA1TSEL__RES12        (12*0x0100u)   /* DMA channel 1 transfer select 12: Reserved */
1055
#define DMA1TSEL__RES13        (13*0x0100u)   /* DMA channel 1 transfer select 13: Reserved */
1056
#define DMA1TSEL__RES14        (14*0x0100u)   /* DMA channel 1 transfer select 14: Reserved */
1057
#define DMA1TSEL__RES15        (15*0x0100u)   /* DMA channel 1 transfer select 15: Reserved */
1058
#define DMA1TSEL__USCIA0RX     (16*0x0100u)   /* DMA channel 1 transfer select 16: USCIA0 receive */
1059
#define DMA1TSEL__USCIA0TX     (17*0x0100u)   /* DMA channel 1 transfer select 17: USCIA0 transmit */
1060
#define DMA1TSEL__USCIB0RX     (18*0x0100u)   /* DMA channel 1 transfer select 18: USCIB0 receive */
1061
#define DMA1TSEL__USCIB0TX     (19*0x0100u)   /* DMA channel 1 transfer select 19: USCIB0 transmit */
1062
#define DMA1TSEL__USCIA1RX     (20*0x0100u)   /* DMA channel 1 transfer select 20: USCIA1 receive */
1063
#define DMA1TSEL__USCIA1TX     (21*0x0100u)   /* DMA channel 1 transfer select 21: USCIA1 transmit */
1064
#define DMA1TSEL__USCIB1RX     (22*0x0100u)   /* DMA channel 1 transfer select 22: USCIB1 receive */
1065
#define DMA1TSEL__USCIB1TX     (23*0x0100u)   /* DMA channel 1 transfer select 23: USCIB1 transmit */
1066
#define DMA1TSEL__ADC10IFG     (24*0x0100u)   /* DMA channel 1 transfer select 24: ADC10IFGx */
1067
#define DMA1TSEL__RES25        (25*0x0100u)   /* DMA channel 1 transfer select 25: Reserved */
1068
#define DMA1TSEL__RES26        (26*0x0100u)   /* DMA channel 1 transfer select 26: Reserved */
1069
#define DMA1TSEL__RES27        (27*0x0100u)   /* DMA channel 1 transfer select 27: Reserved */
1070
#define DMA1TSEL__RES28        (28*0x0100u)   /* DMA channel 1 transfer select 28: Reserved */
1071
#define DMA1TSEL__MPY          (29*0x0100u)   /* DMA channel 1 transfer select 29: Multiplier ready */
1072
#define DMA1TSEL__DMA0IFG      (30*0x0100u)   /* DMA channel 1 transfer select 30: previous DMA channel DMA0IFG */
1073
#define DMA1TSEL__DMAE0        (31*0x0100u)   /* DMA channel 1 transfer select 31: ext. Trigger (DMAE0) */
1074
 
1075
#define DMA2TSEL__DMA_REQ      (0*0x0001u)    /* DMA channel 2 transfer select 0:  DMA_REQ (sw) */
1076
#define DMA2TSEL__TA0CCR0      (1*0x0001u)    /* DMA channel 2 transfer select 1:  Timer0_A (TA0CCR0.IFG) */
1077
#define DMA2TSEL__TA0CCR2      (2*0x0001u)    /* DMA channel 2 transfer select 2:  Timer0_A (TA0CCR2.IFG) */
1078
#define DMA2TSEL__TA1CCR0      (3*0x0001u)    /* DMA channel 2 transfer select 3:  Timer1_A (TA1CCR0.IFG) */
1079
#define DMA2TSEL__TA1CCR2      (4*0x0001u)    /* DMA channel 2 transfer select 4:  Timer1_A (TA1CCR2.IFG) */
1080
#define DMA2TSEL__TB0CCR0      (5*0x0001u)    /* DMA channel 2 transfer select 5:  TimerB (TB0CCR0.IFG) */
1081
#define DMA2TSEL__TB0CCR2      (6*0x0001u)    /* DMA channel 2 transfer select 6:  TimerB (TB0CCR2.IFG) */
1082
#define DMA2TSEL__RES7         (7*0x0001u)    /* DMA channel 2 transfer select 7:  Reserved */
1083
#define DMA2TSEL__RES8         (8*0x0001u)    /* DMA channel 2 transfer select 8:  Reserved */
1084
#define DMA2TSEL__RES9         (9*0x0001u)    /* DMA channel 2 transfer select 9:  Reserved */
1085
#define DMA2TSEL__RES10        (10*0x0001u)   /* DMA channel 2 transfer select 10: Reserved */
1086
#define DMA2TSEL__RES11        (11*0x0001u)   /* DMA channel 2 transfer select 11: Reserved */
1087
#define DMA2TSEL__RES12        (12*0x0001u)   /* DMA channel 2 transfer select 12: Reserved */
1088
#define DMA2TSEL__RES13        (13*0x0001u)   /* DMA channel 2 transfer select 13: Reserved */
1089
#define DMA2TSEL__RES14        (14*0x0001u)   /* DMA channel 2 transfer select 14: Reserved */
1090
#define DMA2TSEL__RES15        (15*0x0001u)   /* DMA channel 2 transfer select 15: Reserved */
1091
#define DMA2TSEL__USCIA0RX     (16*0x0001u)   /* DMA channel 2 transfer select 16: USCIA0 receive */
1092
#define DMA2TSEL__USCIA0TX     (17*0x0001u)   /* DMA channel 2 transfer select 17: USCIA0 transmit */
1093
#define DMA2TSEL__USCIB0RX     (18*0x0001u)   /* DMA channel 2 transfer select 18: USCIB0 receive */
1094
#define DMA2TSEL__USCIB0TX     (19*0x0001u)   /* DMA channel 2 transfer select 19: USCIB0 transmit */
1095
#define DMA2TSEL__USCIA1RX     (20*0x0001u)   /* DMA channel 2 transfer select 20: USCIA1 receive */
1096
#define DMA2TSEL__USCIA1TX     (21*0x0001u)   /* DMA channel 2 transfer select 21: USCIA1 transmit */
1097
#define DMA2TSEL__USCIB1RX     (22*0x0001u)   /* DMA channel 2 transfer select 22: USCIB1 receive */
1098
#define DMA2TSEL__USCIB1TX     (23*0x0001u)   /* DMA channel 2 transfer select 23: USCIB1 transmit */
1099
#define DMA2TSEL__ADC10IFG     (24*0x0001u)   /* DMA channel 2 transfer select 24: ADC10IFGx */
1100
#define DMA2TSEL__RES25        (25*0x0001u)   /* DMA channel 2 transfer select 25: Reserved */
1101
#define DMA2TSEL__RES26        (26*0x0001u)   /* DMA channel 2 transfer select 26: Reserved */
1102
#define DMA2TSEL__RES27        (27*0x0001u)   /* DMA channel 2 transfer select 27: Reserved */
1103
#define DMA2TSEL__RES28        (28*0x0001u)   /* DMA channel 2 transfer select 28: Reserved */
1104
#define DMA2TSEL__MPY          (29*0x0001u)   /* DMA channel 2 transfer select 29: Multiplier ready */
1105
#define DMA2TSEL__DMA1IFG      (30*0x0001u)   /* DMA channel 2 transfer select 30: previous DMA channel DMA1IFG */
1106
#define DMA2TSEL__DMAE0        (31*0x0001u)   /* DMA channel 2 transfer select 31: ext. Trigger (DMAE0) */
1107
 
1108
/*************************************************************
1109
* Flash Memory
1110
*************************************************************/
1111
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
1112
#define __MSP430_BASEADDRESS_FLASH__ 0x0140
1113
 
1114
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
1115
SFR_8BIT(FCTL1_L);                            /* FLASH Control 1 */
1116
SFR_8BIT(FCTL1_H);                            /* FLASH Control 1 */
1117
//sfrbw    FCTL2               (0x0142)  /* FLASH Control 2 */
1118
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
1119
SFR_8BIT(FCTL3_L);                            /* FLASH Control 3 */
1120
SFR_8BIT(FCTL3_H);                            /* FLASH Control 3 */
1121
SFR_16BIT(FCTL4);                             /* FLASH Control 4 */
1122
SFR_8BIT(FCTL4_L);                            /* FLASH Control 4 */
1123
SFR_8BIT(FCTL4_H);                            /* FLASH Control 4 */
1124
 
1125
#define FRPW                   (0x9600)       /* Flash password returned by read */
1126
#define FWPW                   (0xA500)       /* Flash password for write */
1127
#define FXPW                   (0x3300)       /* for use with XOR instruction */
1128
#define FRKEY                  (0x9600)       /* (legacy definition) Flash key returned by read */
1129
#define FWKEY                  (0xA500)       /* (legacy definition) Flash key for write */
1130
#define FXKEY                  (0x3300)       /* (legacy definition) for use with XOR instruction */
1131
 
1132
/* FCTL1 Control Bits */
1133
//#define RESERVED            (0x0001)  /* Reserved */
1134
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
1135
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
1136
//#define RESERVED            (0x0008)  /* Reserved */
1137
//#define RESERVED            (0x0010)  /* Reserved */
1138
#define SWRT                   (0x0020)       /* Smart Write enable */
1139
#define WRT                    (0x0040)       /* Enable bit for Flash write */
1140
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
1141
 
1142
/* FCTL1 Control Bits */
1143
//#define RESERVED            (0x0001)  /* Reserved */
1144
#define ERASE_L                (0x0002)       /* Enable bit for Flash segment erase */
1145
#define MERAS_L                (0x0004)       /* Enable bit for Flash mass erase */
1146
//#define RESERVED            (0x0008)  /* Reserved */
1147
//#define RESERVED            (0x0010)  /* Reserved */
1148
#define SWRT_L                 (0x0020)       /* Smart Write enable */
1149
#define WRT_L                  (0x0040)       /* Enable bit for Flash write */
1150
#define BLKWRT_L               (0x0080)       /* Enable bit for Flash segment write */
1151
 
1152
/* FCTL1 Control Bits */
1153
//#define RESERVED            (0x0001)  /* Reserved */
1154
//#define RESERVED            (0x0008)  /* Reserved */
1155
//#define RESERVED            (0x0010)  /* Reserved */
1156
 
1157
/* FCTL3 Control Bits */
1158
#define BUSY                   (0x0001)       /* Flash busy: 1 */
1159
#define KEYV                   (0x0002)       /* Flash Key violation flag */
1160
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
1161
#define WAIT                   (0x0008)       /* Wait flag for segment write */
1162
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
1163
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
1164
#define LOCKA                  (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
1165
//#define RESERVED            (0x0080)  /* Reserved */
1166
 
1167
/* FCTL3 Control Bits */
1168
#define BUSY_L                 (0x0001)       /* Flash busy: 1 */
1169
#define KEYV_L                 (0x0002)       /* Flash Key violation flag */
1170
#define ACCVIFG_L              (0x0004)       /* Flash Access violation flag */
1171
#define WAIT_L                 (0x0008)       /* Wait flag for segment write */
1172
#define LOCK_L                 (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
1173
#define EMEX_L                 (0x0020)       /* Flash Emergency Exit */
1174
#define LOCKA_L                (0x0040)       /* Segment A Lock bit: read = 1 - Segment is locked (read only) */
1175
//#define RESERVED            (0x0080)  /* Reserved */
1176
 
1177
/* FCTL3 Control Bits */
1178
//#define RESERVED            (0x0080)  /* Reserved */
1179
 
1180
/* FCTL4 Control Bits */
1181
#define VPE                    (0x0001)       /* Voltage Changed during Program Error Flag */
1182
#define MGR0                   (0x0010)       /* Marginal read 0 mode. */
1183
#define MGR1                   (0x0020)       /* Marginal read 1 mode. */
1184
#define LOCKINFO               (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1185
 
1186
/* FCTL4 Control Bits */
1187
#define VPE_L                  (0x0001)       /* Voltage Changed during Program Error Flag */
1188
#define MGR0_L                 (0x0010)       /* Marginal read 0 mode. */
1189
#define MGR1_L                 (0x0020)       /* Marginal read 1 mode. */
1190
#define LOCKINFO_L             (0x0080)       /* Lock INFO Memory bit: read = 1 - Segment is locked (read only) */
1191
 
1192
/* FCTL4 Control Bits */
1193
 
1194
/************************************************************
1195
* HARDWARE MULTIPLIER 32Bit
1196
************************************************************/
1197
#define __MSP430_HAS_MPY32__                  /* Definition to show that Module is available */
1198
#define __MSP430_BASEADDRESS_MPY32__ 0x04C0
1199
 
1200
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
1201
SFR_8BIT(MPY_L);                              /* Multiply Unsigned/Operand 1 */
1202
SFR_8BIT(MPY_H);                              /* Multiply Unsigned/Operand 1 */
1203
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
1204
SFR_8BIT(MPYS_L);                             /* Multiply Signed/Operand 1 */
1205
SFR_8BIT(MPYS_H);                             /* Multiply Signed/Operand 1 */
1206
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
1207
SFR_8BIT(MAC_L);                              /* Multiply Unsigned and Accumulate/Operand 1 */
1208
SFR_8BIT(MAC_H);                              /* Multiply Unsigned and Accumulate/Operand 1 */
1209
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
1210
SFR_8BIT(MACS_L);                             /* Multiply Signed and Accumulate/Operand 1 */
1211
SFR_8BIT(MACS_H);                             /* Multiply Signed and Accumulate/Operand 1 */
1212
SFR_16BIT(OP2);                               /* Operand 2 */
1213
SFR_8BIT(OP2_L);                              /* Operand 2 */
1214
SFR_8BIT(OP2_H);                              /* Operand 2 */
1215
SFR_16BIT(RESLO);                             /* Result Low Word */
1216
SFR_8BIT(RESLO_L);                            /* Result Low Word */
1217
SFR_8BIT(RESLO_H);                            /* Result Low Word */
1218
SFR_16BIT(RESHI);                             /* Result High Word */
1219
SFR_8BIT(RESHI_L);                            /* Result High Word */
1220
SFR_8BIT(RESHI_H);                            /* Result High Word */
1221
SFR_16BIT(SUMEXT);                            /* Sum Extend */
1222
SFR_8BIT(SUMEXT_L);                           /* Sum Extend */
1223
SFR_8BIT(SUMEXT_H);                           /* Sum Extend */
1224
 
1225
SFR_16BIT(MPY32L);                            /* 32-bit operand 1 - multiply - low word */
1226
SFR_8BIT(MPY32L_L);                           /* 32-bit operand 1 - multiply - low word */
1227
SFR_8BIT(MPY32L_H);                           /* 32-bit operand 1 - multiply - low word */
1228
SFR_16BIT(MPY32H);                            /* 32-bit operand 1 - multiply - high word */
1229
SFR_8BIT(MPY32H_L);                           /* 32-bit operand 1 - multiply - high word */
1230
SFR_8BIT(MPY32H_H);                           /* 32-bit operand 1 - multiply - high word */
1231
SFR_16BIT(MPYS32L);                           /* 32-bit operand 1 - signed multiply - low word */
1232
SFR_8BIT(MPYS32L_L);                          /* 32-bit operand 1 - signed multiply - low word */
1233
SFR_8BIT(MPYS32L_H);                          /* 32-bit operand 1 - signed multiply - low word */
1234
SFR_16BIT(MPYS32H);                           /* 32-bit operand 1 - signed multiply - high word */
1235
SFR_8BIT(MPYS32H_L);                          /* 32-bit operand 1 - signed multiply - high word */
1236
SFR_8BIT(MPYS32H_H);                          /* 32-bit operand 1 - signed multiply - high word */
1237
SFR_16BIT(MAC32L);                            /* 32-bit operand 1 - multiply accumulate - low word */
1238
SFR_8BIT(MAC32L_L);                           /* 32-bit operand 1 - multiply accumulate - low word */
1239
SFR_8BIT(MAC32L_H);                           /* 32-bit operand 1 - multiply accumulate - low word */
1240
SFR_16BIT(MAC32H);                            /* 32-bit operand 1 - multiply accumulate - high word */
1241
SFR_8BIT(MAC32H_L);                           /* 32-bit operand 1 - multiply accumulate - high word */
1242
SFR_8BIT(MAC32H_H);                           /* 32-bit operand 1 - multiply accumulate - high word */
1243
SFR_16BIT(MACS32L);                           /* 32-bit operand 1 - signed multiply accumulate - low word */
1244
SFR_8BIT(MACS32L_L);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1245
SFR_8BIT(MACS32L_H);                          /* 32-bit operand 1 - signed multiply accumulate - low word */
1246
SFR_16BIT(MACS32H);                           /* 32-bit operand 1 - signed multiply accumulate - high word */
1247
SFR_8BIT(MACS32H_L);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1248
SFR_8BIT(MACS32H_H);                          /* 32-bit operand 1 - signed multiply accumulate - high word */
1249
SFR_16BIT(OP2L);                              /* 32-bit operand 2 - low word */
1250
SFR_8BIT(OP2L_L);                             /* 32-bit operand 2 - low word */
1251
SFR_8BIT(OP2L_H);                             /* 32-bit operand 2 - low word */
1252
SFR_16BIT(OP2H);                              /* 32-bit operand 2 - high word */
1253
SFR_8BIT(OP2H_L);                             /* 32-bit operand 2 - high word */
1254
SFR_8BIT(OP2H_H);                             /* 32-bit operand 2 - high word */
1255
SFR_16BIT(RES0);                              /* 32x32-bit result 0 - least significant word */
1256
SFR_8BIT(RES0_L);                             /* 32x32-bit result 0 - least significant word */
1257
SFR_8BIT(RES0_H);                             /* 32x32-bit result 0 - least significant word */
1258
SFR_16BIT(RES1);                              /* 32x32-bit result 1 */
1259
SFR_8BIT(RES1_L);                             /* 32x32-bit result 1 */
1260
SFR_8BIT(RES1_H);                             /* 32x32-bit result 1 */
1261
SFR_16BIT(RES2);                              /* 32x32-bit result 2 */
1262
SFR_8BIT(RES2_L);                             /* 32x32-bit result 2 */
1263
SFR_8BIT(RES2_H);                             /* 32x32-bit result 2 */
1264
SFR_16BIT(RES3);                              /* 32x32-bit result 3 - most significant word */
1265
SFR_8BIT(RES3_L);                             /* 32x32-bit result 3 - most significant word */
1266
SFR_8BIT(RES3_H);                             /* 32x32-bit result 3 - most significant word */
1267
SFR_16BIT(MPY32CTL0);                         /* MPY32 Control Register 0 */
1268
SFR_8BIT(MPY32CTL0_L);                        /* MPY32 Control Register 0 */
1269
SFR_8BIT(MPY32CTL0_H);                        /* MPY32 Control Register 0 */
1270
 
1271
#define MPY_B                  MPY_L          /* Multiply Unsigned/Operand 1 (Byte Access) */
1272
#define MPYS_B                 MPYS_L         /* Multiply Signed/Operand 1 (Byte Access) */
1273
#define MAC_B                  MAC_L          /* Multiply Unsigned and Accumulate/Operand 1 (Byte Access) */
1274
#define MACS_B                 MACS_L         /* Multiply Signed and Accumulate/Operand 1 (Byte Access) */
1275
#define OP2_B                  OP2_L          /* Operand 2 (Byte Access) */
1276
#define MPY32L_B               MPY32L_L       /* 32-bit operand 1 - multiply - low word (Byte Access) */
1277
#define MPY32H_B               MPY32H_L       /* 32-bit operand 1 - multiply - high word (Byte Access) */
1278
#define MPYS32L_B              MPYS32L_L      /* 32-bit operand 1 - signed multiply - low word (Byte Access) */
1279
#define MPYS32H_B              MPYS32H_L      /* 32-bit operand 1 - signed multiply - high word (Byte Access) */
1280
#define MAC32L_B               MAC32L_L       /* 32-bit operand 1 - multiply accumulate - low word (Byte Access) */
1281
#define MAC32H_B               MAC32H_L       /* 32-bit operand 1 - multiply accumulate - high word (Byte Access) */
1282
#define MACS32L_B              MACS32L_L      /* 32-bit operand 1 - signed multiply accumulate - low word (Byte Access) */
1283
#define MACS32H_B              MACS32H_L      /* 32-bit operand 1 - signed multiply accumulate - high word (Byte Access) */
1284
#define OP2L_B                 OP2L_L         /* 32-bit operand 2 - low word (Byte Access) */
1285
#define OP2H_B                 OP2H_L         /* 32-bit operand 2 - high word (Byte Access) */
1286
 
1287
/* MPY32CTL0 Control Bits */
1288
#define MPYC                   (0x0001)       /* Carry of the multiplier */
1289
//#define RESERVED            (0x0002)  /* Reserved */
1290
#define MPYFRAC                (0x0004)       /* Fractional mode */
1291
#define MPYSAT                 (0x0008)       /* Saturation mode */
1292
#define MPYM0                  (0x0010)       /* Multiplier mode Bit:0 */
1293
#define MPYM1                  (0x0020)       /* Multiplier mode Bit:1 */
1294
#define OP1_32                 (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1295
#define OP2_32                 (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1296
#define MPYDLYWRTEN            (0x0100)       /* Delayed write enable */
1297
#define MPYDLY32               (0x0200)       /* Delayed write mode */
1298
 
1299
/* MPY32CTL0 Control Bits */
1300
#define MPYC_L                 (0x0001)       /* Carry of the multiplier */
1301
//#define RESERVED            (0x0002)  /* Reserved */
1302
#define MPYFRAC_L              (0x0004)       /* Fractional mode */
1303
#define MPYSAT_L               (0x0008)       /* Saturation mode */
1304
#define MPYM0_L                (0x0010)       /* Multiplier mode Bit:0 */
1305
#define MPYM1_L                (0x0020)       /* Multiplier mode Bit:1 */
1306
#define OP1_32_L               (0x0040)       /* Bit-width of operand 1 0:16Bit / 1:32Bit */
1307
#define OP2_32_L               (0x0080)       /* Bit-width of operand 2 0:16Bit / 1:32Bit */
1308
 
1309
/* MPY32CTL0 Control Bits */
1310
//#define RESERVED            (0x0002)  /* Reserved */
1311
#define MPYDLYWRTEN_H          (0x0001)       /* Delayed write enable */
1312
#define MPYDLY32_H             (0x0002)       /* Delayed write mode */
1313
 
1314
#define MPYM_0                 (0x0000)       /* Multiplier mode: MPY */
1315
#define MPYM_1                 (0x0010)       /* Multiplier mode: MPYS */
1316
#define MPYM_2                 (0x0020)       /* Multiplier mode: MAC */
1317
#define MPYM_3                 (0x0030)       /* Multiplier mode: MACS */
1318
#define MPYM__MPY              (0x0000)       /* Multiplier mode: MPY */
1319
#define MPYM__MPYS             (0x0010)       /* Multiplier mode: MPYS */
1320
#define MPYM__MAC              (0x0020)       /* Multiplier mode: MAC */
1321
#define MPYM__MACS             (0x0030)       /* Multiplier mode: MACS */
1322
 
1323
/************************************************************
1324
* DIGITAL I/O Port1/2 Pull up / Pull down Resistors
1325
************************************************************/
1326
#define __MSP430_HAS_PORT1_R__                /* Definition to show that Module is available */
1327
#define __MSP430_BASEADDRESS_PORT1_R__ 0x0200
1328
#define __MSP430_HAS_PORT2_R__                /* Definition to show that Module is available */
1329
#define __MSP430_BASEADDRESS_PORT2_R__ 0x0200
1330
#define __MSP430_HAS_PORTA_R__                /* Definition to show that Module is available */
1331
#define __MSP430_BASEADDRESS_PORTA_R__ 0x0200
1332
 
1333
SFR_16BIT(PAIN);                              /* Port A Input */
1334
SFR_8BIT(PAIN_L);                             /* Port A Input */
1335
SFR_8BIT(PAIN_H);                             /* Port A Input */
1336
SFR_16BIT(PAOUT);                             /* Port A Output */
1337
SFR_8BIT(PAOUT_L);                            /* Port A Output */
1338
SFR_8BIT(PAOUT_H);                            /* Port A Output */
1339
SFR_16BIT(PADIR);                             /* Port A Direction */
1340
SFR_8BIT(PADIR_L);                            /* Port A Direction */
1341
SFR_8BIT(PADIR_H);                            /* Port A Direction */
1342
SFR_16BIT(PAREN);                             /* Port A Resistor Enable */
1343
SFR_8BIT(PAREN_L);                            /* Port A Resistor Enable */
1344
SFR_8BIT(PAREN_H);                            /* Port A Resistor Enable */
1345
SFR_16BIT(PADS);                              /* Port A Resistor Drive Strenght */
1346
SFR_8BIT(PADS_L);                             /* Port A Resistor Drive Strenght */
1347
SFR_8BIT(PADS_H);                             /* Port A Resistor Drive Strenght */
1348
SFR_16BIT(PASEL);                             /* Port A Selection */
1349
SFR_8BIT(PASEL_L);                            /* Port A Selection */
1350
SFR_8BIT(PASEL_H);                            /* Port A Selection */
1351
SFR_16BIT(PAIES);                             /* Port A Interrupt Edge Select */
1352
SFR_8BIT(PAIES_L);                            /* Port A Interrupt Edge Select */
1353
SFR_8BIT(PAIES_H);                            /* Port A Interrupt Edge Select */
1354
SFR_16BIT(PAIE);                              /* Port A Interrupt Enable */
1355
SFR_8BIT(PAIE_L);                             /* Port A Interrupt Enable */
1356
SFR_8BIT(PAIE_H);                             /* Port A Interrupt Enable */
1357
SFR_16BIT(PAIFG);                             /* Port A Interrupt Flag */
1358
SFR_8BIT(PAIFG_L);                            /* Port A Interrupt Flag */
1359
SFR_8BIT(PAIFG_H);                            /* Port A Interrupt Flag */
1360
 
1361
 
1362
SFR_16BIT(P1IV);                              /* Port 1 Interrupt Vector Word */
1363
SFR_16BIT(P2IV);                              /* Port 2 Interrupt Vector Word */
1364
#define P1IN                   (PAIN_L)       /* Port 1 Input */
1365
#define P1OUT                  (PAOUT_L)      /* Port 1 Output */
1366
#define P1DIR                  (PADIR_L)      /* Port 1 Direction */
1367
#define P1REN                  (PAREN_L)      /* Port 1 Resistor Enable */
1368
#define P1DS                   (PADS_L)       /* Port 1 Resistor Drive Strenght */
1369
#define P1SEL                  (PASEL_L)      /* Port 1 Selection */
1370
#define P1IES                  (PAIES_L)      /* Port 1 Interrupt Edge Select */
1371
#define P1IE                   (PAIE_L)       /* Port 1 Interrupt Enable */
1372
#define P1IFG                  (PAIFG_L)      /* Port 1 Interrupt Flag */
1373
 
1374
//Definitions for P1IV
1375
#define P1IV_NONE              (0x0000)       /* No Interrupt pending */
1376
#define P1IV_P1IFG0            (0x0002)       /* P1IV P1IFG.0 */
1377
#define P1IV_P1IFG1            (0x0004)       /* P1IV P1IFG.1 */
1378
#define P1IV_P1IFG2            (0x0006)       /* P1IV P1IFG.2 */
1379
#define P1IV_P1IFG3            (0x0008)       /* P1IV P1IFG.3 */
1380
#define P1IV_P1IFG4            (0x000A)       /* P1IV P1IFG.4 */
1381
#define P1IV_P1IFG5            (0x000C)       /* P1IV P1IFG.5 */
1382
#define P1IV_P1IFG6            (0x000E)       /* P1IV P1IFG.6 */
1383
#define P1IV_P1IFG7            (0x0010)       /* P1IV P1IFG.7 */
1384
 
1385
#define P2IN                   (PAIN_H)       /* Port 2 Input */
1386
#define P2OUT                  (PAOUT_H)      /* Port 2 Output */
1387
#define P2DIR                  (PADIR_H)      /* Port 2 Direction */
1388
#define P2REN                  (PAREN_H)      /* Port 2 Resistor Enable */
1389
#define P2DS                   (PADS_H)       /* Port 2 Resistor Drive Strenght */
1390
#define P2SEL                  (PASEL_H)      /* Port 2 Selection */
1391
#define P2IES                  (PAIES_H)      /* Port 2 Interrupt Edge Select */
1392
#define P2IE                   (PAIE_H)       /* Port 2 Interrupt Enable */
1393
#define P2IFG                  (PAIFG_H)      /* Port 2 Interrupt Flag */
1394
 
1395
//Definitions for P2IV
1396
#define P2IV_NONE              (0x0000)       /* No Interrupt pending */
1397
#define P2IV_P2IFG0            (0x0002)       /* P2IV P2IFG.0 */
1398
#define P2IV_P2IFG1            (0x0004)       /* P2IV P2IFG.1 */
1399
#define P2IV_P2IFG2            (0x0006)       /* P2IV P2IFG.2 */
1400
#define P2IV_P2IFG3            (0x0008)       /* P2IV P2IFG.3 */
1401
#define P2IV_P2IFG4            (0x000A)       /* P2IV P2IFG.4 */
1402
#define P2IV_P2IFG5            (0x000C)       /* P2IV P2IFG.5 */
1403
#define P2IV_P2IFG6            (0x000E)       /* P2IV P2IFG.6 */
1404
#define P2IV_P2IFG7            (0x0010)       /* P2IV P2IFG.7 */
1405
 
1406
 
1407
/************************************************************
1408
* DIGITAL I/O Port3 Pull up / Pull down Resistors
1409
************************************************************/
1410
#define __MSP430_HAS_PORT3_R__                /* Definition to show that Module is available */
1411
#define __MSP430_BASEADDRESS_PORT3_R__ 0x0220
1412
#define __MSP430_HAS_PORTB_R__                /* Definition to show that Module is available */
1413
#define __MSP430_BASEADDRESS_PORTB_R__ 0x0220
1414
 
1415
SFR_16BIT(PBIN);                              /* Port B Input */
1416
SFR_8BIT(PBIN_L);                             /* Port B Input */
1417
SFR_8BIT(PBIN_H);                             /* Port B Input */
1418
SFR_16BIT(PBOUT);                             /* Port B Output */
1419
SFR_8BIT(PBOUT_L);                            /* Port B Output */
1420
SFR_8BIT(PBOUT_H);                            /* Port B Output */
1421
SFR_16BIT(PBDIR);                             /* Port B Direction */
1422
SFR_8BIT(PBDIR_L);                            /* Port B Direction */
1423
SFR_8BIT(PBDIR_H);                            /* Port B Direction */
1424
SFR_16BIT(PBREN);                             /* Port B Resistor Enable */
1425
SFR_8BIT(PBREN_L);                            /* Port B Resistor Enable */
1426
SFR_8BIT(PBREN_H);                            /* Port B Resistor Enable */
1427
SFR_16BIT(PBDS);                              /* Port B Resistor Drive Strenght */
1428
SFR_8BIT(PBDS_L);                             /* Port B Resistor Drive Strenght */
1429
SFR_8BIT(PBDS_H);                             /* Port B Resistor Drive Strenght */
1430
SFR_16BIT(PBSEL);                             /* Port B Selection */
1431
SFR_8BIT(PBSEL_L);                            /* Port B Selection */
1432
SFR_8BIT(PBSEL_H);                            /* Port B Selection */
1433
 
1434
 
1435
#define P3IN                   (PBIN_L)       /* Port 3 Input */
1436
#define P3OUT                  (PBOUT_L)      /* Port 3 Output */
1437
#define P3DIR                  (PBDIR_L)      /* Port 3 Direction */
1438
#define P3REN                  (PBREN_L)      /* Port 3 Resistor Enable */
1439
#define P3DS                   (PBDS_L)       /* Port 3 Resistor Drive Strenght */
1440
#define P3SEL                  (PBSEL_L)      /* Port 3 Selection */
1441
 
1442
 
1443
/************************************************************
1444
* DIGITAL I/O PortJ Pull up / Pull down Resistors
1445
************************************************************/
1446
#define __MSP430_HAS_PORTJ_R__                /* Definition to show that Module is available */
1447
#define __MSP430_BASEADDRESS_PORTJ_R__ 0x0320
1448
 
1449
SFR_16BIT(PJIN);                              /* Port J Input */
1450
SFR_8BIT(PJIN_L);                             /* Port J Input */
1451
SFR_8BIT(PJIN_H);                             /* Port J Input */
1452
SFR_16BIT(PJOUT);                             /* Port J Output */
1453
SFR_8BIT(PJOUT_L);                            /* Port J Output */
1454
SFR_8BIT(PJOUT_H);                            /* Port J Output */
1455
SFR_16BIT(PJDIR);                             /* Port J Direction */
1456
SFR_8BIT(PJDIR_L);                            /* Port J Direction */
1457
SFR_8BIT(PJDIR_H);                            /* Port J Direction */
1458
SFR_16BIT(PJREN);                             /* Port J Resistor Enable */
1459
SFR_8BIT(PJREN_L);                            /* Port J Resistor Enable */
1460
SFR_8BIT(PJREN_H);                            /* Port J Resistor Enable */
1461
SFR_16BIT(PJDS);                              /* Port J Resistor Drive Strenght */
1462
SFR_8BIT(PJDS_L);                             /* Port J Resistor Drive Strenght */
1463
SFR_8BIT(PJDS_H);                             /* Port J Resistor Drive Strenght */
1464
SFR_16BIT(PJSEL);                             /* Port J Selection */
1465
SFR_8BIT(PJSEL_L);                            /* Port J Selection */
1466
SFR_8BIT(PJSEL_H);                            /* Port J Selection */
1467
 
1468
/************************************************************
1469
* PORT MAPPING CONTROLLER
1470
************************************************************/
1471
#define __MSP430_HAS_PORT_MAPPING__                /* Definition to show that Module is available */
1472
#define __MSP430_BASEADDRESS_PORT_MAPPING__ 0x01C0
1473
 
1474
SFR_16BIT(PMAPKEYID);                         /* Port Mapping Key register */
1475
SFR_8BIT(PMAPKEYID_L);                        /* Port Mapping Key register */
1476
SFR_8BIT(PMAPKEYID_H);                        /* Port Mapping Key register */
1477
SFR_16BIT(PMAPCTL);                           /* Port Mapping control register */
1478
SFR_8BIT(PMAPCTL_L);                          /* Port Mapping control register */
1479
SFR_8BIT(PMAPCTL_H);                          /* Port Mapping control register */
1480
 
1481
#define  PMAPKEY               (0x2D52)       /* Port Mapping Key */
1482
#define  PMAPPWD               PMAPKEYID      /* Legacy Definition: Mapping Key register */
1483
#define  PMAPPW                (0x2D52)       /* Legacy Definition: Port Mapping Password */
1484
 
1485
/* PMAPCTL Control Bits */
1486
#define PMAPLOCKED             (0x0001)       /* Port Mapping Lock bit. Read only */
1487
#define PMAPRECFG              (0x0002)       /* Port Mapping re-configuration control bit */
1488
 
1489
/* PMAPCTL Control Bits */
1490
#define PMAPLOCKED_L           (0x0001)       /* Port Mapping Lock bit. Read only */
1491
#define PMAPRECFG_L            (0x0002)       /* Port Mapping re-configuration control bit */
1492
 
1493
/* PMAPCTL Control Bits */
1494
 
1495
/************************************************************
1496
* PORT 1 MAPPING CONTROLLER
1497
************************************************************/
1498
#define __MSP430_HAS_PORT1_MAPPING__                /* Definition to show that Module is available */
1499
#define __MSP430_BASEADDRESS_PORT1_MAPPING__ 0x01C8
1500
 
1501
SFR_16BIT(P1MAP01);                           /* Port P1.0/1 mapping register */
1502
SFR_8BIT(P1MAP01_L);                          /* Port P1.0/1 mapping register */
1503
SFR_8BIT(P1MAP01_H);                          /* Port P1.0/1 mapping register */
1504
SFR_16BIT(P1MAP23);                           /* Port P1.2/3 mapping register */
1505
SFR_8BIT(P1MAP23_L);                          /* Port P1.2/3 mapping register */
1506
SFR_8BIT(P1MAP23_H);                          /* Port P1.2/3 mapping register */
1507
SFR_16BIT(P1MAP45);                           /* Port P1.4/5 mapping register */
1508
SFR_8BIT(P1MAP45_L);                          /* Port P1.4/5 mapping register */
1509
SFR_8BIT(P1MAP45_H);                          /* Port P1.4/5 mapping register */
1510
SFR_16BIT(P1MAP67);                           /* Port P1.6/7 mapping register */
1511
SFR_8BIT(P1MAP67_L);                          /* Port P1.6/7 mapping register */
1512
SFR_8BIT(P1MAP67_H);                          /* Port P1.6/7 mapping register */
1513
 
1514
#define  P1MAP0                P1MAP01_L      /* Port P1.0 mapping register */
1515
#define  P1MAP1                P1MAP01_H      /* Port P1.1 mapping register */
1516
#define  P1MAP2                P1MAP23_L      /* Port P1.2 mapping register */
1517
#define  P1MAP3                P1MAP23_H      /* Port P1.3 mapping register */
1518
#define  P1MAP4                P1MAP45_L      /* Port P1.4 mapping register */
1519
#define  P1MAP5                P1MAP45_H      /* Port P1.5 mapping register */
1520
#define  P1MAP6                P1MAP67_L      /* Port P1.6 mapping register */
1521
#define  P1MAP7                P1MAP67_H      /* Port P1.7 mapping register */
1522
 
1523
/************************************************************
1524
* PORT 2 MAPPING CONTROLLER
1525
************************************************************/
1526
#define __MSP430_HAS_PORT2_MAPPING__                /* Definition to show that Module is available */
1527
#define __MSP430_BASEADDRESS_PORT2_MAPPING__ 0x01D0
1528
 
1529
SFR_16BIT(P2MAP01);                           /* Port P2.0/1 mapping register */
1530
SFR_8BIT(P2MAP01_L);                          /* Port P2.0/1 mapping register */
1531
SFR_8BIT(P2MAP01_H);                          /* Port P2.0/1 mapping register */
1532
SFR_16BIT(P2MAP23);                           /* Port P2.2/3 mapping register */
1533
SFR_8BIT(P2MAP23_L);                          /* Port P2.2/3 mapping register */
1534
SFR_8BIT(P2MAP23_H);                          /* Port P2.2/3 mapping register */
1535
SFR_16BIT(P2MAP45);                           /* Port P2.4/5 mapping register */
1536
SFR_8BIT(P2MAP45_L);                          /* Port P2.4/5 mapping register */
1537
SFR_8BIT(P2MAP45_H);                          /* Port P2.4/5 mapping register */
1538
SFR_16BIT(P2MAP67);                           /* Port P2.6/7 mapping register */
1539
SFR_8BIT(P2MAP67_L);                          /* Port P2.6/7 mapping register */
1540
SFR_8BIT(P2MAP67_H);                          /* Port P2.6/7 mapping register */
1541
 
1542
#define  P2MAP0                P2MAP01_L      /* Port P2.0 mapping register */
1543
#define  P2MAP1                P2MAP01_H      /* Port P2.1 mapping register */
1544
#define  P2MAP2                P2MAP23_L      /* Port P2.2 mapping register */
1545
#define  P2MAP3                P2MAP23_H      /* Port P2.3 mapping register */
1546
#define  P2MAP4                P2MAP45_L      /* Port P2.4 mapping register */
1547
#define  P2MAP5                P2MAP45_H      /* Port P2.5 mapping register */
1548
#define  P2MAP6                P2MAP67_L      /* Port P2.6 mapping register */
1549
#define  P2MAP7                P2MAP67_H      /* Port P2.7 mapping register */
1550
 
1551
/************************************************************
1552
* PORT 3 MAPPING CONTROLLER
1553
************************************************************/
1554
#define __MSP430_HAS_PORT3_MAPPING__                /* Definition to show that Module is available */
1555
#define __MSP430_BASEADDRESS_PORT3_MAPPING__ 0x01D8
1556
 
1557
SFR_16BIT(P3MAP01);                           /* Port P3.0/1 mapping register */
1558
SFR_8BIT(P3MAP01_L);                          /* Port P3.0/1 mapping register */
1559
SFR_8BIT(P3MAP01_H);                          /* Port P3.0/1 mapping register */
1560
SFR_16BIT(P3MAP23);                           /* Port P3.2/3 mapping register */
1561
SFR_8BIT(P3MAP23_L);                          /* Port P3.2/3 mapping register */
1562
SFR_8BIT(P3MAP23_H);                          /* Port P3.2/3 mapping register */
1563
SFR_16BIT(P3MAP45);                           /* Port P3.4/5 mapping register */
1564
SFR_8BIT(P3MAP45_L);                          /* Port P3.4/5 mapping register */
1565
SFR_8BIT(P3MAP45_H);                          /* Port P3.4/5 mapping register */
1566
SFR_16BIT(P3MAP67);                           /* Port P3.6/7 mapping register */
1567
SFR_8BIT(P3MAP67_L);                          /* Port P3.6/7 mapping register */
1568
SFR_8BIT(P3MAP67_H);                          /* Port P3.6/7 mapping register */
1569
 
1570
#define  P3MAP0                P3MAP01_L      /* Port P3.0 mapping register */
1571
#define  P3MAP1                P3MAP01_H      /* Port P3.1 mapping register */
1572
#define  P3MAP2                P3MAP23_L      /* Port P3.2 mapping register */
1573
#define  P3MAP3                P3MAP23_H      /* Port P3.3 mapping register */
1574
#define  P3MAP4                P3MAP45_L      /* Port P3.4 mapping register */
1575
#define  P3MAP5                P3MAP45_H      /* Port P3.5 mapping register */
1576
#define  P3MAP6                P3MAP67_L      /* Port P3.6 mapping register */
1577
#define  P3MAP7                P3MAP67_H      /* Port P3.7 mapping register */
1578
 
1579
 
1580
#define PM_NONE                0
1581
#define PM_UCA0CLK             1
1582
#define PM_UCB0STE             1
1583
#define PM_UCA0TXD             2
1584
#define PM_UCA0SIMO            2
1585
#define PM_UCB0SOMO            3
1586
#define PM_UCB0SCL             3
1587
#define PM_UCA0RXD             4
1588
#define PM_UCA0SOMI            4
1589
#define PM_UCB0SIMO            5
1590
#define PM_UCB0SDA             5
1591
#define PM_UCB0CLK             6
1592
#define PM_UCA0STE             6
1593
#define PM_TD0_0               7
1594
#define PM_TD0_1               8
1595
#define PM_TD0_2               9
1596
#define PM_TD1_0               10
1597
#define PM_TD1_1               11
1598
#define PM_TD1_2               12
1599
#define PM_CLR1TD0_0           13
1600
#define PM_FLT1_2TD0_0         13
1601
#define PM_FLT1_0TD0_1         14
1602
#define PM_FLT1_1TD0_2         15
1603
#define PM_CLR2TD1_0           16
1604
#define PM_FLT2_1TD1_0         16
1605
#define PM_FLT2_2TD1_1         17
1606
#define PM_FLT2_0TD1_2         18
1607
#define PM_TD0_0SMCLK          19
1608
#define PM_TA0CLKCBOUT         20
1609
#define PM_TD0CLKMCLK          21
1610
#define PM_TA0_0               22
1611
#define PM_TA0_1               23
1612
#define PM_TA0_2               24
1613
#define PM_DMAE0SMCLK          25
1614
#define PM_DMAE1MCLK           26
1615
#define PM_DMAE2SVM            27
1616
#define PM_TD0OUTH             28
1617
#define PM_TD1OUTH             29
1618
#define PM_ANALOG              31
1619
 
1620
/************************************************************
1621
* PMM - Power Management System
1622
************************************************************/
1623
#define __MSP430_HAS_PMM__                    /* Definition to show that Module is available */
1624
#define __MSP430_BASEADDRESS_PMM__ 0x0120
1625
 
1626
SFR_16BIT(PMMCTL0);                           /* PMM Control 0 */
1627
SFR_8BIT(PMMCTL0_L);                          /* PMM Control 0 */
1628
SFR_8BIT(PMMCTL0_H);                          /* PMM Control 0 */
1629
SFR_16BIT(PMMCTL1);                           /* PMM Control 1 */
1630
SFR_8BIT(PMMCTL1_L);                          /* PMM Control 1 */
1631
SFR_8BIT(PMMCTL1_H);                          /* PMM Control 1 */
1632
SFR_16BIT(SVSMHCTL);                          /* SVS and SVM high side control register */
1633
SFR_8BIT(SVSMHCTL_L);                         /* SVS and SVM high side control register */
1634
SFR_8BIT(SVSMHCTL_H);                         /* SVS and SVM high side control register */
1635
SFR_16BIT(SVSMLCTL);                          /* SVS and SVM low side control register */
1636
SFR_8BIT(SVSMLCTL_L);                         /* SVS and SVM low side control register */
1637
SFR_8BIT(SVSMLCTL_H);                         /* SVS and SVM low side control register */
1638
SFR_16BIT(SVSMIO);                            /* SVSIN and SVSOUT control register */
1639
SFR_8BIT(SVSMIO_L);                           /* SVSIN and SVSOUT control register */
1640
SFR_8BIT(SVSMIO_H);                           /* SVSIN and SVSOUT control register */
1641
SFR_16BIT(PMMIFG);                            /* PMM Interrupt Flag */
1642
SFR_8BIT(PMMIFG_L);                           /* PMM Interrupt Flag */
1643
SFR_8BIT(PMMIFG_H);                           /* PMM Interrupt Flag */
1644
SFR_16BIT(PMMRIE);                            /* PMM and RESET Interrupt Enable */
1645
SFR_8BIT(PMMRIE_L);                           /* PMM and RESET Interrupt Enable */
1646
SFR_8BIT(PMMRIE_H);                           /* PMM and RESET Interrupt Enable */
1647
SFR_16BIT(PM5CTL0);                           /* PMM Power Mode 5 Control Register 0 */
1648
SFR_8BIT(PM5CTL0_L);                          /* PMM Power Mode 5 Control Register 0 */
1649
SFR_8BIT(PM5CTL0_H);                          /* PMM Power Mode 5 Control Register 0 */
1650
 
1651
#define PMMPW                  (0xA500)       /* PMM Register Write Password */
1652
#define PMMPW_H                (0xA5)         /* PMM Register Write Password for high word access */
1653
 
1654
/* PMMCTL0 Control Bits */
1655
#define PMMCOREV0              (0x0001)       /* PMM Core Voltage Bit: 0 */
1656
#define PMMCOREV1              (0x0002)       /* PMM Core Voltage Bit: 1 */
1657
#define PMMSWBOR               (0x0004)       /* PMM Software BOR */
1658
#define PMMSWPOR               (0x0008)       /* PMM Software POR */
1659
#define PMMREGOFF              (0x0010)       /* PMM Turn Regulator off */
1660
#define PMMHPMRE               (0x0080)       /* PMM Global High Power Module Request Enable */
1661
 
1662
/* PMMCTL0 Control Bits */
1663
#define PMMCOREV0_L            (0x0001)       /* PMM Core Voltage Bit: 0 */
1664
#define PMMCOREV1_L            (0x0002)       /* PMM Core Voltage Bit: 1 */
1665
#define PMMSWBOR_L             (0x0004)       /* PMM Software BOR */
1666
#define PMMSWPOR_L             (0x0008)       /* PMM Software POR */
1667
#define PMMREGOFF_L            (0x0010)       /* PMM Turn Regulator off */
1668
#define PMMHPMRE_L             (0x0080)       /* PMM Global High Power Module Request Enable */
1669
 
1670
/* PMMCTL0 Control Bits */
1671
 
1672
#define PMMCOREV_0             (0x0000)       /* PMM Core Voltage 0 (1.35V) */
1673
#define PMMCOREV_1             (0x0001)       /* PMM Core Voltage 1 (1.55V) */
1674
#define PMMCOREV_2             (0x0002)       /* PMM Core Voltage 2 (1.75V) */
1675
#define PMMCOREV_3             (0x0003)       /* PMM Core Voltage 3 (1.85V) */
1676
 
1677
/* PMMCTL1 Control Bits */
1678
#define PMMREFMD               (0x0001)       /* PMM Reference Mode */
1679
#define PMMCMD0                (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1680
#define PMMCMD1                (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1681
 
1682
/* PMMCTL1 Control Bits */
1683
#define PMMREFMD_L             (0x0001)       /* PMM Reference Mode */
1684
#define PMMCMD0_L              (0x0010)       /* PMM Voltage Regulator Current Mode Bit: 0 */
1685
#define PMMCMD1_L              (0x0020)       /* PMM Voltage Regulator Current Mode Bit: 1 */
1686
 
1687
/* PMMCTL1 Control Bits */
1688
 
1689
/* SVSMHCTL Control Bits */
1690
#define SVSMHRRL0              (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1691
#define SVSMHRRL1              (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1692
#define SVSMHRRL2              (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1693
#define SVSMHDLYST             (0x0008)       /* SVS and SVM high side delay status */
1694
#define SVSHMD                 (0x0010)       /* SVS high side mode */
1695
#define SVSMHEVM               (0x0040)       /* SVS and SVM high side event mask */
1696
#define SVSMHACE               (0x0080)       /* SVS and SVM high side auto control enable */
1697
#define SVSHRVL0               (0x0100)       /* SVS high side reset voltage level Bit: 0 */
1698
#define SVSHRVL1               (0x0200)       /* SVS high side reset voltage level Bit: 1 */
1699
#define SVSHE                  (0x0400)       /* SVS high side enable */
1700
#define SVSHFP                 (0x0800)       /* SVS high side full performace mode */
1701
#define SVMHOVPE               (0x1000)       /* SVM high side over-voltage enable */
1702
#define SVMHE                  (0x4000)       /* SVM high side enable */
1703
#define SVMHFP                 (0x8000)       /* SVM high side full performace mode */
1704
 
1705
/* SVSMHCTL Control Bits */
1706
#define SVSMHRRL0_L            (0x0001)       /* SVS and SVM high side Reset Release Voltage Level Bit: 0 */
1707
#define SVSMHRRL1_L            (0x0002)       /* SVS and SVM high side Reset Release Voltage Level Bit: 1 */
1708
#define SVSMHRRL2_L            (0x0004)       /* SVS and SVM high side Reset Release Voltage Level Bit: 2 */
1709
#define SVSMHDLYST_L           (0x0008)       /* SVS and SVM high side delay status */
1710
#define SVSHMD_L               (0x0010)       /* SVS high side mode */
1711
#define SVSMHEVM_L             (0x0040)       /* SVS and SVM high side event mask */
1712
#define SVSMHACE_L             (0x0080)       /* SVS and SVM high side auto control enable */
1713
 
1714
/* SVSMHCTL Control Bits */
1715
#define SVSHRVL0_H             (0x0001)       /* SVS high side reset voltage level Bit: 0 */
1716
#define SVSHRVL1_H             (0x0002)       /* SVS high side reset voltage level Bit: 1 */
1717
#define SVSHE_H                (0x0004)       /* SVS high side enable */
1718
#define SVSHFP_H               (0x0008)       /* SVS high side full performace mode */
1719
#define SVMHOVPE_H             (0x0010)       /* SVM high side over-voltage enable */
1720
#define SVMHE_H                (0x0040)       /* SVM high side enable */
1721
#define SVMHFP_H               (0x0080)       /* SVM high side full performace mode */
1722
 
1723
#define SVSMHRRL_0             (0x0000)       /* SVS and SVM high side Reset Release Voltage Level 0 */
1724
#define SVSMHRRL_1             (0x0001)       /* SVS and SVM high side Reset Release Voltage Level 1 */
1725
#define SVSMHRRL_2             (0x0002)       /* SVS and SVM high side Reset Release Voltage Level 2 */
1726
#define SVSMHRRL_3             (0x0003)       /* SVS and SVM high side Reset Release Voltage Level 3 */
1727
#define SVSMHRRL_4             (0x0004)       /* SVS and SVM high side Reset Release Voltage Level 4 */
1728
#define SVSMHRRL_5             (0x0005)       /* SVS and SVM high side Reset Release Voltage Level 5 */
1729
#define SVSMHRRL_6             (0x0006)       /* SVS and SVM high side Reset Release Voltage Level 6 */
1730
#define SVSMHRRL_7             (0x0007)       /* SVS and SVM high side Reset Release Voltage Level 7 */
1731
 
1732
#define SVSHRVL_0              (0x0000)       /* SVS high side Reset Release Voltage Level 0 */
1733
#define SVSHRVL_1              (0x0100)       /* SVS high side Reset Release Voltage Level 1 */
1734
#define SVSHRVL_2              (0x0200)       /* SVS high side Reset Release Voltage Level 2 */
1735
#define SVSHRVL_3              (0x0300)       /* SVS high side Reset Release Voltage Level 3 */
1736
 
1737
/* SVSMLCTL Control Bits */
1738
#define SVSMLRRL0              (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1739
#define SVSMLRRL1              (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1740
#define SVSMLRRL2              (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1741
#define SVSMLDLYST             (0x0008)       /* SVS and SVM low side delay status */
1742
#define SVSLMD                 (0x0010)       /* SVS low side mode */
1743
#define SVSMLEVM               (0x0040)       /* SVS and SVM low side event mask */
1744
#define SVSMLACE               (0x0080)       /* SVS and SVM low side auto control enable */
1745
#define SVSLRVL0               (0x0100)       /* SVS low side reset voltage level Bit: 0 */
1746
#define SVSLRVL1               (0x0200)       /* SVS low side reset voltage level Bit: 1 */
1747
#define SVSLE                  (0x0400)       /* SVS low side enable */
1748
#define SVSLFP                 (0x0800)       /* SVS low side full performace mode */
1749
#define SVMLOVPE               (0x1000)       /* SVM low side over-voltage enable */
1750
#define SVMLE                  (0x4000)       /* SVM low side enable */
1751
#define SVMLFP                 (0x8000)       /* SVM low side full performace mode */
1752
 
1753
/* SVSMLCTL Control Bits */
1754
#define SVSMLRRL0_L            (0x0001)       /* SVS and SVM low side Reset Release Voltage Level Bit: 0 */
1755
#define SVSMLRRL1_L            (0x0002)       /* SVS and SVM low side Reset Release Voltage Level Bit: 1 */
1756
#define SVSMLRRL2_L            (0x0004)       /* SVS and SVM low side Reset Release Voltage Level Bit: 2 */
1757
#define SVSMLDLYST_L           (0x0008)       /* SVS and SVM low side delay status */
1758
#define SVSLMD_L               (0x0010)       /* SVS low side mode */
1759
#define SVSMLEVM_L             (0x0040)       /* SVS and SVM low side event mask */
1760
#define SVSMLACE_L             (0x0080)       /* SVS and SVM low side auto control enable */
1761
 
1762
/* SVSMLCTL Control Bits */
1763
#define SVSLRVL0_H             (0x0001)       /* SVS low side reset voltage level Bit: 0 */
1764
#define SVSLRVL1_H             (0x0002)       /* SVS low side reset voltage level Bit: 1 */
1765
#define SVSLE_H                (0x0004)       /* SVS low side enable */
1766
#define SVSLFP_H               (0x0008)       /* SVS low side full performace mode */
1767
#define SVMLOVPE_H             (0x0010)       /* SVM low side over-voltage enable */
1768
#define SVMLE_H                (0x0040)       /* SVM low side enable */
1769
#define SVMLFP_H               (0x0080)       /* SVM low side full performace mode */
1770
 
1771
#define SVSMLRRL_0             (0x0000)       /* SVS and SVM low side Reset Release Voltage Level 0 */
1772
#define SVSMLRRL_1             (0x0001)       /* SVS and SVM low side Reset Release Voltage Level 1 */
1773
#define SVSMLRRL_2             (0x0002)       /* SVS and SVM low side Reset Release Voltage Level 2 */
1774
#define SVSMLRRL_3             (0x0003)       /* SVS and SVM low side Reset Release Voltage Level 3 */
1775
#define SVSMLRRL_4             (0x0004)       /* SVS and SVM low side Reset Release Voltage Level 4 */
1776
#define SVSMLRRL_5             (0x0005)       /* SVS and SVM low side Reset Release Voltage Level 5 */
1777
#define SVSMLRRL_6             (0x0006)       /* SVS and SVM low side Reset Release Voltage Level 6 */
1778
#define SVSMLRRL_7             (0x0007)       /* SVS and SVM low side Reset Release Voltage Level 7 */
1779
 
1780
#define SVSLRVL_0              (0x0000)       /* SVS low side Reset Release Voltage Level 0 */
1781
#define SVSLRVL_1              (0x0100)       /* SVS low side Reset Release Voltage Level 1 */
1782
#define SVSLRVL_2              (0x0200)       /* SVS low side Reset Release Voltage Level 2 */
1783
#define SVSLRVL_3              (0x0300)       /* SVS low side Reset Release Voltage Level 3 */
1784
 
1785
/* SVSMIO Control Bits */
1786
#define SVMLOE                 (0x0008)       /* SVM low side output enable */
1787
#define SVMLVLROE              (0x0010)       /* SVM low side voltage level reached output enable */
1788
#define SVMOUTPOL              (0x0020)       /* SVMOUT pin polarity */
1789
#define SVMHOE                 (0x0800)       /* SVM high side output enable */
1790
#define SVMHVLROE              (0x1000)       /* SVM high side voltage level reached output enable */
1791
 
1792
/* SVSMIO Control Bits */
1793
#define SVMLOE_L               (0x0008)       /* SVM low side output enable */
1794
#define SVMLVLROE_L            (0x0010)       /* SVM low side voltage level reached output enable */
1795
#define SVMOUTPOL_L            (0x0020)       /* SVMOUT pin polarity */
1796
 
1797
/* SVSMIO Control Bits */
1798
#define SVMHOE_H               (0x0008)       /* SVM high side output enable */
1799
#define SVMHVLROE_H            (0x0010)       /* SVM high side voltage level reached output enable */
1800
 
1801
/* PMMIFG Control Bits */
1802
#define SVSMLDLYIFG            (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1803
#define SVMLIFG                (0x0002)       /* SVM low side interrupt flag */
1804
#define SVMLVLRIFG             (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1805
#define SVSMHDLYIFG            (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1806
#define SVMHIFG                (0x0020)       /* SVM high side interrupt flag */
1807
#define SVMHVLRIFG             (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1808
#define PMMBORIFG              (0x0100)       /* PMM Software BOR interrupt flag */
1809
#define PMMRSTIFG              (0x0200)       /* PMM RESET pin interrupt flag */
1810
#define PMMPORIFG              (0x0400)       /* PMM Software POR interrupt flag */
1811
#define SVSHIFG                (0x1000)       /* SVS low side interrupt flag */
1812
#define SVSLIFG                (0x2000)       /* SVS high side interrupt flag */
1813
#define PMMLPM5IFG             (0x8000)       /* LPM5 indication Flag */
1814
 
1815
/* PMMIFG Control Bits */
1816
#define SVSMLDLYIFG_L          (0x0001)       /* SVS and SVM low side Delay expired interrupt flag */
1817
#define SVMLIFG_L              (0x0002)       /* SVM low side interrupt flag */
1818
#define SVMLVLRIFG_L           (0x0004)       /* SVM low side Voltage Level Reached interrupt flag */
1819
#define SVSMHDLYIFG_L          (0x0010)       /* SVS and SVM high side Delay expired interrupt flag */
1820
#define SVMHIFG_L              (0x0020)       /* SVM high side interrupt flag */
1821
#define SVMHVLRIFG_L           (0x0040)       /* SVM high side Voltage Level Reached interrupt flag */
1822
 
1823
/* PMMIFG Control Bits */
1824
#define PMMBORIFG_H            (0x0001)       /* PMM Software BOR interrupt flag */
1825
#define PMMRSTIFG_H            (0x0002)       /* PMM RESET pin interrupt flag */
1826
#define PMMPORIFG_H            (0x0004)       /* PMM Software POR interrupt flag */
1827
#define SVSHIFG_H              (0x0010)       /* SVS low side interrupt flag */
1828
#define SVSLIFG_H              (0x0020)       /* SVS high side interrupt flag */
1829
#define PMMLPM5IFG_H           (0x0080)       /* LPM5 indication Flag */
1830
 
1831
#define PMMRSTLPM5IFG          PMMLPM5IFG     /* LPM5 indication Flag */
1832
 
1833
/* PMMIE and RESET Control Bits */
1834
#define SVSMLDLYIE             (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1835
#define SVMLIE                 (0x0002)       /* SVM low side interrupt enable */
1836
#define SVMLVLRIE              (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1837
#define SVSMHDLYIE             (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1838
#define SVMHIE                 (0x0020)       /* SVM high side interrupt enable */
1839
#define SVMHVLRIE              (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1840
#define SVSLPE                 (0x0100)       /* SVS low side POR enable */
1841
#define SVMLVLRPE              (0x0200)       /* SVM low side Voltage Level reached POR enable */
1842
#define SVSHPE                 (0x1000)       /* SVS high side POR enable */
1843
#define SVMHVLRPE              (0x2000)       /* SVM high side Voltage Level reached POR enable */
1844
 
1845
/* PMMIE and RESET Control Bits */
1846
#define SVSMLDLYIE_L           (0x0001)       /* SVS and SVM low side Delay expired interrupt enable */
1847
#define SVMLIE_L               (0x0002)       /* SVM low side interrupt enable */
1848
#define SVMLVLRIE_L            (0x0004)       /* SVM low side Voltage Level Reached interrupt enable */
1849
#define SVSMHDLYIE_L           (0x0010)       /* SVS and SVM high side Delay expired interrupt enable */
1850
#define SVMHIE_L               (0x0020)       /* SVM high side interrupt enable */
1851
#define SVMHVLRIE_L            (0x0040)       /* SVM high side Voltage Level Reached interrupt enable */
1852
 
1853
/* PMMIE and RESET Control Bits */
1854
#define SVSLPE_H               (0x0001)       /* SVS low side POR enable */
1855
#define SVMLVLRPE_H            (0x0002)       /* SVM low side Voltage Level reached POR enable */
1856
#define SVSHPE_H               (0x0010)       /* SVS high side POR enable */
1857
#define SVMHVLRPE_H            (0x0020)       /* SVM high side Voltage Level reached POR enable */
1858
 
1859
/* PM5CTL0 Power Mode 5 Control Bits */
1860
#define LOCKLPM5               (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1861
 
1862
/* PM5CTL0 Power Mode 5 Control Bits */
1863
#define LOCKLPM5_L             (0x0001)       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1864
 
1865
/* PM5CTL0 Power Mode 5 Control Bits */
1866
#define LOCKIO                 LOCKLPM5       /* Lock I/O pin configuration upon entry/exit to/from LPM5 */
1867
 
1868
/*************************************************************
1869
* RAM Control Module
1870
*************************************************************/
1871
#define __MSP430_HAS_RC__                     /* Definition to show that Module is available */
1872
#define __MSP430_BASEADDRESS_RC__ 0x0158
1873
 
1874
SFR_16BIT(RCCTL0);                            /* Ram Controller Control Register */
1875
SFR_8BIT(RCCTL0_L);                           /* Ram Controller Control Register */
1876
SFR_8BIT(RCCTL0_H);                           /* Ram Controller Control Register */
1877
 
1878
/* RCCTL0 Control Bits */
1879
#define RCRS0OFF               (0x0001)       /* RAM Controller RAM Sector 0 Off */
1880
#define RCRS1OFF               (0x0002)       /* RAM Controller RAM Sector 1 Off */
1881
#define RCRS2OFF               (0x0004)       /* RAM Controller RAM Sector 2 Off */
1882
#define RCRS3OFF               (0x0008)       /* RAM Controller RAM Sector 3 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
 
1890
/* RCCTL0 Control Bits */
1891
 
1892
#define RCKEY                  (0x5A00)
1893
 
1894
/************************************************************
1895
* Shared Reference
1896
************************************************************/
1897
#define __MSP430_HAS_REF__                    /* Definition to show that Module is available */
1898
#define __MSP430_BASEADDRESS_REF__ 0x01B0
1899
 
1900
SFR_16BIT(REFCTL0);                           /* REF Shared Reference control register 0 */
1901
SFR_8BIT(REFCTL0_L);                          /* REF Shared Reference control register 0 */
1902
SFR_8BIT(REFCTL0_H);                          /* REF Shared Reference control register 0 */
1903
 
1904
/* REFCTL0 Control Bits */
1905
#define REFON                  (0x0001)       /* REF Reference On */
1906
#define REFOUT                 (0x0002)       /* REF Reference output Buffer On */
1907
//#define RESERVED            (0x0004)  /* Reserved */
1908
#define REFTCOFF               (0x0008)       /* REF Temp.Sensor off */
1909
#define REFVSEL0               (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
1910
#define REFVSEL1               (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
1911
//#define RESERVED            (0x0040)  /* Reserved */
1912
#define REFMSTR                (0x0080)       /* REF Master Control */
1913
#define REFGENACT              (0x0100)       /* REF Reference generator active */
1914
#define REFBGACT               (0x0200)       /* REF Reference bandgap active */
1915
#define REFGENBUSY             (0x0400)       /* REF Reference generator busy */
1916
#define BGMODE                 (0x0800)       /* REF Bandgap mode */
1917
//#define RESERVED            (0x1000)  /* Reserved */
1918
//#define RESERVED            (0x2000)  /* Reserved */
1919
//#define RESERVED            (0x4000)  /* Reserved */
1920
//#define RESERVED            (0x8000)  /* Reserved */
1921
 
1922
/* REFCTL0 Control Bits */
1923
#define REFON_L                (0x0001)       /* REF Reference On */
1924
#define REFOUT_L               (0x0002)       /* REF Reference output Buffer On */
1925
//#define RESERVED            (0x0004)  /* Reserved */
1926
#define REFTCOFF_L             (0x0008)       /* REF Temp.Sensor off */
1927
#define REFVSEL0_L             (0x0010)       /* REF Reference Voltage Level Select Bit:0 */
1928
#define REFVSEL1_L             (0x0020)       /* REF Reference Voltage Level Select Bit:1 */
1929
//#define RESERVED            (0x0040)  /* Reserved */
1930
#define REFMSTR_L              (0x0080)       /* REF Master Control */
1931
//#define RESERVED            (0x1000)  /* Reserved */
1932
//#define RESERVED            (0x2000)  /* Reserved */
1933
//#define RESERVED            (0x4000)  /* Reserved */
1934
//#define RESERVED            (0x8000)  /* Reserved */
1935
 
1936
/* REFCTL0 Control Bits */
1937
//#define RESERVED            (0x0004)  /* Reserved */
1938
//#define RESERVED            (0x0040)  /* Reserved */
1939
#define REFGENACT_H            (0x0001)       /* REF Reference generator active */
1940
#define REFBGACT_H             (0x0002)       /* REF Reference bandgap active */
1941
#define REFGENBUSY_H           (0x0004)       /* REF Reference generator busy */
1942
#define BGMODE_H               (0x0008)       /* REF Bandgap mode */
1943
//#define RESERVED            (0x1000)  /* Reserved */
1944
//#define RESERVED            (0x2000)  /* Reserved */
1945
//#define RESERVED            (0x4000)  /* Reserved */
1946
//#define RESERVED            (0x8000)  /* Reserved */
1947
 
1948
#define REFVSEL_0              (0x0000)       /* REF Reference Voltage Level Select 1.5V */
1949
#define REFVSEL_1              (0x0010)       /* REF Reference Voltage Level Select 2.0V */
1950
#define REFVSEL_2              (0x0020)       /* REF Reference Voltage Level Select 2.5V */
1951
#define REFVSEL_3              (0x0030)       /* REF Reference Voltage Level Select 2.5V */
1952
 
1953
/************************************************************
1954
* SFR - Special Function Register Module
1955
************************************************************/
1956
#define __MSP430_HAS_SFR__                    /* Definition to show that Module is available */
1957
#define __MSP430_BASEADDRESS_SFR__ 0x0100
1958
 
1959
SFR_16BIT(SFRIE1);                            /* Interrupt Enable 1 */
1960
SFR_8BIT(SFRIE1_L);                           /* Interrupt Enable 1 */
1961
SFR_8BIT(SFRIE1_H);                           /* Interrupt Enable 1 */
1962
 
1963
/* SFRIE1 Control Bits */
1964
#define WDTIE                  (0x0001)       /* WDT Interrupt Enable */
1965
#define OFIE                   (0x0002)       /* Osc Fault Enable */
1966
//#define Reserved          (0x0004)
1967
#define VMAIE                  (0x0008)       /* Vacant Memory Interrupt Enable */
1968
#define NMIIE                  (0x0010)       /* NMI Interrupt Enable */
1969
#define ACCVIE                 (0x0020)       /* Flash Access Violation Interrupt Enable */
1970
#define JMBINIE                (0x0040)       /* JTAG Mail Box input Interrupt Enable */
1971
#define JMBOUTIE               (0x0080)       /* JTAG Mail Box output Interrupt Enable */
1972
 
1973
#define WDTIE_L                (0x0001)       /* WDT Interrupt Enable */
1974
#define OFIE_L                 (0x0002)       /* Osc Fault Enable */
1975
//#define Reserved          (0x0004)
1976
#define VMAIE_L                (0x0008)       /* Vacant Memory Interrupt Enable */
1977
#define NMIIE_L                (0x0010)       /* NMI Interrupt Enable */
1978
#define ACCVIE_L               (0x0020)       /* Flash Access Violation Interrupt Enable */
1979
#define JMBINIE_L              (0x0040)       /* JTAG Mail Box input Interrupt Enable */
1980
#define JMBOUTIE_L             (0x0080)       /* JTAG Mail Box output Interrupt Enable */
1981
 
1982
//#define Reserved          (0x0004)
1983
 
1984
SFR_16BIT(SFRIFG1);                           /* Interrupt Flag 1 */
1985
SFR_8BIT(SFRIFG1_L);                          /* Interrupt Flag 1 */
1986
SFR_8BIT(SFRIFG1_H);                          /* Interrupt Flag 1 */
1987
/* SFRIFG1 Control Bits */
1988
#define WDTIFG                 (0x0001)       /* WDT Interrupt Flag */
1989
#define OFIFG                  (0x0002)       /* Osc Fault Flag */
1990
//#define Reserved          (0x0004)
1991
#define VMAIFG                 (0x0008)       /* Vacant Memory Interrupt Flag */
1992
#define NMIIFG                 (0x0010)       /* NMI Interrupt Flag */
1993
//#define Reserved          (0x0020)
1994
#define JMBINIFG               (0x0040)       /* JTAG Mail Box input Interrupt Flag */
1995
#define JMBOUTIFG              (0x0080)       /* JTAG Mail Box output Interrupt Flag */
1996
 
1997
#define WDTIFG_L               (0x0001)       /* WDT Interrupt Flag */
1998
#define OFIFG_L                (0x0002)       /* Osc Fault Flag */
1999
//#define Reserved          (0x0004)
2000
#define VMAIFG_L               (0x0008)       /* Vacant Memory Interrupt Flag */
2001
#define NMIIFG_L               (0x0010)       /* NMI Interrupt Flag */
2002
//#define Reserved          (0x0020)
2003
#define JMBINIFG_L             (0x0040)       /* JTAG Mail Box input Interrupt Flag */
2004
#define JMBOUTIFG_L            (0x0080)       /* JTAG Mail Box output Interrupt Flag */
2005
 
2006
//#define Reserved          (0x0004)
2007
//#define Reserved          (0x0020)
2008
 
2009
SFR_16BIT(SFRRPCR);                           /* RESET Pin Control Register */
2010
SFR_8BIT(SFRRPCR_L);                          /* RESET Pin Control Register */
2011
SFR_8BIT(SFRRPCR_H);                          /* RESET Pin Control Register */
2012
/* SFRRPCR Control Bits */
2013
#define SYSNMI                 (0x0001)       /* NMI select */
2014
#define SYSNMIIES              (0x0002)       /* NMI edge select */
2015
#define SYSRSTUP               (0x0004)       /* RESET Pin pull down/up select */
2016
#define SYSRSTRE               (0x0008)       /* RESET Pin Resistor enable */
2017
 
2018
#define SYSNMI_L               (0x0001)       /* NMI select */
2019
#define SYSNMIIES_L            (0x0002)       /* NMI edge select */
2020
#define SYSRSTUP_L             (0x0004)       /* RESET Pin pull down/up select */
2021
#define SYSRSTRE_L             (0x0008)       /* RESET Pin Resistor enable */
2022
 
2023
/************************************************************
2024
* SYS - System Module
2025
************************************************************/
2026
#define __MSP430_HAS_SYS__                    /* Definition to show that Module is available */
2027
#define __MSP430_BASEADDRESS_SYS__ 0x0180
2028
 
2029
SFR_16BIT(SYSCTL);                            /* System control */
2030
SFR_8BIT(SYSCTL_L);                           /* System control */
2031
SFR_8BIT(SYSCTL_H);                           /* System control */
2032
SFR_16BIT(SYSBSLC);                           /* Boot strap configuration area */
2033
SFR_8BIT(SYSBSLC_L);                          /* Boot strap configuration area */
2034
SFR_8BIT(SYSBSLC_H);                          /* Boot strap configuration area */
2035
SFR_16BIT(SYSJMBC);                           /* JTAG mailbox control */
2036
SFR_8BIT(SYSJMBC_L);                          /* JTAG mailbox control */
2037
SFR_8BIT(SYSJMBC_H);                          /* JTAG mailbox control */
2038
SFR_16BIT(SYSJMBI0);                          /* JTAG mailbox input 0 */
2039
SFR_8BIT(SYSJMBI0_L);                         /* JTAG mailbox input 0 */
2040
SFR_8BIT(SYSJMBI0_H);                         /* JTAG mailbox input 0 */
2041
SFR_16BIT(SYSJMBI1);                          /* JTAG mailbox input 1 */
2042
SFR_8BIT(SYSJMBI1_L);                         /* JTAG mailbox input 1 */
2043
SFR_8BIT(SYSJMBI1_H);                         /* JTAG mailbox input 1 */
2044
SFR_16BIT(SYSJMBO0);                          /* JTAG mailbox output 0 */
2045
SFR_8BIT(SYSJMBO0_L);                         /* JTAG mailbox output 0 */
2046
SFR_8BIT(SYSJMBO0_H);                         /* JTAG mailbox output 0 */
2047
SFR_16BIT(SYSJMBO1);                          /* JTAG mailbox output 1 */
2048
SFR_8BIT(SYSJMBO1_L);                         /* JTAG mailbox output 1 */
2049
SFR_8BIT(SYSJMBO1_H);                         /* JTAG mailbox output 1 */
2050
 
2051
SFR_16BIT(SYSBERRIV);                         /* Bus Error vector generator */
2052
SFR_8BIT(SYSBERRIV_L);                        /* Bus Error vector generator */
2053
SFR_8BIT(SYSBERRIV_H);                        /* Bus Error vector generator */
2054
SFR_16BIT(SYSUNIV);                           /* User NMI vector generator */
2055
SFR_8BIT(SYSUNIV_L);                          /* User NMI vector generator */
2056
SFR_8BIT(SYSUNIV_H);                          /* User NMI vector generator */
2057
SFR_16BIT(SYSSNIV);                           /* System NMI vector generator */
2058
SFR_8BIT(SYSSNIV_L);                          /* System NMI vector generator */
2059
SFR_8BIT(SYSSNIV_H);                          /* System NMI vector generator */
2060
SFR_16BIT(SYSRSTIV);                          /* Reset vector generator */
2061
SFR_8BIT(SYSRSTIV_L);                         /* Reset vector generator */
2062
SFR_8BIT(SYSRSTIV_H);                         /* Reset vector generator */
2063
 
2064
/* SYSCTL Control Bits */
2065
#define SYSRIVECT              (0x0001)       /* SYS - RAM based interrupt vectors */
2066
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2067
#define SYSPMMPE               (0x0004)       /* SYS - PMM access protect */
2068
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2069
#define SYSBSLIND              (0x0010)       /* SYS - TCK/RST indication detected */
2070
#define SYSJTAGPIN             (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2071
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2072
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2073
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2074
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2075
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2076
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2077
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2078
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2079
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2080
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2081
 
2082
/* SYSCTL Control Bits */
2083
#define SYSRIVECT_L            (0x0001)       /* SYS - RAM based interrupt vectors */
2084
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2085
#define SYSPMMPE_L             (0x0004)       /* SYS - PMM access protect */
2086
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2087
#define SYSBSLIND_L            (0x0010)       /* SYS - TCK/RST indication detected */
2088
#define SYSJTAGPIN_L           (0x0020)       /* SYS - Dedicated JTAG pins enabled */
2089
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2090
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2091
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2092
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2093
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2094
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2095
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2096
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2097
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2098
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2099
 
2100
/* SYSCTL Control Bits */
2101
//#define RESERVED            (0x0002)  /* SYS - Reserved */
2102
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2103
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2104
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2105
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2106
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2107
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2108
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2109
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2110
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2111
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2112
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2113
 
2114
/* SYSBSLC Control Bits */
2115
#define SYSBSLSIZE0            (0x0001)       /* SYS - BSL Protection Size 0 */
2116
#define SYSBSLSIZE1            (0x0002)       /* SYS - BSL Protection Size 1 */
2117
#define SYSBSLR                (0x0004)       /* SYS - RAM assigned to BSL */
2118
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2119
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2120
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2121
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2122
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2123
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2124
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2125
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2126
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2127
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2128
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2129
#define SYSBSLOFF              (0x4000)       /* SYS - BSL Memeory disabled */
2130
#define SYSBSLPE               (0x8000)       /* SYS - BSL Memory protection enabled */
2131
 
2132
/* SYSBSLC Control Bits */
2133
#define SYSBSLSIZE0_L          (0x0001)       /* SYS - BSL Protection Size 0 */
2134
#define SYSBSLSIZE1_L          (0x0002)       /* SYS - BSL Protection Size 1 */
2135
#define SYSBSLR_L              (0x0004)       /* SYS - RAM assigned to BSL */
2136
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2137
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2138
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2139
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2140
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2141
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2142
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2143
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2144
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2145
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2146
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2147
 
2148
/* SYSBSLC Control Bits */
2149
//#define RESERVED            (0x0008)  /* SYS - Reserved */
2150
//#define RESERVED            (0x0010)  /* SYS - Reserved */
2151
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2152
//#define RESERVED            (0x0040)  /* SYS - Reserved */
2153
//#define RESERVED            (0x0080)  /* SYS - Reserved */
2154
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2155
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2156
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2157
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2158
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2159
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2160
#define SYSBSLOFF_H            (0x0040)       /* SYS - BSL Memeory disabled */
2161
#define SYSBSLPE_H             (0x0080)       /* SYS - BSL Memory protection enabled */
2162
 
2163
/* SYSJMBC Control Bits */
2164
#define JMBIN0FG               (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2165
#define JMBIN1FG               (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2166
#define JMBOUT0FG              (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2167
#define JMBOUT1FG              (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2168
#define JMBMODE                (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2169
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2170
#define JMBCLR0OFF             (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2171
#define JMBCLR1OFF             (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
2172
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2173
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2174
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2175
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2176
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2177
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2178
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2179
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2180
 
2181
/* SYSJMBC Control Bits */
2182
#define JMBIN0FG_L             (0x0001)       /* SYS - Incoming JTAG Mailbox 0 Flag */
2183
#define JMBIN1FG_L             (0x0002)       /* SYS - Incoming JTAG Mailbox 1 Flag */
2184
#define JMBOUT0FG_L            (0x0004)       /* SYS - Outgoing JTAG Mailbox 0 Flag */
2185
#define JMBOUT1FG_L            (0x0008)       /* SYS - Outgoing JTAG Mailbox 1 Flag */
2186
#define JMBMODE_L              (0x0010)       /* SYS - JMB 16/32 Bit Mode */
2187
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2188
#define JMBCLR0OFF_L           (0x0040)       /* SYS - Incoming JTAG Mailbox 0 Flag auto-clear disalbe */
2189
#define JMBCLR1OFF_L           (0x0080)       /* SYS - Incoming JTAG Mailbox 1 Flag auto-clear disalbe */
2190
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2191
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2192
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2193
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2194
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2195
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2196
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2197
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2198
 
2199
/* SYSJMBC Control Bits */
2200
//#define RESERVED            (0x0020)  /* SYS - Reserved */
2201
//#define RESERVED            (0x0100)  /* SYS - Reserved */
2202
//#define RESERVED            (0x0200)  /* SYS - Reserved */
2203
//#define RESERVED            (0x0400)  /* SYS - Reserved */
2204
//#define RESERVED            (0x0800)  /* SYS - Reserved */
2205
//#define RESERVED            (0x1000)  /* SYS - Reserved */
2206
//#define RESERVED            (0x2000)  /* SYS - Reserved */
2207
//#define RESERVED            (0x4000)  /* SYS - Reserved */
2208
//#define RESERVED            (0x8000)  /* SYS - Reserved */
2209
 
2210
/* SYSUNIV Definitions */
2211
#define SYSUNIV_NONE           (0x0000)       /* No Interrupt pending */
2212
#define SYSUNIV_NMIIFG         (0x0002)       /* SYSUNIV : NMIIFG */
2213
#define SYSUNIV_OFIFG          (0x0004)       /* SYSUNIV : Osc. Fail - OFIFG */
2214
#define SYSUNIV_ACCVIFG        (0x0006)       /* SYSUNIV : Access Violation - ACCVIFG */
2215
#define SYSUNIV_SYSBERRIV      (0x0008)       /* SYSUNIV : Bus Error - SYSBERRIV */
2216
 
2217
/* SYSSNIV Definitions */
2218
#define SYSSNIV_NONE           (0x0000)       /* No Interrupt pending */
2219
#define SYSSNIV_SVMLIFG        (0x0002)       /* SYSSNIV : SVMLIFG */
2220
#define SYSSNIV_SVMHIFG        (0x0004)       /* SYSSNIV : SVMHIFG */
2221
#define SYSSNIV_DLYLIFG        (0x0006)       /* SYSSNIV : DLYLIFG */
2222
#define SYSSNIV_DLYHIFG        (0x0008)       /* SYSSNIV : DLYHIFG */
2223
#define SYSSNIV_VMAIFG         (0x000A)       /* SYSSNIV : VMAIFG */
2224
#define SYSSNIV_JMBINIFG       (0x000C)       /* SYSSNIV : JMBINIFG */
2225
#define SYSSNIV_JMBOUTIFG      (0x000E)       /* SYSSNIV : JMBOUTIFG */
2226
#define SYSSNIV_VLRLIFG        (0x0010)       /* SYSSNIV : VLRLIFG */
2227
#define SYSSNIV_VLRHIFG        (0x0012)       /* SYSSNIV : VLRHIFG */
2228
 
2229
/* SYSRSTIV Definitions */
2230
#define SYSRSTIV_NONE          (0x0000)       /* No Interrupt pending */
2231
#define SYSRSTIV_BOR           (0x0002)       /* SYSRSTIV : BOR */
2232
#define SYSRSTIV_RSTNMI        (0x0004)       /* SYSRSTIV : RST/NMI */
2233
#define SYSRSTIV_DOBOR         (0x0006)       /* SYSRSTIV : Do BOR */
2234
#define SYSRSTIV_LPM5WU        (0x0008)       /* SYSRSTIV : Port LPM5 Wake Up */
2235
#define SYSRSTIV_SECYV         (0x000A)       /* SYSRSTIV : Security violation */
2236
#define SYSRSTIV_SVSL          (0x000C)       /* SYSRSTIV : SVSL */
2237
#define SYSRSTIV_SVSH          (0x000E)       /* SYSRSTIV : SVSH */
2238
#define SYSRSTIV_SVML_OVP      (0x0010)       /* SYSRSTIV : SVML_OVP */
2239
#define SYSRSTIV_SVMH_OVP      (0x0012)       /* SYSRSTIV : SVMH_OVP */
2240
#define SYSRSTIV_DOPOR         (0x0014)       /* SYSRSTIV : Do POR */
2241
#define SYSRSTIV_WDTTO         (0x0016)       /* SYSRSTIV : WDT Time out */
2242
#define SYSRSTIV_WDTKEY        (0x0018)       /* SYSRSTIV : WDTKEY violation */
2243
#define SYSRSTIV_KEYV          (0x001A)       /* SYSRSTIV : Flash Key violation */
2244
#define SYSRSTIV_PLLUL         (0x001C)       /* SYSRSTIV : PLL unlock */
2245
#define SYSRSTIV_PERF          (0x001E)       /* SYSRSTIV : peripheral/config area fetch */
2246
#define SYSRSTIV_PMMKEY        (0x0020)       /* SYSRSTIV : PMMKEY violation */
2247
 
2248
/************************************************************
2249
* Timer0_A3
2250
************************************************************/
2251
#define __MSP430_HAS_T0A3__                   /* Definition to show that Module is available */
2252
#define __MSP430_BASEADDRESS_T0A3__ 0x03C0
2253
 
2254
SFR_16BIT(TA0CTL);                            /* Timer0_A3 Control */
2255
SFR_16BIT(TA0CCTL0);                          /* Timer0_A3 Capture/Compare Control 0 */
2256
SFR_16BIT(TA0CCTL1);                          /* Timer0_A3 Capture/Compare Control 1 */
2257
SFR_16BIT(TA0CCTL2);                          /* Timer0_A3 Capture/Compare Control 2 */
2258
SFR_16BIT(TA0R);                              /* Timer0_A3 */
2259
SFR_16BIT(TA0CCR0);                           /* Timer0_A3 Capture/Compare 0 */
2260
SFR_16BIT(TA0CCR1);                           /* Timer0_A3 Capture/Compare 1 */
2261
SFR_16BIT(TA0CCR2);                           /* Timer0_A3 Capture/Compare 2 */
2262
SFR_16BIT(TA0IV);                             /* Timer0_A3 Interrupt Vector Word */
2263
SFR_16BIT(TA0EX0);                            /* Timer0_A3 Expansion Register 0 */
2264
 
2265
/* TAxCTL Control Bits */
2266
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
2267
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
2268
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
2269
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
2270
#define MC1                    (0x0020)       /* Timer A mode control 1 */
2271
#define MC0                    (0x0010)       /* Timer A mode control 0 */
2272
#define TACLR                  (0x0004)       /* Timer A counter clear */
2273
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
2274
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
2275
 
2276
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
2277
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2278
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2279
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2280
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
2281
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
2282
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
2283
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
2284
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2285
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2286
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2287
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2288
#define MC__STOP               (0*0x10u)      /* Timer A mode control: 0 - Stop */
2289
#define MC__UP                 (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
2290
#define MC__CONTINOUS          (2*0x10u)      /* Timer A mode control: 2 - Continous up */
2291
#define MC__UPDOWN             (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
2292
#define ID__1                  (0*0x40u)      /* Timer A input divider: 0 - /1 */
2293
#define ID__2                  (1*0x40u)      /* Timer A input divider: 1 - /2 */
2294
#define ID__4                  (2*0x40u)      /* Timer A input divider: 2 - /4 */
2295
#define ID__8                  (3*0x40u)      /* Timer A input divider: 3 - /8 */
2296
#define TASSEL__TACLK          (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
2297
#define TASSEL__ACLK           (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
2298
#define TASSEL__SMCLK          (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
2299
#define TASSEL__INCLK          (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
2300
 
2301
/* TAxCCTLx Control Bits */
2302
#define CM1                    (0x8000)       /* Capture mode 1 */
2303
#define CM0                    (0x4000)       /* Capture mode 0 */
2304
#define CCIS1                  (0x2000)       /* Capture input select 1 */
2305
#define CCIS0                  (0x1000)       /* Capture input select 0 */
2306
#define SCS                    (0x0800)       /* Capture sychronize */
2307
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
2308
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
2309
#define OUTMOD2                (0x0080)       /* Output mode 2 */
2310
#define OUTMOD1                (0x0040)       /* Output mode 1 */
2311
#define OUTMOD0                (0x0020)       /* Output mode 0 */
2312
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
2313
#define CCI                    (0x0008)       /* Capture input signal (read) */
2314
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
2315
#define COV                    (0x0002)       /* Capture/compare overflow flag */
2316
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
2317
 
2318
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
2319
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
2320
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
2321
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
2322
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
2323
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
2324
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
2325
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
2326
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
2327
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
2328
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
2329
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
2330
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
2331
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
2332
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
2333
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
2334
 
2335
/* TAxEX0 Control Bits */
2336
#define TAIDEX0                (0x0001)       /* Timer A Input divider expansion Bit: 0 */
2337
#define TAIDEX1                (0x0002)       /* Timer A Input divider expansion Bit: 1 */
2338
#define TAIDEX2                (0x0004)       /* Timer A Input divider expansion Bit: 2 */
2339
 
2340
#define TAIDEX_0               (0*0x0001u)    /* Timer A Input divider expansion : /1 */
2341
#define TAIDEX_1               (1*0x0001u)    /* Timer A Input divider expansion : /2 */
2342
#define TAIDEX_2               (2*0x0001u)    /* Timer A Input divider expansion : /3 */
2343
#define TAIDEX_3               (3*0x0001u)    /* Timer A Input divider expansion : /4 */
2344
#define TAIDEX_4               (4*0x0001u)    /* Timer A Input divider expansion : /5 */
2345
#define TAIDEX_5               (5*0x0001u)    /* Timer A Input divider expansion : /6 */
2346
#define TAIDEX_6               (6*0x0001u)    /* Timer A Input divider expansion : /7 */
2347
#define TAIDEX_7               (7*0x0001u)    /* Timer A Input divider expansion : /8 */
2348
 
2349
/* T0A3IV Definitions */
2350
#define TA0IV_NONE             (0x0000)       /* No Interrupt pending */
2351
#define TA0IV_TA0CCR1          (0x0002)       /* TA0CCR1_CCIFG */
2352
#define TA0IV_TA0CCR2          (0x0004)       /* TA0CCR2_CCIFG */
2353
#define TA0IV_3                (0x0006)       /* Reserved */
2354
#define TA0IV_4                (0x0008)       /* Reserved */
2355
#define TA0IV_5                (0x000A)       /* Reserved */
2356
#define TA0IV_6                (0x000C)       /* Reserved */
2357
#define TA0IV_TA0IFG           (0x000E)       /* TA0IFG */
2358
 
2359
/************************************************************
2360
* Timer0_D3
2361
************************************************************/
2362
#define __MSP430_HAS_T0D3__                   /* Definition to show that Module is available */
2363
#define __MSP430_BASEADDRESS_T0D3__ 0x0B00
2364
 
2365
SFR_16BIT(TD0CTL0);                           /* Timer0_D3 Control 0 */
2366
SFR_16BIT(TD0CTL1);                           /* Timer0_D3 Control 1 */
2367
SFR_16BIT(TD0CTL2);                           /* Timer0_D3 Control 2 */
2368
SFR_16BIT(TD0R);                              /* Timer0_D3 Counter */
2369
SFR_16BIT(TD0CCTL0);                          /* Timer0_D3 Capture/Compare Control 0 */
2370
SFR_16BIT(TD0CCR0);                           /* Timer0_D3 Capture/Compare 0 */
2371
SFR_16BIT(TD0CL0);                            /* Timer0_D3 Capture/Compare Latch 0 */
2372
SFR_16BIT(TD0CCTL1);                          /* Timer0_D3 Capture/Compare Control 1 */
2373
SFR_16BIT(TD0CCR1);                           /* Timer0_D3 Capture/Compare 1 */
2374
SFR_16BIT(TD0CL1);                            /* Timer0_D3 Capture/Compare Latch 1 */
2375
SFR_16BIT(TD0CCTL2);                          /* Timer0_D3 Capture/Compare Control 2 */
2376
SFR_16BIT(TD0CCR2);                           /* Timer0_D3 Capture/Compare 2 */
2377
SFR_16BIT(TD0CL2);                            /* Timer0_D3 Capture/Compare Latch 2 */
2378
SFR_16BIT(TD0HCTL0);                          /* Timer0_D3 High-resolution Control Register 0 */
2379
SFR_16BIT(TD0HCTL1);                          /* Timer0_D3 High-resolution Control Register 1 */
2380
SFR_16BIT(TD0HINT);                           /* Timer0_D3 High-resolution Interrupt Register */
2381
SFR_16BIT(TD0IV);                             /* Timer0_D3 Interrupt Vector Word */
2382
 
2383
/* TDxCTL0 Control Bits */
2384
#define TDCLGRP1               (0x4000)       /* Timer0_D3 Compare latch load group 1 */
2385
#define TDCLGRP0               (0x2000)       /* Timer0_D3 Compare latch load group 0 */
2386
#define CNTL1                  (0x1000)       /* Counter lenght 1 */
2387
#define CNTL0                  (0x0800)       /* Counter lenght 0 */
2388
#define TDSSEL1                (0x0200)       /* Clock source 1 */
2389
#define TDSSEL0                (0x0100)       /* Clock source 0 */
2390
#define TDCLR                  (0x0004)       /* Timer0_D3 counter clear */
2391
#define TDIE                   (0x0002)       /* Timer0_D3 interrupt enable */
2392
#define TDIFG                  (0x0001)       /* Timer0_D3 interrupt flag */
2393
 
2394
#define SHR1                   (0x4000)       /* Timer0_D3 Compare latch load group 1 */
2395
#define SHR0                   (0x2000)       /* Timer0_D3 Compare latch load group 0 */
2396
 
2397
#define TDSSEL_0               (0*0x0100u)    /* Clock Source: TDCLK */
2398
#define TDSSEL_1               (1*0x0100u)    /* Clock Source: ACLK  */
2399
#define TDSSEL_2               (2*0x0100u)    /* Clock Source: SMCLK */
2400
#define TDSSEL_3               (3*0x0100u)    /* Clock Source: INCLK */
2401
#define CNTL_0                 (0*0x0800u)    /* Counter lenght: 16 bit */
2402
#define CNTL_1                 (1*0x0800u)    /* Counter lenght: 12 bit */
2403
#define CNTL_2                 (2*0x0800u)    /* Counter lenght: 10 bit */
2404
#define CNTL_3                 (3*0x0800u)    /* Counter lenght:  8 bit */
2405
#define SHR_0                  (0*0x2000u)    /* Timer0_D3 Group: 0 - individually */
2406
#define SHR_1                  (1*0x2000u)    /* Timer0_D3 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2407
#define SHR_2                  (2*0x2000u)    /* Timer0_D3 Group: 2 - 2 groups (1-3, 4-6)*/
2408
#define SHR_3                  (3*0x2000u)    /* Timer0_D3 Group: 3 - 1 group (all) */
2409
#define TDCLGRP_0              (0*0x2000u)    /* Timer0_D3 Group: 0 - individually */
2410
#define TDCLGRP_1              (1*0x2000u)    /* Timer0_D3 Group: 1 - 3 groups (1-2, 3-4, 5-6) */
2411
#define TDCLGRP_2              (2*0x2000u)    /* Timer0_D3 Group: 2 - 2 groups (1-3, 4-6)*/
2412
#define TDCLGRP_3              (3*0x2000u)    /* Timer0_D3 Group: 3 - 1 group (all) */
2413
#define TDSSEL__TACLK          (0*0x0100u)    /* Timer0_D3 clock source select: 0 - TACLK */
2414
#define TDSSEL__ACLK           (1*0x0100u)    /* Timer0_D3 clock source select: 1 - ACLK  */
2415
#define TDSSEL__SMCLK          (2*0x0100u)    /* Timer0_D3 clock source select: 2 - SMCLK */
2416
#define TDSSEL__INCLK          (3*0x0100u)    /* Timer0_D3 clock source select: 3 - INCLK */
2417
#define CNTL__16               (0*0x0800u)    /* Counter lenght: 16 bit */
2418
#define CNTL__12               (1*0x0800u)    /* Counter lenght: 12 bit */
2419
#define CNTL__10               (2*0x0800u)    /* Counter lenght: 10 bit */
2420
#define CNTL__8                (3*0x0800u)    /* Counter lenght:  8 bit */
2421
 
2422
/* Additional Timer B Control Register bits are defined in Timer A */
2423
 
2424
/* TDxCTL1 Control Bits */
2425
#define TDCLKM0                (0x0001)       /* Timer0_D3 Clocking Mode Bit: 0 */
2426
#define TDCLKM1                (0x0002)       /* Timer0_D3 Clocking Mode Bit: 1 */
2427
#define TD2CMB                 (0x0010)       /* Timer0_D3 TD0CCR Combination in TD2 */
2428
#define TD4CMB                 (0x0020)       /* Timer0_D3 TD0CCR Combination in TD4 */
2429
#define TD6CMB                 (0x0040)       /* Timer0_D3 TD0CCR Combination in TD6 */
2430
#define TDIDEX0                (0x0100)       /* Timer0_D3 Input divider expansion Bit: 0 */
2431
#define TDIDEX1                (0x0200)       /* Timer0_D3 Input divider expansion Bit: 1 */
2432
#define TDIDEX2                (0x0400)       /* Timer0_D3 Input divider expansion Bit: 2 */
2433
 
2434
#define TDCLKM_0               (0x0000)       /* Timer0_D3 Clocking Mode: External */
2435
#define TDCLKM_1               (0x0001)       /* Timer0_D3 Clocking Mode: High-Res. local clock */
2436
#define TDCLKM_2               (0x0002)       /* Timer0_D3 Clocking Mode: Aux Clock */
2437
#define TDCLKM__EXT            (0x0000)       /* Timer0_D3 Clocking Mode: External */
2438
#define TDCLKM__HIGHRES        (0x0001)       /* Timer0_D3 Clocking Mode: High-Res. local clock */
2439
#define TDCLKM__AUX            (0x0002)       /* Timer0_D3 Clocking Mode: Aux Clock */
2440
 
2441
#define TDIDEX_0               (0*0x0100u)    /* Timer0_D3 Input divider expansion : /1 */
2442
#define TDIDEX_1               (1*0x0100u)    /* Timer0_D3 Input divider expansion : /2 */
2443
#define TDIDEX_2               (2*0x0100u)    /* Timer0_D3 Input divider expansion : /3 */
2444
#define TDIDEX_3               (3*0x0100u)    /* Timer0_D3 Input divider expansion : /4 */
2445
#define TDIDEX_4               (4*0x0100u)    /* Timer0_D3 Input divider expansion : /5 */
2446
#define TDIDEX_5               (5*0x0100u)    /* Timer0_D3 Input divider expansion : /6 */
2447
#define TDIDEX_6               (6*0x0100u)    /* Timer0_D3 Input divider expansion : /7 */
2448
#define TDIDEX_7               (7*0x0100u)    /* Timer0_D3 Input divider expansion : /8 */
2449
#define TDIDEX__1              (0*0x0100u)    /* Timer0_D3 Input divider expansion : /1 */
2450
#define TDIDEX__2              (1*0x0100u)    /* Timer0_D3 Input divider expansion : /2 */
2451
#define TDIDEX__3              (2*0x0100u)    /* Timer0_D3 Input divider expansion : /3 */
2452
#define TDIDEX__4              (3*0x0100u)    /* Timer0_D3 Input divider expansion : /4 */
2453
#define TDIDEX__5              (4*0x0100u)    /* Timer0_D3 Input divider expansion : /5 */
2454
#define TDIDEX__6              (5*0x0100u)    /* Timer0_D3 Input divider expansion : /6 */
2455
#define TDIDEX__7              (6*0x0100u)    /* Timer0_D3 Input divider expansion : /7 */
2456
#define TDIDEX__8              (7*0x0100u)    /* Timer0_D3 Input divider expansion : /8 */
2457
 
2458
/* TDxCTL2 Control Bits */
2459
#define TDCAPM0                (0x0001)       /* Timer0_D3 Capture Mode of Channel 0 */
2460
#define TDCAPM1                (0x0002)       /* Timer0_D3 Capture Mode of Channel 1 */
2461
#define TDCAPM2                (0x0004)       /* Timer0_D3 Capture Mode of Channel 2 */
2462
#define TDCAPM3                (0x0008)       /* Timer0_D3 Capture Mode of Channel 3 */
2463
#define TDCAPM4                (0x0010)       /* Timer0_D3 Capture Mode of Channel 4 */
2464
#define TDCAPM5                (0x0020)       /* Timer0_D3 Capture Mode of Channel 5 */
2465
#define TDCAPM6                (0x0040)       /* Timer0_D3 Capture Mode of Channel 6 */
2466
 
2467
/* TDxCCTLx Control Bits */
2468
#define CLLD1                  (0x0400)       /* Compare latch load source 1 */
2469
#define CLLD0                  (0x0200)       /* Compare latch load source 0 */
2470
 
2471
#define SLSHR1                 (0x0400)       /* Compare latch load source 1 */
2472
#define SLSHR0                 (0x0200)       /* Compare latch load source 0 */
2473
 
2474
#define SLSHR_0                (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2475
#define SLSHR_1                (1*0x0200u)    /* Compare latch load sourec : 1 - TDR counts to 0 */
2476
#define SLSHR_2                (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2477
#define SLSHR_3                (3*0x0200u)    /* Compare latch load sourec : 3 - TDR counts to TDCTL0 */
2478
 
2479
#define CLLD_0                 (0*0x0200u)    /* Compare latch load sourec : 0 - immediate */
2480
#define CLLD_1                 (1*0x0200u)    /* Compare latch load sourec : 1 - TDR counts to 0 */
2481
#define CLLD_2                 (2*0x0200u)    /* Compare latch load sourec : 2 - up/down */
2482
#define CLLD_3                 (3*0x0200u)    /* Compare latch load sourec : 3 - TDR counts to TDCTL0 */
2483
 
2484
/* TDxHCTL0 Control Bits */
2485
#define TDHEN                  (0x0001)       /* Timer0_D3 High-Resolution Enable */
2486
#define TDHREGEN               (0x0002)       /* Timer0_D3 High-Resolution Regulated Mode */
2487
#define TDHEAEN                (0x0004)       /* Timer0_D3 High-Resolution clock error accum. enable */
2488
#define TDHRON                 (0x0008)       /* Timer0_D3 High-Resolution Generator forced on*/
2489
#define TDHM0                  (0x0010)       /* Timer0_D3 High-Resoltuion Clock Mult. Bit: 0 */
2490
#define TDHM1                  (0x0020)       /* Timer0_D3 High-Resoltuion Clock Mult. Bit: 1 */
2491
#define TDHD0                  (0x0040)       /* Timer0_D3 High-Resolution clock divider Bit: 0 */
2492
#define TDHD1                  (0x0080)       /* Timer0_D3 High-Resolution clock divider Bit: 1 */
2493
#define TDHFW                  (0x0100)       /* Timer0_D7 High-resolution generator fast wakeup enable */
2494
 
2495
#define TDHCALEN               TDHREGEN       /* Timer0_D3 Lagacy Definition */
2496
 
2497
#define TDHM_0                 (0x0000)       /* Timer0_D3 High-Resoltuion Clock Mult.: 8x TimerD clock */
2498
#define TDHM_1                 (0x0010)       /* Timer0_D3 High-Resoltuion Clock Mult.: 16x TimerD clock */
2499
#define TDHM__8                (0x0000)       /* Timer0_D3 High-Resoltuion Clock Mult.: 8x TimerD clock */
2500
#define TDHM__16               (0x0010)       /* Timer0_D3 High-Resoltuion Clock Mult.: 16x TimerD clock */
2501
#define TDHD_0                 (0x0000)       /* Timer0_D3 High-Resolution clock divider: /1 */
2502
#define TDHD_1                 (0x0040)       /* Timer0_D3 High-Resolution clock divider: /2 */
2503
#define TDHD_2                 (0x0080)       /* Timer0_D3 High-Resolution clock divider: /4 */
2504
#define TDHD_3                 (0x00C0)       /* Timer0_D3 High-Resolution clock divider: /8 */
2505
#define TDHD__1                (0x0000)       /* Timer0_D3 High-Resolution clock divider: /1 */
2506
#define TDHD__2                (0x0040)       /* Timer0_D3 High-Resolution clock divider: /2 */
2507
#define TDHD__4                (0x0080)       /* Timer0_D3 High-Resolution clock divider: /4 */
2508
#define TDHD__8                (0x00C0)       /* Timer0_D3 High-Resolution clock divider: /8 */
2509
 
2510
/* TDxHCTL1 Control Bits */
2511
#define TDHCLKTRIM0            (0x0002)       /* Timer0_D3 High-Resolution Clock Trim Bit: 0 */
2512
#define TDHCLKTRIM1            (0x0004)       /* Timer0_D3 High-Resolution Clock Trim Bit: 1 */
2513
#define TDHCLKTRIM2            (0x0008)       /* Timer0_D3 High-Resolution Clock Trim Bit: 2 */
2514
#define TDHCLKTRIM3            (0x0010)       /* Timer0_D3 High-Resolution Clock Trim Bit: 3 */
2515
#define TDHCLKTRIM4            (0x0020)       /* Timer0_D3 High-Resolution Clock Trim Bit: 4 */
2516
#define TDHCLKTRIM5            (0x0040)       /* Timer0_D3 High-Resolution Clock Trim Bit: 5 */
2517
#define TDHCLKTRIM6            (0x0080)       /* Timer0_D3 High-Resolution Clock Trim Bit: 6 */
2518
#define TDHCLKSR0              (0x0100)       /* Timer0_D3 High-Resolution Clock Sub-Range Bit: 0 */
2519
#define TDHCLKSR1              (0x0200)       /* Timer0_D3 High-Resolution Clock Sub-Range Bit: 1 */
2520
#define TDHCLKSR2              (0x0400)       /* Timer0_D3 High-Resolution Clock Sub-Range Bit: 2 */
2521
#define TDHCLKSR3              (0x0800)       /* Timer0_D3 High-Resolution Clock Sub-Range Bit: 3 */
2522
#define TDHCLKSR4              (0x1000)       /* Timer0_D3 High-Resolution Clock Sub-Range Bit: 4 */
2523
#define TDHCLKR0               (0x2000)       /* Timer0_D3 High-Resolution Clock Range Bit: 0 */
2524
#define TDHCLKR1               (0x4000)       /* Timer0_D3 High-Resolution Clock Range Bit: 1 */
2525
#define TDHCLKCR               (0x8000)       /* Timer0_D3 High-Resolution Coarse Clock Range */
2526
 
2527
/* TDxHINT Control Bits */
2528
#define TDHFLIFG               (0x0001)       /* Timer0_D3 High-Res. fail low Interrupt Flag */
2529
#define TDHFHIFG               (0x0002)       /* Timer0_D3 High-Res. fail high Interrupt Flag */
2530
#define TDHLKIFG               (0x0004)       /* Timer0_D3 High-Res. frequency lock Interrupt Flag */
2531
#define TDHUNLKIFG             (0x0008)       /* Timer0_D3 High-Res. frequency unlock Interrupt Flag */
2532
#define TDHFLIE                (0x0100)       /* Timer0_D3 High-Res. fail low Interrupt Enable */
2533
#define TDHFHIE                (0x0200)       /* Timer0_D3 High-Res. fail high Interrupt Enable */
2534
#define TDHLKIE                (0x0400)       /* Timer0_D3 High-Res. frequency lock Interrupt Enable */
2535
#define TDHUNLKIE              (0x0800)       /* Timer0_D3 High-Res. frequency unlock Interrupt Enable */
2536
 
2537
/* TD0IV Definitions */
2538
#define TD0IV_NONE             (0x0000)       /* No Interrupt pending */
2539
#define TD0IV_TD0CCR1          (0x0002)       /* TD0CCR1_CCIFG */
2540
#define TD0IV_TD0CCR2          (0x0004)       /* TD0CCR2_CCIFG */
2541
#define TD0IV_TD0CCR3          (0x0006)       /* TD0CCR3_CCIFG */
2542
#define TD0IV_TD0CCR4          (0x0008)       /* TD0CCR4_CCIFG */
2543
#define TD0IV_TD0CCR5          (0x000A)       /* TD0CCR5_CCIFG */
2544
#define TD0IV_TD0CCR6          (0x000C)       /* TD0CCR6_CCIFG */
2545
#define TD0IV_RES_14           (0x000E)       /* Reserverd */
2546
#define TD0IV_TD0IFG           (0x0010)       /* TD0IFG */
2547
#define TD0IV_TDHFLIFG         (0x0012)       /* TDHFLIFG Clock fail low */
2548
#define TD0IV_TDHFHIFG         (0x0014)       /* TDHFLIFG Clock fail high */
2549
#define TD0IV_TDHLKIFG         (0x0016)       /* TDHLKIE Clock lock*/
2550
#define TD0IV_TDHUNLKIFG       (0x0018)       /* TDHUNLKIE Clock unlock */
2551
 
2552
 
2553
/************************************************************
2554
* Timer1_D3
2555
************************************************************/
2556
#define __MSP430_HAS_T1D3__                   /* Definition to show that Module is available */
2557
#define __MSP430_BASEADDRESS_T1D3__ 0x0B40
2558
 
2559
SFR_16BIT(TD1CTL0);                           /* Timer1_D3 Control 0 */
2560
SFR_16BIT(TD1CTL1);                           /* Timer1_D3 Control 1 */
2561
SFR_16BIT(TD1CTL2);                           /* Timer1_D3 Control 2 */
2562
SFR_16BIT(TD1R);                              /* Timer1_D3 Counter */
2563
SFR_16BIT(TD1CCTL0);                          /* Timer1_D3 Capture/Compare Control 0 */
2564
SFR_16BIT(TD1CCR0);                           /* Timer1_D3 Capture/Compare 0 */
2565
SFR_16BIT(TD1CL0);                            /* Timer1_D3 Capture/Compare Latch 0 */
2566
SFR_16BIT(TD1CCTL1);                          /* Timer1_D3 Capture/Compare Control 1 */
2567
SFR_16BIT(TD1CCR1);                           /* Timer1_D3 Capture/Compare 1 */
2568
SFR_16BIT(TD1CL1);                            /* Timer1_D3 Capture/Compare Latch 1 */
2569
SFR_16BIT(TD1CCTL2);                          /* Timer1_D3 Capture/Compare Control 2 */
2570
SFR_16BIT(TD1CCR2);                           /* Timer1_D3 Capture/Compare 2 */
2571
SFR_16BIT(TD1CL2);                            /* Timer1_D3 Capture/Compare Latch 2 */
2572
SFR_16BIT(TD1HCTL0);                          /* Timer1_D3 High-resolution Control Register 0 */
2573
SFR_16BIT(TD1HCTL1);                          /* Timer1_D3 High-resolution Control Register 1 */
2574
SFR_16BIT(TD1HINT);                           /* Timer1_D3 High-resolution Interrupt Register */
2575
SFR_16BIT(TD1IV);                             /* Timer1_D3 Interrupt Vector Word */
2576
 
2577
/* Bits are already defined within the Timer0_Dx */
2578
 
2579
/* TD1IV Definitions */
2580
#define TD1IV_NONE             (0x0000)       /* No Interrupt pending */
2581
#define TD1IV_TD1CCR1          (0x0002)       /* TD1CCR1_CCIFG */
2582
#define TD1IV_TD1CCR2          (0x0004)       /* TD1CCR2_CCIFG */
2583
#define TD1IV_TD1CCR3          (0x0006)       /* TD1CCR3_CCIFG */
2584
#define TD1IV_TD1CCR4          (0x0008)       /* TD1CCR4_CCIFG */
2585
#define TD1IV_TD1CCR5          (0x000A)       /* TD1CCR5_CCIFG */
2586
#define TD1IV_TD1CCR6          (0x000C)       /* TD1CCR6_CCIFG */
2587
#define TD1IV_RES_14           (0x000E)       /* Reserverd */
2588
#define TD1IV_TD1IFG           (0x0010)       /* TD1IFG */
2589
#define TD1IV_TDHFLIFG         (0x0012)       /* TDHFLIFG Clock fail low */
2590
#define TD1IV_TDHFHIFG         (0x0014)       /* TDHFLIFG Clock fail high */
2591
#define TD1IV_TDHLKIFG         (0x0016)       /* TDHLKIE Clock lock*/
2592
#define TD1IV_TDHUNLKIFG       (0x0018)       /* TDHUNLKIE Clock unlock */
2593
 
2594
/************************************************************
2595
* Timer Event Control 0
2596
************************************************************/
2597
#define __MSP430_HAS_TEV0__                   /* Definition to show that Module is available */
2598
#define __MSP430_BASEADDRESS_TEV0__ 0x0C00
2599
 
2600
SFR_16BIT(TEC0XCTL0);                         /* Timer Event Control 0 External Control 0 */
2601
SFR_8BIT(TEC0XCTL0_L);                        /* Timer Event Control 0 External Control 0 */
2602
SFR_8BIT(TEC0XCTL0_H);                        /* Timer Event Control 0 External Control 0 */
2603
SFR_16BIT(TEC0XCTL1);                         /* Timer Event Control 0 External Control 1 */
2604
SFR_8BIT(TEC0XCTL1_L);                        /* Timer Event Control 0 External Control 1 */
2605
SFR_8BIT(TEC0XCTL1_H);                        /* Timer Event Control 0 External Control 1 */
2606
SFR_16BIT(TEC0XCTL2);                         /* Timer Event Control 0 External Control 2 */
2607
SFR_8BIT(TEC0XCTL2_L);                        /* Timer Event Control 0 External Control 2 */
2608
SFR_8BIT(TEC0XCTL2_H);                        /* Timer Event Control 0 External Control 2 */
2609
SFR_16BIT(TEC0STA);                           /* Timer Event Control 0 Status */
2610
SFR_8BIT(TEC0STA_L);                          /* Timer Event Control 0 Status */
2611
SFR_8BIT(TEC0STA_H);                          /* Timer Event Control 0 Status */
2612
SFR_16BIT(TEC0XINT);                          /* Timer Event Control 0 External Interrupt */
2613
SFR_8BIT(TEC0XINT_L);                         /* Timer Event Control 0 External Interrupt */
2614
SFR_8BIT(TEC0XINT_H);                         /* Timer Event Control 0 External Interrupt */
2615
SFR_16BIT(TEC0IV);                            /* Timer Event Control 0 Interrupt Vector */
2616
SFR_8BIT(TEC0IV_L);                           /* Timer Event Control 0 Interrupt Vector */
2617
SFR_8BIT(TEC0IV_H);                           /* Timer Event Control 0 Interrupt Vector */
2618
 
2619
/* TECxXCTL0 Control Bits */
2620
#define TECXFLTHLD0            (0x0001)       /* TEV Ext. fault signal hold for CE0 */
2621
#define TECXFLTHLD1            (0x0002)       /* TEV Ext. fault signal hold for CE1 */
2622
#define TECXFLTHLD2            (0x0004)       /* TEV Ext. fault signal hold for CE2 */
2623
#define TECXFLTHLD3            (0x0008)       /* TEV Ext. fault signal hold for CE3 */
2624
#define TECXFLTHLD4            (0x0010)       /* TEV Ext. fault signal hold for CE4 */
2625
#define TECXFLTHLD5            (0x0020)       /* TEV Ext. fault signal hold for CE5 */
2626
#define TECXFLTHLD6            (0x0040)       /* TEV Ext. fault signal hold for CE6 */
2627
#define TECXFLTEN0             (0x0100)       /* TEV Ext. fault signal enable for CE0 */
2628
#define TECXFLTEN1             (0x0200)       /* TEV Ext. fault signal enable for CE1 */
2629
#define TECXFLTEN2             (0x0400)       /* TEV Ext. fault signal enable for CE2 */
2630
#define TECXFLTEN3             (0x0800)       /* TEV Ext. fault signal enable for CE3 */
2631
#define TECXFLTEN4             (0x1000)       /* TEV Ext. fault signal enable for CE4 */
2632
#define TECXFLTEN5             (0x2000)       /* TEV Ext. fault signal enable for CE5 */
2633
#define TECXFLTEN6             (0x4000)       /* TEV Ext. fault signal enable for CE6 */
2634
 
2635
/* TECxXCTL0 Control Bits */
2636
#define TECXFLTHLD0_L          (0x0001)       /* TEV Ext. fault signal hold for CE0 */
2637
#define TECXFLTHLD1_L          (0x0002)       /* TEV Ext. fault signal hold for CE1 */
2638
#define TECXFLTHLD2_L          (0x0004)       /* TEV Ext. fault signal hold for CE2 */
2639
#define TECXFLTHLD3_L          (0x0008)       /* TEV Ext. fault signal hold for CE3 */
2640
#define TECXFLTHLD4_L          (0x0010)       /* TEV Ext. fault signal hold for CE4 */
2641
#define TECXFLTHLD5_L          (0x0020)       /* TEV Ext. fault signal hold for CE5 */
2642
#define TECXFLTHLD6_L          (0x0040)       /* TEV Ext. fault signal hold for CE6 */
2643
 
2644
/* TECxXCTL0 Control Bits */
2645
#define TECXFLTEN0_H           (0x0001)       /* TEV Ext. fault signal enable for CE0 */
2646
#define TECXFLTEN1_H           (0x0002)       /* TEV Ext. fault signal enable for CE1 */
2647
#define TECXFLTEN2_H           (0x0004)       /* TEV Ext. fault signal enable for CE2 */
2648
#define TECXFLTEN3_H           (0x0008)       /* TEV Ext. fault signal enable for CE3 */
2649
#define TECXFLTEN4_H           (0x0010)       /* TEV Ext. fault signal enable for CE4 */
2650
#define TECXFLTEN5_H           (0x0020)       /* TEV Ext. fault signal enable for CE5 */
2651
#define TECXFLTEN6_H           (0x0040)       /* TEV Ext. fault signal enable for CE6 */
2652
 
2653
/* TECxXCTL1 Control Bits */
2654
#define TECXFLTPOL0            (0x0001)       /* TEV Polarity Bit of ext. fault 0 */
2655
#define TECXFLTPOL1            (0x0002)       /* TEV Polarity Bit of ext. fault 1 */
2656
#define TECXFLTPOL2            (0x0004)       /* TEV Polarity Bit of ext. fault 2 */
2657
#define TECXFLTPOL3            (0x0008)       /* TEV Polarity Bit of ext. fault 3 */
2658
#define TECXFLTPOL4            (0x0010)       /* TEV Polarity Bit of ext. fault 4 */
2659
#define TECXFLTPOL5            (0x0020)       /* TEV Polarity Bit of ext. fault 5 */
2660
#define TECXFLTPOL6            (0x0040)       /* TEV Polarity Bit of ext. fault 6 */
2661
#define TECXFLTLVS0            (0x0100)       /* TEV Signal Type of Ext. fault 0 */
2662
#define TECXFLTLVS1            (0x0200)       /* TEV Signal Type of Ext. fault 1 */
2663
#define TECXFLTLVS2            (0x0400)       /* TEV Signal Type of Ext. fault 2 */
2664
#define TECXFLTLVS3            (0x0800)       /* TEV Signal Type of Ext. fault 3 */
2665
#define TECXFLTLVS4            (0x1000)       /* TEV Signal Type of Ext. fault 4 */
2666
#define TECXFLTLVS5            (0x2000)       /* TEV Signal Type of Ext. fault 5 */
2667
#define TECXFLTLVS6            (0x4000)       /* TEV Signal Type of Ext. fault 6 */
2668
 
2669
/* TECxXCTL1 Control Bits */
2670
#define TECXFLTPOL0_L          (0x0001)       /* TEV Polarity Bit of ext. fault 0 */
2671
#define TECXFLTPOL1_L          (0x0002)       /* TEV Polarity Bit of ext. fault 1 */
2672
#define TECXFLTPOL2_L          (0x0004)       /* TEV Polarity Bit of ext. fault 2 */
2673
#define TECXFLTPOL3_L          (0x0008)       /* TEV Polarity Bit of ext. fault 3 */
2674
#define TECXFLTPOL4_L          (0x0010)       /* TEV Polarity Bit of ext. fault 4 */
2675
#define TECXFLTPOL5_L          (0x0020)       /* TEV Polarity Bit of ext. fault 5 */
2676
#define TECXFLTPOL6_L          (0x0040)       /* TEV Polarity Bit of ext. fault 6 */
2677
 
2678
/* TECxXCTL1 Control Bits */
2679
#define TECXFLTLVS0_H          (0x0001)       /* TEV Signal Type of Ext. fault 0 */
2680
#define TECXFLTLVS1_H          (0x0002)       /* TEV Signal Type of Ext. fault 1 */
2681
#define TECXFLTLVS2_H          (0x0004)       /* TEV Signal Type of Ext. fault 2 */
2682
#define TECXFLTLVS3_H          (0x0008)       /* TEV Signal Type of Ext. fault 3 */
2683
#define TECXFLTLVS4_H          (0x0010)       /* TEV Signal Type of Ext. fault 4 */
2684
#define TECXFLTLVS5_H          (0x0020)       /* TEV Signal Type of Ext. fault 5 */
2685
#define TECXFLTLVS6_H          (0x0040)       /* TEV Signal Type of Ext. fault 6 */
2686
 
2687
/* TECxXCTL2 Control Bits */
2688
#define TECCLKSEL0             (0x0001)       /* TEV Aux. Clock Select Bit: 0 */
2689
#define TECCLKSEL1             (0x0002)       /* TEV Aux. Clock Select Bit: 1 */
2690
#define TECAXCLREN             (0x0004)       /* TEV Auxilary clear signal control */
2691
#define TECEXCLREN             (0x0008)       /* TEV Ext. clear signal control */
2692
#define TECEXCLRHLD            (0x0010)       /* TEV External clear signal hold bit */
2693
#define TECEXCLRPOL            (0x0020)       /* TEV Polarity Bit of ext. clear */
2694
#define TECEXCLRLVS            (0x0040)       /* TEV Signal Type of Ext. clear */
2695
 
2696
/* TECxXCTL2 Control Bits */
2697
#define TECCLKSEL0_L           (0x0001)       /* TEV Aux. Clock Select Bit: 0 */
2698
#define TECCLKSEL1_L           (0x0002)       /* TEV Aux. Clock Select Bit: 1 */
2699
#define TECAXCLREN_L           (0x0004)       /* TEV Auxilary clear signal control */
2700
#define TECEXCLREN_L           (0x0008)       /* TEV Ext. clear signal control */
2701
#define TECEXCLRHLD_L          (0x0010)       /* TEV External clear signal hold bit */
2702
#define TECEXCLRPOL_L          (0x0020)       /* TEV Polarity Bit of ext. clear */
2703
#define TECEXCLRLVS_L          (0x0040)       /* TEV Signal Type of Ext. clear */
2704
 
2705
/* TECxXCTL2 Control Bits */
2706
 
2707
#define TECCLKSEL_0            (0x0000)       /* TEV Aux. Clock Select: CLK0 */
2708
#define TECCLKSEL_1            (0x0001)       /* TEV Aux. Clock Select: CLK1 */
2709
#define TECCLKSEL_2            (0x0002)       /* TEV Aux. Clock Select: CLK2 */
2710
#define TECCLKSEL_3            (0x0003)       /* TEV Aux. Clock Select: CLK3 */
2711
 
2712
/* TECxSTA Control Bits */
2713
#define TECXFLT0STA            (0x0001)       /* TEV External fault status flag for CE0 */
2714
#define TECXFLT1STA            (0x0002)       /* TEV External fault status flag for CE1 */
2715
#define TECXFLT2STA            (0x0004)       /* TEV External fault status flag for CE2 */
2716
#define TECXFLT3STA            (0x0008)       /* TEV External fault status flag for CE3 */
2717
#define TECXFLT4STA            (0x0010)       /* TEV External fault status flag for CE4 */
2718
#define TECXFLT5STA            (0x0020)       /* TEV External fault status flag for CE5 */
2719
#define TECXFLT6STA            (0x0040)       /* TEV External fault status flag for CE6 */
2720
#define TECXCLRSTA             (0x0100)       /* TEC External clear status flag */
2721
 
2722
/* TECxSTA Control Bits */
2723
#define TECXFLT0STA_L          (0x0001)       /* TEV External fault status flag for CE0 */
2724
#define TECXFLT1STA_L          (0x0002)       /* TEV External fault status flag for CE1 */
2725
#define TECXFLT2STA_L          (0x0004)       /* TEV External fault status flag for CE2 */
2726
#define TECXFLT3STA_L          (0x0008)       /* TEV External fault status flag for CE3 */
2727
#define TECXFLT4STA_L          (0x0010)       /* TEV External fault status flag for CE4 */
2728
#define TECXFLT5STA_L          (0x0020)       /* TEV External fault status flag for CE5 */
2729
#define TECXFLT6STA_L          (0x0040)       /* TEV External fault status flag for CE6 */
2730
 
2731
/* TECxSTA Control Bits */
2732
#define TECXCLRSTA_H           (0x0001)       /* TEC External clear status flag */
2733
 
2734
/* TECxXINT Control Bits */
2735
#define TECAXCLRIFG            (0x0001)       /* TEC Aux. Clear Interrupt Flag */
2736
#define TECEXCLRIFG            (0x0002)       /* TEC External Clear Interrupt Flag */
2737
#define TECXFLTIFG             (0x0004)       /* TEC External Fault Interrupt Flag */
2738
#define TECAXCLRIE             (0x0100)       /* TEC Aux. Clear Interrupt Enable */
2739
#define TECEXCLRIE             (0x0200)       /* TEC External Clear Interrupt Enable */
2740
#define TECXFLTIE              (0x0400)       /* TEC External Fault Interrupt Enable */
2741
 
2742
/* TECxXINT Control Bits */
2743
#define TECAXCLRIFG_L          (0x0001)       /* TEC Aux. Clear Interrupt Flag */
2744
#define TECEXCLRIFG_L          (0x0002)       /* TEC External Clear Interrupt Flag */
2745
#define TECXFLTIFG_L           (0x0004)       /* TEC External Fault Interrupt Flag */
2746
 
2747
/* TECxXINT Control Bits */
2748
#define TECAXCLRIE_H           (0x0001)       /* TEC Aux. Clear Interrupt Enable */
2749
#define TECEXCLRIE_H           (0x0002)       /* TEC External Clear Interrupt Enable */
2750
#define TECXFLTIE_H            (0x0004)       /* TEC External Fault Interrupt Enable */
2751
 
2752
/* TEC0IV Definitions */
2753
#define TEC0IV_NONE            (0x0000)       /* No Interrupt pending */
2754
#define TEC0IV_TECXFLTIFG      (0x0002)       /* TEC0XFLTIFG */
2755
#define TEC0IV_TECEXCLRIFG     (0x0004)       /* TEC0EXCLRIFG */
2756
#define TEC0IV_TECAXCLRIFG     (0x0006)       /* TEC0AXCLRIFG */
2757
 
2758
/************************************************************
2759
* Timer Event Control 1
2760
************************************************************/
2761
#define __MSP430_HAS_TEV1__                   /* Definition to show that Module is available */
2762
#define __MSP430_BASEADDRESS_TEV1__ 0x0C20
2763
 
2764
SFR_16BIT(TEC1XCTL0);                         /* Timer Event Control 1 External Control 0 */
2765
SFR_8BIT(TEC1XCTL0_L);                        /* Timer Event Control 1 External Control 0 */
2766
SFR_8BIT(TEC1XCTL0_H);                        /* Timer Event Control 1 External Control 0 */
2767
SFR_16BIT(TEC1XCTL1);                         /* Timer Event Control 1 External Control 1 */
2768
SFR_8BIT(TEC1XCTL1_L);                        /* Timer Event Control 1 External Control 1 */
2769
SFR_8BIT(TEC1XCTL1_H);                        /* Timer Event Control 1 External Control 1 */
2770
SFR_16BIT(TEC1XCTL2);                         /* Timer Event Control 1 External Control 2 */
2771
SFR_8BIT(TEC1XCTL2_L);                        /* Timer Event Control 1 External Control 2 */
2772
SFR_8BIT(TEC1XCTL2_H);                        /* Timer Event Control 1 External Control 2 */
2773
SFR_16BIT(TEC1STA);                           /* Timer Event Control 1 Status */
2774
SFR_8BIT(TEC1STA_L);                          /* Timer Event Control 1 Status */
2775
SFR_8BIT(TEC1STA_H);                          /* Timer Event Control 1 Status */
2776
SFR_16BIT(TEC1XINT);                          /* Timer Event Control 1 External Interrupt */
2777
SFR_8BIT(TEC1XINT_L);                         /* Timer Event Control 1 External Interrupt */
2778
SFR_8BIT(TEC1XINT_H);                         /* Timer Event Control 1 External Interrupt */
2779
SFR_16BIT(TEC1IV);                            /* Timer Event Control 1 Interrupt Vector */
2780
SFR_8BIT(TEC1IV_L);                           /* Timer Event Control 1 Interrupt Vector */
2781
SFR_8BIT(TEC1IV_H);                           /* Timer Event Control 1 Interrupt Vector */
2782
 
2783
/* TECIV Definitions */
2784
#define TEC1IV_NONE            (0x0000)       /* No Interrupt pending */
2785
#define TEC1IV_TECXFLTIFG      (0x0002)       /* TEC1XFLTIFG */
2786
#define TEC1IV_TECEXCLRIFG     (0x0004)       /* TEC1EXCLRIFG */
2787
#define TEC1IV_TECAXCLRIFG     (0x0006)       /* TEC1AXCLRIFG */
2788
 
2789
 
2790
/************************************************************
2791
* UNIFIED CLOCK SYSTEM
2792
************************************************************/
2793
#define __MSP430_HAS_UCS__                    /* Definition to show that Module is available */
2794
#define __MSP430_BASEADDRESS_UCS__ 0x0160
2795
 
2796
SFR_16BIT(UCSCTL0);                           /* UCS Control Register 0 */
2797
SFR_8BIT(UCSCTL0_L);                          /* UCS Control Register 0 */
2798
SFR_8BIT(UCSCTL0_H);                          /* UCS Control Register 0 */
2799
SFR_16BIT(UCSCTL1);                           /* UCS Control Register 1 */
2800
SFR_8BIT(UCSCTL1_L);                          /* UCS Control Register 1 */
2801
SFR_8BIT(UCSCTL1_H);                          /* UCS Control Register 1 */
2802
SFR_16BIT(UCSCTL2);                           /* UCS Control Register 2 */
2803
SFR_8BIT(UCSCTL2_L);                          /* UCS Control Register 2 */
2804
SFR_8BIT(UCSCTL2_H);                          /* UCS Control Register 2 */
2805
SFR_16BIT(UCSCTL3);                           /* UCS Control Register 3 */
2806
SFR_8BIT(UCSCTL3_L);                          /* UCS Control Register 3 */
2807
SFR_8BIT(UCSCTL3_H);                          /* UCS Control Register 3 */
2808
SFR_16BIT(UCSCTL4);                           /* UCS Control Register 4 */
2809
SFR_8BIT(UCSCTL4_L);                          /* UCS Control Register 4 */
2810
SFR_8BIT(UCSCTL4_H);                          /* UCS Control Register 4 */
2811
SFR_16BIT(UCSCTL5);                           /* UCS Control Register 5 */
2812
SFR_8BIT(UCSCTL5_L);                          /* UCS Control Register 5 */
2813
SFR_8BIT(UCSCTL5_H);                          /* UCS Control Register 5 */
2814
SFR_16BIT(UCSCTL6);                           /* UCS Control Register 6 */
2815
SFR_8BIT(UCSCTL6_L);                          /* UCS Control Register 6 */
2816
SFR_8BIT(UCSCTL6_H);                          /* UCS Control Register 6 */
2817
SFR_16BIT(UCSCTL7);                           /* UCS Control Register 7 */
2818
SFR_8BIT(UCSCTL7_L);                          /* UCS Control Register 7 */
2819
SFR_8BIT(UCSCTL7_H);                          /* UCS Control Register 7 */
2820
SFR_16BIT(UCSCTL8);                           /* UCS Control Register 8 */
2821
SFR_8BIT(UCSCTL8_L);                          /* UCS Control Register 8 */
2822
SFR_8BIT(UCSCTL8_H);                          /* UCS Control Register 8 */
2823
 
2824
/* UCSCTL0 Control Bits */
2825
//#define RESERVED            (0x0001)    /* RESERVED */
2826
//#define RESERVED            (0x0002)    /* RESERVED */
2827
//#define RESERVED            (0x0004)    /* RESERVED */
2828
#define MOD0                   (0x0008)       /* Modulation Bit Counter Bit : 0 */
2829
#define MOD1                   (0x0010)       /* Modulation Bit Counter Bit : 1 */
2830
#define MOD2                   (0x0020)       /* Modulation Bit Counter Bit : 2 */
2831
#define MOD3                   (0x0040)       /* Modulation Bit Counter Bit : 3 */
2832
#define MOD4                   (0x0080)       /* Modulation Bit Counter Bit : 4 */
2833
#define DCO0                   (0x0100)       /* DCO TAP Bit : 0 */
2834
#define DCO1                   (0x0200)       /* DCO TAP Bit : 1 */
2835
#define DCO2                   (0x0400)       /* DCO TAP Bit : 2 */
2836
#define DCO3                   (0x0800)       /* DCO TAP Bit : 3 */
2837
#define DCO4                   (0x1000)       /* DCO TAP Bit : 4 */
2838
//#define RESERVED            (0x2000)    /* RESERVED */
2839
//#define RESERVED            (0x4000)    /* RESERVED */
2840
//#define RESERVED            (0x8000)    /* RESERVED */
2841
 
2842
/* UCSCTL0 Control Bits */
2843
//#define RESERVED            (0x0001)    /* RESERVED */
2844
//#define RESERVED            (0x0002)    /* RESERVED */
2845
//#define RESERVED            (0x0004)    /* RESERVED */
2846
#define MOD0_L                 (0x0008)       /* Modulation Bit Counter Bit : 0 */
2847
#define MOD1_L                 (0x0010)       /* Modulation Bit Counter Bit : 1 */
2848
#define MOD2_L                 (0x0020)       /* Modulation Bit Counter Bit : 2 */
2849
#define MOD3_L                 (0x0040)       /* Modulation Bit Counter Bit : 3 */
2850
#define MOD4_L                 (0x0080)       /* Modulation Bit Counter Bit : 4 */
2851
//#define RESERVED            (0x2000)    /* RESERVED */
2852
//#define RESERVED            (0x4000)    /* RESERVED */
2853
//#define RESERVED            (0x8000)    /* RESERVED */
2854
 
2855
/* UCSCTL0 Control Bits */
2856
//#define RESERVED            (0x0001)    /* RESERVED */
2857
//#define RESERVED            (0x0002)    /* RESERVED */
2858
//#define RESERVED            (0x0004)    /* RESERVED */
2859
#define DCO0_H                 (0x0001)       /* DCO TAP Bit : 0 */
2860
#define DCO1_H                 (0x0002)       /* DCO TAP Bit : 1 */
2861
#define DCO2_H                 (0x0004)       /* DCO TAP Bit : 2 */
2862
#define DCO3_H                 (0x0008)       /* DCO TAP Bit : 3 */
2863
#define DCO4_H                 (0x0010)       /* DCO TAP Bit : 4 */
2864
//#define RESERVED            (0x2000)    /* RESERVED */
2865
//#define RESERVED            (0x4000)    /* RESERVED */
2866
//#define RESERVED            (0x8000)    /* RESERVED */
2867
 
2868
/* UCSCTL1 Control Bits */
2869
#define DISMOD                 (0x0001)       /* Disable Modulation */
2870
//#define RESERVED            (0x0002)    /* RESERVED */
2871
//#define RESERVED            (0x0004)    /* RESERVED */
2872
//#define RESERVED            (0x0008)    /* RESERVED */
2873
#define DCORSEL0               (0x0010)       /* DCO Freq. Range Select Bit : 0 */
2874
#define DCORSEL1               (0x0020)       /* DCO Freq. Range Select Bit : 1 */
2875
#define DCORSEL2               (0x0040)       /* DCO Freq. Range Select Bit : 2 */
2876
//#define RESERVED            (0x0080)    /* RESERVED */
2877
//#define RESERVED            (0x0100)    /* RESERVED */
2878
//#define RESERVED            (0x0200)    /* RESERVED */
2879
//#define RESERVED            (0x0400)    /* RESERVED */
2880
//#define RESERVED            (0x0800)    /* RESERVED */
2881
//#define RESERVED            (0x1000)    /* RESERVED */
2882
//#define RESERVED            (0x2000)    /* RESERVED */
2883
//#define RESERVED            (0x4000)    /* RESERVED */
2884
//#define RESERVED            (0x8000)    /* RESERVED */
2885
 
2886
/* UCSCTL1 Control Bits */
2887
#define DISMOD_L               (0x0001)       /* Disable Modulation */
2888
//#define RESERVED            (0x0002)    /* RESERVED */
2889
//#define RESERVED            (0x0004)    /* RESERVED */
2890
//#define RESERVED            (0x0008)    /* RESERVED */
2891
#define DCORSEL0_L             (0x0010)       /* DCO Freq. Range Select Bit : 0 */
2892
#define DCORSEL1_L             (0x0020)       /* DCO Freq. Range Select Bit : 1 */
2893
#define DCORSEL2_L             (0x0040)       /* DCO Freq. Range Select Bit : 2 */
2894
//#define RESERVED            (0x0080)    /* RESERVED */
2895
//#define RESERVED            (0x0100)    /* RESERVED */
2896
//#define RESERVED            (0x0200)    /* RESERVED */
2897
//#define RESERVED            (0x0400)    /* RESERVED */
2898
//#define RESERVED            (0x0800)    /* RESERVED */
2899
//#define RESERVED            (0x1000)    /* RESERVED */
2900
//#define RESERVED            (0x2000)    /* RESERVED */
2901
//#define RESERVED            (0x4000)    /* RESERVED */
2902
//#define RESERVED            (0x8000)    /* RESERVED */
2903
 
2904
/* UCSCTL1 Control Bits */
2905
//#define RESERVED            (0x0002)    /* RESERVED */
2906
//#define RESERVED            (0x0004)    /* RESERVED */
2907
//#define RESERVED            (0x0008)    /* RESERVED */
2908
//#define RESERVED            (0x0080)    /* RESERVED */
2909
//#define RESERVED            (0x0100)    /* RESERVED */
2910
//#define RESERVED            (0x0200)    /* RESERVED */
2911
//#define RESERVED            (0x0400)    /* RESERVED */
2912
//#define RESERVED            (0x0800)    /* RESERVED */
2913
//#define RESERVED            (0x1000)    /* RESERVED */
2914
//#define RESERVED            (0x2000)    /* RESERVED */
2915
//#define RESERVED            (0x4000)    /* RESERVED */
2916
//#define RESERVED            (0x8000)    /* RESERVED */
2917
 
2918
#define DCORSEL_0              (0x0000)       /* DCO RSEL 0 */
2919
#define DCORSEL_1              (0x0010)       /* DCO RSEL 1 */
2920
#define DCORSEL_2              (0x0020)       /* DCO RSEL 2 */
2921
#define DCORSEL_3              (0x0030)       /* DCO RSEL 3 */
2922
#define DCORSEL_4              (0x0040)       /* DCO RSEL 4 */
2923
#define DCORSEL_5              (0x0050)       /* DCO RSEL 5 */
2924
#define DCORSEL_6              (0x0060)       /* DCO RSEL 6 */
2925
#define DCORSEL_7              (0x0070)       /* DCO RSEL 7 */
2926
 
2927
/* UCSCTL2 Control Bits */
2928
#define FLLN0                  (0x0001)       /* FLL Multipier Bit : 0 */
2929
#define FLLN1                  (0x0002)       /* FLL Multipier Bit : 1 */
2930
#define FLLN2                  (0x0004)       /* FLL Multipier Bit : 2 */
2931
#define FLLN3                  (0x0008)       /* FLL Multipier Bit : 3 */
2932
#define FLLN4                  (0x0010)       /* FLL Multipier Bit : 4 */
2933
#define FLLN5                  (0x0020)       /* FLL Multipier Bit : 5 */
2934
#define FLLN6                  (0x0040)       /* FLL Multipier Bit : 6 */
2935
#define FLLN7                  (0x0080)       /* FLL Multipier Bit : 7 */
2936
#define FLLN8                  (0x0100)       /* FLL Multipier Bit : 8 */
2937
#define FLLN9                  (0x0200)       /* FLL Multipier Bit : 9 */
2938
//#define RESERVED            (0x0400)    /* RESERVED */
2939
//#define RESERVED            (0x0800)    /* RESERVED */
2940
#define FLLD0                  (0x1000)       /* Loop Divider Bit : 0 */
2941
#define FLLD1                  (0x2000)       /* Loop Divider Bit : 1 */
2942
#define FLLD2                  (0x4000)       /* Loop Divider Bit : 1 */
2943
//#define RESERVED            (0x8000)    /* RESERVED */
2944
 
2945
/* UCSCTL2 Control Bits */
2946
#define FLLN0_L                (0x0001)       /* FLL Multipier Bit : 0 */
2947
#define FLLN1_L                (0x0002)       /* FLL Multipier Bit : 1 */
2948
#define FLLN2_L                (0x0004)       /* FLL Multipier Bit : 2 */
2949
#define FLLN3_L                (0x0008)       /* FLL Multipier Bit : 3 */
2950
#define FLLN4_L                (0x0010)       /* FLL Multipier Bit : 4 */
2951
#define FLLN5_L                (0x0020)       /* FLL Multipier Bit : 5 */
2952
#define FLLN6_L                (0x0040)       /* FLL Multipier Bit : 6 */
2953
#define FLLN7_L                (0x0080)       /* FLL Multipier Bit : 7 */
2954
//#define RESERVED            (0x0400)    /* RESERVED */
2955
//#define RESERVED            (0x0800)    /* RESERVED */
2956
//#define RESERVED            (0x8000)    /* RESERVED */
2957
 
2958
/* UCSCTL2 Control Bits */
2959
#define FLLN8_H                (0x0001)       /* FLL Multipier Bit : 8 */
2960
#define FLLN9_H                (0x0002)       /* FLL Multipier Bit : 9 */
2961
//#define RESERVED            (0x0400)    /* RESERVED */
2962
//#define RESERVED            (0x0800)    /* RESERVED */
2963
#define FLLD0_H                (0x0010)       /* Loop Divider Bit : 0 */
2964
#define FLLD1_H                (0x0020)       /* Loop Divider Bit : 1 */
2965
#define FLLD2_H                (0x0040)       /* Loop Divider Bit : 1 */
2966
//#define RESERVED            (0x8000)    /* RESERVED */
2967
 
2968
#define FLLD_0                 (0x0000)       /* Multiply Selected Loop Freq. 1 */
2969
#define FLLD_1                 (0x1000)       /* Multiply Selected Loop Freq. 2 */
2970
#define FLLD_2                 (0x2000)       /* Multiply Selected Loop Freq. 4 */
2971
#define FLLD_3                 (0x3000)       /* Multiply Selected Loop Freq. 8 */
2972
#define FLLD_4                 (0x4000)       /* Multiply Selected Loop Freq. 16 */
2973
#define FLLD_5                 (0x5000)       /* Multiply Selected Loop Freq. 32 */
2974
#define FLLD_6                 (0x6000)       /* Multiply Selected Loop Freq. 32 */
2975
#define FLLD_7                 (0x7000)       /* Multiply Selected Loop Freq. 32 */
2976
#define FLLD__1                (0x0000)       /* Multiply Selected Loop Freq. By 1 */
2977
#define FLLD__2                (0x1000)       /* Multiply Selected Loop Freq. By 2 */
2978
#define FLLD__4                (0x2000)       /* Multiply Selected Loop Freq. By 4 */
2979
#define FLLD__8                (0x3000)       /* Multiply Selected Loop Freq. By 8 */
2980
#define FLLD__16               (0x4000)       /* Multiply Selected Loop Freq. By 16 */
2981
#define FLLD__32               (0x5000)       /* Multiply Selected Loop Freq. By 32 */
2982
 
2983
/* UCSCTL3 Control Bits */
2984
#define FLLREFDIV0             (0x0001)       /* Reference Divider Bit : 0 */
2985
#define FLLREFDIV1             (0x0002)       /* Reference Divider Bit : 1 */
2986
#define FLLREFDIV2             (0x0004)       /* Reference Divider Bit : 2 */
2987
//#define RESERVED            (0x0008)    /* RESERVED */
2988
#define SELREF0                (0x0010)       /* FLL Reference Clock Select Bit : 0 */
2989
#define SELREF1                (0x0020)       /* FLL Reference Clock Select Bit : 1 */
2990
#define SELREF2                (0x0040)       /* FLL Reference Clock Select Bit : 2 */
2991
//#define RESERVED            (0x0080)    /* RESERVED */
2992
//#define RESERVED            (0x0100)    /* RESERVED */
2993
//#define RESERVED            (0x0200)    /* RESERVED */
2994
//#define RESERVED            (0x0400)    /* RESERVED */
2995
//#define RESERVED            (0x0800)    /* RESERVED */
2996
//#define RESERVED            (0x1000)    /* RESERVED */
2997
//#define RESERVED            (0x2000)    /* RESERVED */
2998
//#define RESERVED            (0x4000)    /* RESERVED */
2999
//#define RESERVED            (0x8000)    /* RESERVED */
3000
 
3001
/* UCSCTL3 Control Bits */
3002
#define FLLREFDIV0_L           (0x0001)       /* Reference Divider Bit : 0 */
3003
#define FLLREFDIV1_L           (0x0002)       /* Reference Divider Bit : 1 */
3004
#define FLLREFDIV2_L           (0x0004)       /* Reference Divider Bit : 2 */
3005
//#define RESERVED            (0x0008)    /* RESERVED */
3006
#define SELREF0_L              (0x0010)       /* FLL Reference Clock Select Bit : 0 */
3007
#define SELREF1_L              (0x0020)       /* FLL Reference Clock Select Bit : 1 */
3008
#define SELREF2_L              (0x0040)       /* FLL Reference Clock Select Bit : 2 */
3009
//#define RESERVED            (0x0080)    /* RESERVED */
3010
//#define RESERVED            (0x0100)    /* RESERVED */
3011
//#define RESERVED            (0x0200)    /* RESERVED */
3012
//#define RESERVED            (0x0400)    /* RESERVED */
3013
//#define RESERVED            (0x0800)    /* RESERVED */
3014
//#define RESERVED            (0x1000)    /* RESERVED */
3015
//#define RESERVED            (0x2000)    /* RESERVED */
3016
//#define RESERVED            (0x4000)    /* RESERVED */
3017
//#define RESERVED            (0x8000)    /* RESERVED */
3018
 
3019
/* UCSCTL3 Control Bits */
3020
//#define RESERVED            (0x0008)    /* RESERVED */
3021
//#define RESERVED            (0x0080)    /* RESERVED */
3022
//#define RESERVED            (0x0100)    /* RESERVED */
3023
//#define RESERVED            (0x0200)    /* RESERVED */
3024
//#define RESERVED            (0x0400)    /* RESERVED */
3025
//#define RESERVED            (0x0800)    /* RESERVED */
3026
//#define RESERVED            (0x1000)    /* RESERVED */
3027
//#define RESERVED            (0x2000)    /* RESERVED */
3028
//#define RESERVED            (0x4000)    /* RESERVED */
3029
//#define RESERVED            (0x8000)    /* RESERVED */
3030
 
3031
#define FLLREFDIV_0            (0x0000)       /* Reference Divider: f(LFCLK)/1 */
3032
#define FLLREFDIV_1            (0x0001)       /* Reference Divider: f(LFCLK)/2 */
3033
#define FLLREFDIV_2            (0x0002)       /* Reference Divider: f(LFCLK)/4 */
3034
#define FLLREFDIV_3            (0x0003)       /* Reference Divider: f(LFCLK)/8 */
3035
#define FLLREFDIV_4            (0x0004)       /* Reference Divider: f(LFCLK)/12 */
3036
#define FLLREFDIV_5            (0x0005)       /* Reference Divider: f(LFCLK)/16 */
3037
#define FLLREFDIV_6            (0x0006)       /* Reference Divider: f(LFCLK)/16 */
3038
#define FLLREFDIV_7            (0x0007)       /* Reference Divider: f(LFCLK)/16 */
3039
#define FLLREFDIV__1           (0x0000)       /* Reference Divider: f(LFCLK)/1 */
3040
#define FLLREFDIV__2           (0x0001)       /* Reference Divider: f(LFCLK)/2 */
3041
#define FLLREFDIV__4           (0x0002)       /* Reference Divider: f(LFCLK)/4 */
3042
#define FLLREFDIV__8           (0x0003)       /* Reference Divider: f(LFCLK)/8 */
3043
#define FLLREFDIV__12          (0x0004)       /* Reference Divider: f(LFCLK)/12 */
3044
#define FLLREFDIV__16          (0x0005)       /* Reference Divider: f(LFCLK)/16 */
3045
#define SELREF_0               (0x0000)       /* FLL Reference Clock Select 0 */
3046
#define SELREF_1               (0x0010)       /* FLL Reference Clock Select 1 */
3047
#define SELREF_2               (0x0020)       /* FLL Reference Clock Select 2 */
3048
#define SELREF_3               (0x0030)       /* FLL Reference Clock Select 3 */
3049
#define SELREF_4               (0x0040)       /* FLL Reference Clock Select 4 */
3050
#define SELREF_5               (0x0050)       /* FLL Reference Clock Select 5 */
3051
#define SELREF_6               (0x0060)       /* FLL Reference Clock Select 6 */
3052
#define SELREF_7               (0x0070)       /* FLL Reference Clock Select 7 */
3053
#define SELREF__XT1CLK         (0x0000)       /* Multiply Selected Loop Freq. By XT1CLK */
3054
#define SELREF__REFOCLK        (0x0020)       /* Multiply Selected Loop Freq. By REFOCLK */
3055
 
3056
/* UCSCTL4 Control Bits */
3057
#define SELM0                  (0x0001)       /* MCLK Source Select Bit: 0 */
3058
#define SELM1                  (0x0002)       /* MCLK Source Select Bit: 1 */
3059
#define SELM2                  (0x0004)       /* MCLK Source Select Bit: 2 */
3060
//#define RESERVED            (0x0008)    /* RESERVED */
3061
#define SELS0                  (0x0010)       /* SMCLK Source Select Bit: 0 */
3062
#define SELS1                  (0x0020)       /* SMCLK Source Select Bit: 1 */
3063
#define SELS2                  (0x0040)       /* SMCLK Source Select Bit: 2 */
3064
//#define RESERVED            (0x0080)    /* RESERVED */
3065
#define SELA0                  (0x0100)       /* ACLK Source Select Bit: 0 */
3066
#define SELA1                  (0x0200)       /* ACLK Source Select Bit: 1 */
3067
#define SELA2                  (0x0400)       /* ACLK Source Select Bit: 2 */
3068
//#define RESERVED            (0x0800)    /* RESERVED */
3069
//#define RESERVED            (0x1000)    /* RESERVED */
3070
//#define RESERVED            (0x2000)    /* RESERVED */
3071
//#define RESERVED            (0x4000)    /* RESERVED */
3072
//#define RESERVED            (0x8000)    /* RESERVED */
3073
 
3074
/* UCSCTL4 Control Bits */
3075
#define SELM0_L                (0x0001)       /* MCLK Source Select Bit: 0 */
3076
#define SELM1_L                (0x0002)       /* MCLK Source Select Bit: 1 */
3077
#define SELM2_L                (0x0004)       /* MCLK Source Select Bit: 2 */
3078
//#define RESERVED            (0x0008)    /* RESERVED */
3079
#define SELS0_L                (0x0010)       /* SMCLK Source Select Bit: 0 */
3080
#define SELS1_L                (0x0020)       /* SMCLK Source Select Bit: 1 */
3081
#define SELS2_L                (0x0040)       /* SMCLK Source Select Bit: 2 */
3082
//#define RESERVED            (0x0080)    /* RESERVED */
3083
//#define RESERVED            (0x0800)    /* RESERVED */
3084
//#define RESERVED            (0x1000)    /* RESERVED */
3085
//#define RESERVED            (0x2000)    /* RESERVED */
3086
//#define RESERVED            (0x4000)    /* RESERVED */
3087
//#define RESERVED            (0x8000)    /* RESERVED */
3088
 
3089
/* UCSCTL4 Control Bits */
3090
//#define RESERVED            (0x0008)    /* RESERVED */
3091
//#define RESERVED            (0x0080)    /* RESERVED */
3092
#define SELA0_H                (0x0001)       /* ACLK Source Select Bit: 0 */
3093
#define SELA1_H                (0x0002)       /* ACLK Source Select Bit: 1 */
3094
#define SELA2_H                (0x0004)       /* ACLK Source Select Bit: 2 */
3095
//#define RESERVED            (0x0800)    /* RESERVED */
3096
//#define RESERVED            (0x1000)    /* RESERVED */
3097
//#define RESERVED            (0x2000)    /* RESERVED */
3098
//#define RESERVED            (0x4000)    /* RESERVED */
3099
//#define RESERVED            (0x8000)    /* RESERVED */
3100
 
3101
#define SELM_0                 (0x0000)       /* MCLK Source Select 0 */
3102
#define SELM_1                 (0x0001)       /* MCLK Source Select 1 */
3103
#define SELM_2                 (0x0002)       /* MCLK Source Select 2 */
3104
#define SELM_3                 (0x0003)       /* MCLK Source Select 3 */
3105
#define SELM_4                 (0x0004)       /* MCLK Source Select 4 */
3106
#define SELM_5                 (0x0005)       /* MCLK Source Select 5 */
3107
#define SELM_6                 (0x0006)       /* MCLK Source Select 6 */
3108
#define SELM_7                 (0x0007)       /* MCLK Source Select 7 */
3109
#define SELM__XT1CLK           (0x0000)       /* MCLK Source Select XT1CLK */
3110
#define SELM__VLOCLK           (0x0001)       /* MCLK Source Select VLOCLK */
3111
#define SELM__REFOCLK          (0x0002)       /* MCLK Source Select REFOCLK */
3112
#define SELM__DCOCLK           (0x0003)       /* MCLK Source Select DCOCLK */
3113
#define SELM__DCOCLKDIV        (0x0004)       /* MCLK Source Select DCOCLKDIV */
3114
 
3115
#define SELS_0                 (0x0000)       /* SMCLK Source Select 0 */
3116
#define SELS_1                 (0x0010)       /* SMCLK Source Select 1 */
3117
#define SELS_2                 (0x0020)       /* SMCLK Source Select 2 */
3118
#define SELS_3                 (0x0030)       /* SMCLK Source Select 3 */
3119
#define SELS_4                 (0x0040)       /* SMCLK Source Select 4 */
3120
#define SELS_5                 (0x0050)       /* SMCLK Source Select 5 */
3121
#define SELS_6                 (0x0060)       /* SMCLK Source Select 6 */
3122
#define SELS_7                 (0x0070)       /* SMCLK Source Select 7 */
3123
#define SELS__XT1CLK           (0x0000)       /* SMCLK Source Select XT1CLK */
3124
#define SELS__VLOCLK           (0x0010)       /* SMCLK Source Select VLOCLK */
3125
#define SELS__REFOCLK          (0x0020)       /* SMCLK Source Select REFOCLK */
3126
#define SELS__DCOCLK           (0x0030)       /* SMCLK Source Select DCOCLK */
3127
#define SELS__DCOCLKDIV        (0x0040)       /* SMCLK Source Select DCOCLKDIV */
3128
 
3129
#define SELA_0                 (0x0000)       /* ACLK Source Select 0 */
3130
#define SELA_1                 (0x0100)       /* ACLK Source Select 1 */
3131
#define SELA_2                 (0x0200)       /* ACLK Source Select 2 */
3132
#define SELA_3                 (0x0300)       /* ACLK Source Select 3 */
3133
#define SELA_4                 (0x0400)       /* ACLK Source Select 4 */
3134
#define SELA_5                 (0x0500)       /* ACLK Source Select 5 */
3135
#define SELA_6                 (0x0600)       /* ACLK Source Select 6 */
3136
#define SELA_7                 (0x0700)       /* ACLK Source Select 7 */
3137
#define SELA__XT1CLK           (0x0000)       /* ACLK Source Select XT1CLK */
3138
#define SELA__VLOCLK           (0x0100)       /* ACLK Source Select VLOCLK */
3139
#define SELA__REFOCLK          (0x0200)       /* ACLK Source Select REFOCLK */
3140
#define SELA__DCOCLK           (0x0300)       /* ACLK Source Select DCOCLK */
3141
#define SELA__DCOCLKDIV        (0x0400)       /* ACLK Source Select DCOCLKDIV */
3142
 
3143
/* UCSCTL5 Control Bits */
3144
#define DIVM0                  (0x0001)       /* MCLK Divider Bit: 0 */
3145
#define DIVM1                  (0x0002)       /* MCLK Divider Bit: 1 */
3146
#define DIVM2                  (0x0004)       /* MCLK Divider Bit: 2 */
3147
//#define RESERVED            (0x0008)    /* RESERVED */
3148
#define DIVS0                  (0x0010)       /* SMCLK Divider Bit: 0 */
3149
#define DIVS1                  (0x0020)       /* SMCLK Divider Bit: 1 */
3150
#define DIVS2                  (0x0040)       /* SMCLK Divider Bit: 2 */
3151
//#define RESERVED            (0x0080)    /* RESERVED */
3152
#define DIVA0                  (0x0100)       /* ACLK Divider Bit: 0 */
3153
#define DIVA1                  (0x0200)       /* ACLK Divider Bit: 1 */
3154
#define DIVA2                  (0x0400)       /* ACLK Divider Bit: 2 */
3155
//#define RESERVED            (0x0800)    /* RESERVED */
3156
#define DIVPA0                 (0x1000)       /* ACLK from Pin Divider Bit: 0 */
3157
#define DIVPA1                 (0x2000)       /* ACLK from Pin Divider Bit: 1 */
3158
#define DIVPA2                 (0x4000)       /* ACLK from Pin Divider Bit: 2 */
3159
//#define RESERVED            (0x8000)    /* RESERVED */
3160
 
3161
/* UCSCTL5 Control Bits */
3162
#define DIVM0_L                (0x0001)       /* MCLK Divider Bit: 0 */
3163
#define DIVM1_L                (0x0002)       /* MCLK Divider Bit: 1 */
3164
#define DIVM2_L                (0x0004)       /* MCLK Divider Bit: 2 */
3165
//#define RESERVED            (0x0008)    /* RESERVED */
3166
#define DIVS0_L                (0x0010)       /* SMCLK Divider Bit: 0 */
3167
#define DIVS1_L                (0x0020)       /* SMCLK Divider Bit: 1 */
3168
#define DIVS2_L                (0x0040)       /* SMCLK Divider Bit: 2 */
3169
//#define RESERVED            (0x0080)    /* RESERVED */
3170
//#define RESERVED            (0x0800)    /* RESERVED */
3171
//#define RESERVED            (0x8000)    /* RESERVED */
3172
 
3173
/* UCSCTL5 Control Bits */
3174
//#define RESERVED            (0x0008)    /* RESERVED */
3175
//#define RESERVED            (0x0080)    /* RESERVED */
3176
#define DIVA0_H                (0x0001)       /* ACLK Divider Bit: 0 */
3177
#define DIVA1_H                (0x0002)       /* ACLK Divider Bit: 1 */
3178
#define DIVA2_H                (0x0004)       /* ACLK Divider Bit: 2 */
3179
//#define RESERVED            (0x0800)    /* RESERVED */
3180
#define DIVPA0_H               (0x0010)       /* ACLK from Pin Divider Bit: 0 */
3181
#define DIVPA1_H               (0x0020)       /* ACLK from Pin Divider Bit: 1 */
3182
#define DIVPA2_H               (0x0040)       /* ACLK from Pin Divider Bit: 2 */
3183
//#define RESERVED            (0x8000)    /* RESERVED */
3184
 
3185
#define DIVM_0                 (0x0000)       /* MCLK Source Divider 0 */
3186
#define DIVM_1                 (0x0001)       /* MCLK Source Divider 1 */
3187
#define DIVM_2                 (0x0002)       /* MCLK Source Divider 2 */
3188
#define DIVM_3                 (0x0003)       /* MCLK Source Divider 3 */
3189
#define DIVM_4                 (0x0004)       /* MCLK Source Divider 4 */
3190
#define DIVM_5                 (0x0005)       /* MCLK Source Divider 5 */
3191
#define DIVM_6                 (0x0006)       /* MCLK Source Divider 6 */
3192
#define DIVM_7                 (0x0007)       /* MCLK Source Divider 7 */
3193
#define DIVM__1                (0x0000)       /* MCLK Source Divider f(MCLK)/1 */
3194
#define DIVM__2                (0x0001)       /* MCLK Source Divider f(MCLK)/2 */
3195
#define DIVM__4                (0x0002)       /* MCLK Source Divider f(MCLK)/4 */
3196
#define DIVM__8                (0x0003)       /* MCLK Source Divider f(MCLK)/8 */
3197
#define DIVM__16               (0x0004)       /* MCLK Source Divider f(MCLK)/16 */
3198
#define DIVM__32               (0x0005)       /* MCLK Source Divider f(MCLK)/32 */
3199
 
3200
#define DIVS_0                 (0x0000)       /* SMCLK Source Divider 0 */
3201
#define DIVS_1                 (0x0010)       /* SMCLK Source Divider 1 */
3202
#define DIVS_2                 (0x0020)       /* SMCLK Source Divider 2 */
3203
#define DIVS_3                 (0x0030)       /* SMCLK Source Divider 3 */
3204
#define DIVS_4                 (0x0040)       /* SMCLK Source Divider 4 */
3205
#define DIVS_5                 (0x0050)       /* SMCLK Source Divider 5 */
3206
#define DIVS_6                 (0x0060)       /* SMCLK Source Divider 6 */
3207
#define DIVS_7                 (0x0070)       /* SMCLK Source Divider 7 */
3208
#define DIVS__1                (0x0000)       /* SMCLK Source Divider f(SMCLK)/1 */
3209
#define DIVS__2                (0x0010)       /* SMCLK Source Divider f(SMCLK)/2 */
3210
#define DIVS__4                (0x0020)       /* SMCLK Source Divider f(SMCLK)/4 */
3211
#define DIVS__8                (0x0030)       /* SMCLK Source Divider f(SMCLK)/8 */
3212
#define DIVS__16               (0x0040)       /* SMCLK Source Divider f(SMCLK)/16 */
3213
#define DIVS__32               (0x0050)       /* SMCLK Source Divider f(SMCLK)/32 */
3214
 
3215
#define DIVA_0                 (0x0000)       /* ACLK Source Divider 0 */
3216
#define DIVA_1                 (0x0100)       /* ACLK Source Divider 1 */
3217
#define DIVA_2                 (0x0200)       /* ACLK Source Divider 2 */
3218
#define DIVA_3                 (0x0300)       /* ACLK Source Divider 3 */
3219
#define DIVA_4                 (0x0400)       /* ACLK Source Divider 4 */
3220
#define DIVA_5                 (0x0500)       /* ACLK Source Divider 5 */
3221
#define DIVA_6                 (0x0600)       /* ACLK Source Divider 6 */
3222
#define DIVA_7                 (0x0700)       /* ACLK Source Divider 7 */
3223
#define DIVA__1                (0x0000)       /* ACLK Source Divider f(ACLK)/1 */
3224
#define DIVA__2                (0x0100)       /* ACLK Source Divider f(ACLK)/2 */
3225
#define DIVA__4                (0x0200)       /* ACLK Source Divider f(ACLK)/4 */
3226
#define DIVA__8                (0x0300)       /* ACLK Source Divider f(ACLK)/8 */
3227
#define DIVA__16               (0x0400)       /* ACLK Source Divider f(ACLK)/16 */
3228
#define DIVA__32               (0x0500)       /* ACLK Source Divider f(ACLK)/32 */
3229
 
3230
#define DIVPA_0                (0x0000)       /* ACLK from Pin Source Divider 0 */
3231
#define DIVPA_1                (0x1000)       /* ACLK from Pin Source Divider 1 */
3232
#define DIVPA_2                (0x2000)       /* ACLK from Pin Source Divider 2 */
3233
#define DIVPA_3                (0x3000)       /* ACLK from Pin Source Divider 3 */
3234
#define DIVPA_4                (0x4000)       /* ACLK from Pin Source Divider 4 */
3235
#define DIVPA_5                (0x5000)       /* ACLK from Pin Source Divider 5 */
3236
#define DIVPA_6                (0x6000)       /* ACLK from Pin Source Divider 6 */
3237
#define DIVPA_7                (0x7000)       /* ACLK from Pin Source Divider 7 */
3238
#define DIVPA__1               (0x0000)       /* ACLK from Pin Source Divider f(ACLK)/1 */
3239
#define DIVPA__2               (0x1000)       /* ACLK from Pin Source Divider f(ACLK)/2 */
3240
#define DIVPA__4               (0x2000)       /* ACLK from Pin Source Divider f(ACLK)/4 */
3241
#define DIVPA__8               (0x3000)       /* ACLK from Pin Source Divider f(ACLK)/8 */
3242
#define DIVPA__16              (0x4000)       /* ACLK from Pin Source Divider f(ACLK)/16 */
3243
#define DIVPA__32              (0x5000)       /* ACLK from Pin Source Divider f(ACLK)/32 */
3244
 
3245
/* UCSCTL6 Control Bits */
3246
#define XT1OFF                 (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
3247
#define SMCLKOFF               (0x0002)       /* SMCLK Off */
3248
#define XCAP0                  (0x0004)       /* XIN/XOUT Cap Bit: 0 */
3249
#define XCAP1                  (0x0008)       /* XIN/XOUT Cap Bit: 1 */
3250
#define XT1BYPASS              (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
3251
#define XTS                    (0x0020)       /* 1: Selects high-freq. oscillator */
3252
#define XT1DRIVE0              (0x0040)       /* XT1 Drive Level mode Bit 0 */
3253
#define XT1DRIVE1              (0x0080)       /* XT1 Drive Level mode Bit 1 */
3254
#define XT2OFF                 (0x0100)       /* High Frequency Oscillator 2 (XT2) disable */
3255
//#define RESERVED            (0x0200)    /* RESERVED */
3256
//#define RESERVED            (0x0400)    /* RESERVED */
3257
//#define RESERVED            (0x0800)    /* RESERVED */
3258
//#define RESERVED            (0x1000)    /* RESERVED */
3259
//#define RESERVED            (0x2000)    /* RESERVED */
3260
//#define RESERVED            (0x4000)    /* RESERVED */
3261
//#define RESERVED            (0x8000)    /* RESERVED */
3262
 
3263
/* UCSCTL6 Control Bits */
3264
#define XT1OFF_L               (0x0001)       /* High Frequency Oscillator 1 (XT1) disable */
3265
#define SMCLKOFF_L             (0x0002)       /* SMCLK Off */
3266
#define XCAP0_L                (0x0004)       /* XIN/XOUT Cap Bit: 0 */
3267
#define XCAP1_L                (0x0008)       /* XIN/XOUT Cap Bit: 1 */
3268
#define XT1BYPASS_L            (0x0010)       /* XT1 bypass mode : 0: internal 1:sourced from external pin */
3269
#define XTS_L                  (0x0020)       /* 1: Selects high-freq. oscillator */
3270
#define XT1DRIVE0_L            (0x0040)       /* XT1 Drive Level mode Bit 0 */
3271
#define XT1DRIVE1_L            (0x0080)       /* XT1 Drive Level mode Bit 1 */
3272
//#define RESERVED            (0x0200)    /* RESERVED */
3273
//#define RESERVED            (0x0400)    /* RESERVED */
3274
//#define RESERVED            (0x0800)    /* RESERVED */
3275
//#define RESERVED            (0x1000)    /* RESERVED */
3276
//#define RESERVED            (0x2000)    /* RESERVED */
3277
//#define RESERVED            (0x4000)    /* RESERVED */
3278
//#define RESERVED            (0x8000)    /* RESERVED */
3279
 
3280
/* UCSCTL6 Control Bits */
3281
#define XT2OFF_H               (0x0001)       /* High Frequency Oscillator 2 (XT2) disable */
3282
//#define RESERVED            (0x0200)    /* RESERVED */
3283
//#define RESERVED            (0x0400)    /* RESERVED */
3284
//#define RESERVED            (0x0800)    /* RESERVED */
3285
//#define RESERVED            (0x1000)    /* RESERVED */
3286
//#define RESERVED            (0x2000)    /* RESERVED */
3287
//#define RESERVED            (0x4000)    /* RESERVED */
3288
//#define RESERVED            (0x8000)    /* RESERVED */
3289
 
3290
#define XCAP_0                 (0x0000)       /* XIN/XOUT Cap 0 */
3291
#define XCAP_1                 (0x0004)       /* XIN/XOUT Cap 1 */
3292
#define XCAP_2                 (0x0008)       /* XIN/XOUT Cap 2 */
3293
#define XCAP_3                 (0x000C)       /* XIN/XOUT Cap 3 */
3294
#define XT1DRIVE_0             (0x0000)       /* XT1 Drive Level mode: 0 */
3295
#define XT1DRIVE_1             (0x0040)       /* XT1 Drive Level mode: 1 */
3296
#define XT1DRIVE_2             (0x0080)       /* XT1 Drive Level mode: 2 */
3297
#define XT1DRIVE_3             (0x00C0)       /* XT1 Drive Level mode: 3 */
3298
 
3299
/* UCSCTL7 Control Bits */
3300
#define DCOFFG                 (0x0001)       /* DCO Fault Flag */
3301
#define XT1LFOFFG              (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
3302
#define XT1HFOFFG              (0x0004)       /* XT1 High Frequency Oscillator 1 Fault Flag */
3303
//#define RESERVED            (0x0008)    /* RESERVED */
3304
//#define RESERVED            (0x0010)    /* RESERVED */
3305
//#define RESERVED            (0x0020)    /* RESERVED */
3306
//#define RESERVED            (0x0040)    /* RESERVED */
3307
//#define RESERVED            (0x0080)    /* RESERVED */
3308
//#define RESERVED            (0x0100)    /* RESERVED */
3309
//#define RESERVED            (0x0200)    /* RESERVED */
3310
//#define RESERVED            (0x0400)    /* RESERVED */
3311
//#define RESERVED            (0x0800)    /* RESERVED */
3312
//#define RESERVED            (0x1000)    /* RESERVED */
3313
//#define RESERVED            (0x2000)    /* RESERVED */
3314
//#define RESERVED            (0x4000)    /* RESERVED */
3315
//#define RESERVED            (0x8000)    /* RESERVED */
3316
 
3317
/* UCSCTL7 Control Bits */
3318
#define DCOFFG_L               (0x0001)       /* DCO Fault Flag */
3319
#define XT1LFOFFG_L            (0x0002)       /* XT1 Low Frequency Oscillator Fault Flag */
3320
#define XT1HFOFFG_L            (0x0004)       /* XT1 High Frequency Oscillator 1 Fault Flag */
3321
//#define RESERVED            (0x0008)    /* RESERVED */
3322
//#define RESERVED            (0x0010)    /* RESERVED */
3323
//#define RESERVED            (0x0020)    /* RESERVED */
3324
//#define RESERVED            (0x0040)    /* RESERVED */
3325
//#define RESERVED            (0x0080)    /* RESERVED */
3326
//#define RESERVED            (0x0100)    /* RESERVED */
3327
//#define RESERVED            (0x0200)    /* RESERVED */
3328
//#define RESERVED            (0x0400)    /* RESERVED */
3329
//#define RESERVED            (0x0800)    /* RESERVED */
3330
//#define RESERVED            (0x1000)    /* RESERVED */
3331
//#define RESERVED            (0x2000)    /* RESERVED */
3332
//#define RESERVED            (0x4000)    /* RESERVED */
3333
//#define RESERVED            (0x8000)    /* RESERVED */
3334
 
3335
/* UCSCTL7 Control Bits */
3336
//#define RESERVED            (0x0008)    /* RESERVED */
3337
//#define RESERVED            (0x0010)    /* RESERVED */
3338
//#define RESERVED            (0x0020)    /* RESERVED */
3339
//#define RESERVED            (0x0040)    /* RESERVED */
3340
//#define RESERVED            (0x0080)    /* RESERVED */
3341
//#define RESERVED            (0x0100)    /* RESERVED */
3342
//#define RESERVED            (0x0200)    /* RESERVED */
3343
//#define RESERVED            (0x0400)    /* RESERVED */
3344
//#define RESERVED            (0x0800)    /* RESERVED */
3345
//#define RESERVED            (0x1000)    /* RESERVED */
3346
//#define RESERVED            (0x2000)    /* RESERVED */
3347
//#define RESERVED            (0x4000)    /* RESERVED */
3348
//#define RESERVED            (0x8000)    /* RESERVED */
3349
 
3350
/* UCSCTL8 Control Bits */
3351
#define ACLKREQEN              (0x0001)       /* ACLK Clock Request Enable */
3352
#define MCLKREQEN              (0x0002)       /* MCLK Clock Request Enable */
3353
#define SMCLKREQEN             (0x0004)       /* SMCLK Clock Request Enable */
3354
#define MODOSCREQEN            (0x0008)       /* MODOSC Clock Request Enable */
3355
//#define RESERVED            (0x0010)    /* RESERVED */
3356
//#define RESERVED            (0x0020)    /* RESERVED */
3357
//#define RESERVED            (0x0040)    /* RESERVED */
3358
//#define RESERVED            (0x0080)    /* RESERVED */
3359
//#define RESERVED            (0x0100)    /* RESERVED */
3360
//#define RESERVED            (0x0200)    /* RESERVED */
3361
//#define RESERVED            (0x0400)    /* RESERVED */
3362
//#define RESERVED            (0x0800)    /* RESERVED */
3363
//#define RESERVED            (0x1000)    /* RESERVED */
3364
//#define RESERVED            (0x2000)    /* RESERVED */
3365
//#define RESERVED            (0x4000)    /* RESERVED */
3366
//#define RESERVED            (0x8000)    /* RESERVED */
3367
 
3368
/* UCSCTL8 Control Bits */
3369
#define ACLKREQEN_L            (0x0001)       /* ACLK Clock Request Enable */
3370
#define MCLKREQEN_L            (0x0002)       /* MCLK Clock Request Enable */
3371
#define SMCLKREQEN_L           (0x0004)       /* SMCLK Clock Request Enable */
3372
#define MODOSCREQEN_L          (0x0008)       /* MODOSC Clock Request Enable */
3373
//#define RESERVED            (0x0010)    /* RESERVED */
3374
//#define RESERVED            (0x0020)    /* RESERVED */
3375
//#define RESERVED            (0x0040)    /* RESERVED */
3376
//#define RESERVED            (0x0080)    /* RESERVED */
3377
//#define RESERVED            (0x0100)    /* RESERVED */
3378
//#define RESERVED            (0x0200)    /* RESERVED */
3379
//#define RESERVED            (0x0400)    /* RESERVED */
3380
//#define RESERVED            (0x0800)    /* RESERVED */
3381
//#define RESERVED            (0x1000)    /* RESERVED */
3382
//#define RESERVED            (0x2000)    /* RESERVED */
3383
//#define RESERVED            (0x4000)    /* RESERVED */
3384
//#define RESERVED            (0x8000)    /* RESERVED */
3385
 
3386
/* UCSCTL8 Control Bits */
3387
//#define RESERVED            (0x0010)    /* RESERVED */
3388
//#define RESERVED            (0x0020)    /* RESERVED */
3389
//#define RESERVED            (0x0040)    /* RESERVED */
3390
//#define RESERVED            (0x0080)    /* RESERVED */
3391
//#define RESERVED            (0x0100)    /* RESERVED */
3392
//#define RESERVED            (0x0200)    /* RESERVED */
3393
//#define RESERVED            (0x0400)    /* RESERVED */
3394
//#define RESERVED            (0x0800)    /* RESERVED */
3395
//#define RESERVED            (0x1000)    /* RESERVED */
3396
//#define RESERVED            (0x2000)    /* RESERVED */
3397
//#define RESERVED            (0x4000)    /* RESERVED */
3398
//#define RESERVED            (0x8000)    /* RESERVED */
3399
 
3400
/************************************************************
3401
* USCI A0
3402
************************************************************/
3403
#define __MSP430_HAS_USCI_A0__                /* Definition to show that Module is available */
3404
#define __MSP430_BASEADDRESS_USCI_A0__ 0x05C0
3405
 
3406
SFR_16BIT(UCA0CTLW0);                         /* USCI A0 Control Word Register 0 */
3407
SFR_8BIT(UCA0CTLW0_L);                        /* USCI A0 Control Word Register 0 */
3408
SFR_8BIT(UCA0CTLW0_H);                        /* USCI A0 Control Word Register 0 */
3409
#define UCA0CTL1               UCA0CTLW0_L    /* USCI A0 Control Register 1 */
3410
#define UCA0CTL0               UCA0CTLW0_H    /* USCI A0 Control Register 0 */
3411
SFR_16BIT(UCA0BRW);                           /* USCI A0 Baud Word Rate 0 */
3412
SFR_8BIT(UCA0BRW_L);                          /* USCI A0 Baud Word Rate 0 */
3413
SFR_8BIT(UCA0BRW_H);                          /* USCI A0 Baud Word Rate 0 */
3414
#define UCA0BR0                UCA0BRW_L      /* USCI A0 Baud Rate 0 */
3415
#define UCA0BR1                UCA0BRW_H      /* USCI A0 Baud Rate 1 */
3416
SFR_8BIT(UCA0MCTL);                           /* USCI A0 Modulation Control */
3417
SFR_8BIT(UCA0STAT);                           /* USCI A0 Status Register */
3418
SFR_8BIT(UCA0RXBUF);                          /* USCI A0 Receive Buffer */
3419
SFR_8BIT(UCA0TXBUF);                          /* USCI A0 Transmit Buffer */
3420
SFR_8BIT(UCA0ABCTL);                          /* USCI A0 LIN Control */
3421
SFR_16BIT(UCA0IRCTL);                         /* USCI A0 IrDA Transmit Control */
3422
SFR_8BIT(UCA0IRCTL_L);                        /* USCI A0 IrDA Transmit Control */
3423
SFR_8BIT(UCA0IRCTL_H);                        /* USCI A0 IrDA Transmit Control */
3424
#define UCA0IRTCTL             UCA0IRCTL_L    /* USCI A0 IrDA Transmit Control */
3425
#define UCA0IRRCTL             UCA0IRCTL_H    /* USCI A0 IrDA Receive Control */
3426
SFR_16BIT(UCA0ICTL);                          /* USCI A0 Interrupt Enable Register */
3427
SFR_8BIT(UCA0ICTL_L);                         /* USCI A0 Interrupt Enable Register */
3428
SFR_8BIT(UCA0ICTL_H);                         /* USCI A0 Interrupt Enable Register */
3429
#define UCA0IE                 UCA0ICTL_L     /* USCI A0 Interrupt Enable Register */
3430
#define UCA0IFG                UCA0ICTL_H     /* USCI A0 Interrupt Flags Register */
3431
SFR_16BIT(UCA0IV);                            /* USCI A0 Interrupt Vector Register */
3432
 
3433
 
3434
/************************************************************
3435
* USCI B0
3436
************************************************************/
3437
#define __MSP430_HAS_USCI_B0__                /* Definition to show that Module is available */
3438
#define __MSP430_BASEADDRESS_USCI_B0__ 0x05E0
3439
 
3440
 
3441
SFR_16BIT(UCB0CTLW0);                         /* USCI B0 Control Word Register 0 */
3442
SFR_8BIT(UCB0CTLW0_L);                        /* USCI B0 Control Word Register 0 */
3443
SFR_8BIT(UCB0CTLW0_H);                        /* USCI B0 Control Word Register 0 */
3444
#define UCB0CTL1               UCB0CTLW0_L    /* USCI B0 Control Register 1 */
3445
#define UCB0CTL0               UCB0CTLW0_H    /* USCI B0 Control Register 0 */
3446
SFR_16BIT(UCB0BRW);                           /* USCI B0 Baud Word Rate 0 */
3447
SFR_8BIT(UCB0BRW_L);                          /* USCI B0 Baud Word Rate 0 */
3448
SFR_8BIT(UCB0BRW_H);                          /* USCI B0 Baud Word Rate 0 */
3449
#define UCB0BR0                UCB0BRW_L      /* USCI B0 Baud Rate 0 */
3450
#define UCB0BR1                UCB0BRW_H      /* USCI B0 Baud Rate 1 */
3451
SFR_8BIT(UCB0STAT);                           /* USCI B0 Status Register */
3452
SFR_8BIT(UCB0RXBUF);                          /* USCI B0 Receive Buffer */
3453
SFR_8BIT(UCB0TXBUF);                          /* USCI B0 Transmit Buffer */
3454
SFR_16BIT(UCB0I2COA);                         /* USCI B0 I2C Own Address */
3455
SFR_8BIT(UCB0I2COA_L);                        /* USCI B0 I2C Own Address */
3456
SFR_8BIT(UCB0I2COA_H);                        /* USCI B0 I2C Own Address */
3457
SFR_16BIT(UCB0I2CSA);                         /* USCI B0 I2C Slave Address */
3458
SFR_8BIT(UCB0I2CSA_L);                        /* USCI B0 I2C Slave Address */
3459
SFR_8BIT(UCB0I2CSA_H);                        /* USCI B0 I2C Slave Address */
3460
SFR_16BIT(UCB0ICTL);                          /* USCI B0 Interrupt Enable Register */
3461
SFR_8BIT(UCB0ICTL_L);                         /* USCI B0 Interrupt Enable Register */
3462
SFR_8BIT(UCB0ICTL_H);                         /* USCI B0 Interrupt Enable Register */
3463
#define UCB0IE                 UCB0ICTL_L     /* USCI B0 Interrupt Enable Register */
3464
#define UCB0IFG                UCB0ICTL_H     /* USCI B0 Interrupt Flags Register */
3465
SFR_16BIT(UCB0IV);                            /* USCI B0 Interrupt Vector Register */
3466
 
3467
// UCAxCTL0 UART-Mode Control Bits
3468
#define UCPEN                  (0x80)         /* Async. Mode: Parity enable */
3469
#define UCPAR                  (0x40)         /* Async. Mode: Parity     0:odd / 1:even */
3470
#define UCMSB                  (0x20)         /* Async. Mode: MSB first  0:LSB / 1:MSB */
3471
#define UC7BIT                 (0x10)         /* Async. Mode: Data Bits  0:8-bits / 1:7-bits */
3472
#define UCSPB                  (0x08)         /* Async. Mode: Stop Bits  0:one / 1: two */
3473
#define UCMODE1                (0x04)         /* Async. Mode: USCI Mode 1 */
3474
#define UCMODE0                (0x02)         /* Async. Mode: USCI Mode 0 */
3475
#define UCSYNC                 (0x01)         /* Sync-Mode  0:UART-Mode / 1:SPI-Mode */
3476
 
3477
// UCxxCTL0 SPI-Mode Control Bits
3478
#define UCCKPH                 (0x80)         /* Sync. Mode: Clock Phase */
3479
#define UCCKPL                 (0x40)         /* Sync. Mode: Clock Polarity */
3480
#define UCMST                  (0x08)         /* Sync. Mode: Master Select */
3481
 
3482
// UCBxCTL0 I2C-Mode Control Bits
3483
#define UCA10                  (0x80)         /* 10-bit Address Mode */
3484
#define UCSLA10                (0x40)         /* 10-bit Slave Address Mode */
3485
#define UCMM                   (0x20)         /* Multi-Master Environment */
3486
//#define res               (0x10)    /* reserved */
3487
#define UCMODE_0               (0x00)         /* Sync. Mode: USCI Mode: 0 */
3488
#define UCMODE_1               (0x02)         /* Sync. Mode: USCI Mode: 1 */
3489
#define UCMODE_2               (0x04)         /* Sync. Mode: USCI Mode: 2 */
3490
#define UCMODE_3               (0x06)         /* Sync. Mode: USCI Mode: 3 */
3491
 
3492
// UCAxCTL1 UART-Mode Control Bits
3493
#define UCSSEL1                (0x80)         /* USCI 0 Clock Source Select 1 */
3494
#define UCSSEL0                (0x40)         /* USCI 0 Clock Source Select 0 */
3495
#define UCRXEIE                (0x20)         /* RX Error interrupt enable */
3496
#define UCBRKIE                (0x10)         /* Break interrupt enable */
3497
#define UCDORM                 (0x08)         /* Dormant (Sleep) Mode */
3498
#define UCTXADDR               (0x04)         /* Send next Data as Address */
3499
#define UCTXBRK                (0x02)         /* Send next Data as Break */
3500
#define UCSWRST                (0x01)         /* USCI Software Reset */
3501
 
3502
// UCxxCTL1 SPI-Mode Control Bits
3503
//#define res               (0x20)    /* reserved */
3504
//#define res               (0x10)    /* reserved */
3505
//#define res               (0x08)    /* reserved */
3506
//#define res               (0x04)    /* reserved */
3507
//#define res               (0x02)    /* reserved */
3508
 
3509
// UCBxCTL1 I2C-Mode Control Bits
3510
//#define res               (0x20)    /* reserved */
3511
#define UCTR                   (0x10)         /* Transmit/Receive Select/Flag */
3512
#define UCTXNACK               (0x08)         /* Transmit NACK */
3513
#define UCTXSTP                (0x04)         /* Transmit STOP */
3514
#define UCTXSTT                (0x02)         /* Transmit START */
3515
#define UCSSEL_0               (0x00)         /* USCI 0 Clock Source: 0 */
3516
#define UCSSEL_1               (0x40)         /* USCI 0 Clock Source: 1 */
3517
#define UCSSEL_2               (0x80)         /* USCI 0 Clock Source: 2 */
3518
#define UCSSEL_3               (0xC0)         /* USCI 0 Clock Source: 3 */
3519
#define UCSSEL__UCLK           (0x00)         /* USCI 0 Clock Source: UCLK */
3520
#define UCSSEL__ACLK           (0x40)         /* USCI 0 Clock Source: ACLK */
3521
#define UCSSEL__SMCLK          (0x80)         /* USCI 0 Clock Source: SMCLK */
3522
 
3523
/* UCAxMCTL Control Bits */
3524
#define UCBRF3                 (0x80)         /* USCI First Stage Modulation Select 3 */
3525
#define UCBRF2                 (0x40)         /* USCI First Stage Modulation Select 2 */
3526
#define UCBRF1                 (0x20)         /* USCI First Stage Modulation Select 1 */
3527
#define UCBRF0                 (0x10)         /* USCI First Stage Modulation Select 0 */
3528
#define UCBRS2                 (0x08)         /* USCI Second Stage Modulation Select 2 */
3529
#define UCBRS1                 (0x04)         /* USCI Second Stage Modulation Select 1 */
3530
#define UCBRS0                 (0x02)         /* USCI Second Stage Modulation Select 0 */
3531
#define UCOS16                 (0x01)         /* USCI 16-times Oversampling enable */
3532
 
3533
#define UCBRF_0                (0x00)         /* USCI First Stage Modulation: 0 */
3534
#define UCBRF_1                (0x10)         /* USCI First Stage Modulation: 1 */
3535
#define UCBRF_2                (0x20)         /* USCI First Stage Modulation: 2 */
3536
#define UCBRF_3                (0x30)         /* USCI First Stage Modulation: 3 */
3537
#define UCBRF_4                (0x40)         /* USCI First Stage Modulation: 4 */
3538
#define UCBRF_5                (0x50)         /* USCI First Stage Modulation: 5 */
3539
#define UCBRF_6                (0x60)         /* USCI First Stage Modulation: 6 */
3540
#define UCBRF_7                (0x70)         /* USCI First Stage Modulation: 7 */
3541
#define UCBRF_8                (0x80)         /* USCI First Stage Modulation: 8 */
3542
#define UCBRF_9                (0x90)         /* USCI First Stage Modulation: 9 */
3543
#define UCBRF_10               (0xA0)         /* USCI First Stage Modulation: A */
3544
#define UCBRF_11               (0xB0)         /* USCI First Stage Modulation: B */
3545
#define UCBRF_12               (0xC0)         /* USCI First Stage Modulation: C */
3546
#define UCBRF_13               (0xD0)         /* USCI First Stage Modulation: D */
3547
#define UCBRF_14               (0xE0)         /* USCI First Stage Modulation: E */
3548
#define UCBRF_15               (0xF0)         /* USCI First Stage Modulation: F */
3549
 
3550
#define UCBRS_0                (0x00)         /* USCI Second Stage Modulation: 0 */
3551
#define UCBRS_1                (0x02)         /* USCI Second Stage Modulation: 1 */
3552
#define UCBRS_2                (0x04)         /* USCI Second Stage Modulation: 2 */
3553
#define UCBRS_3                (0x06)         /* USCI Second Stage Modulation: 3 */
3554
#define UCBRS_4                (0x08)         /* USCI Second Stage Modulation: 4 */
3555
#define UCBRS_5                (0x0A)         /* USCI Second Stage Modulation: 5 */
3556
#define UCBRS_6                (0x0C)         /* USCI Second Stage Modulation: 6 */
3557
#define UCBRS_7                (0x0E)         /* USCI Second Stage Modulation: 7 */
3558
 
3559
/* UCAxSTAT Control Bits */
3560
#define UCLISTEN               (0x80)         /* USCI Listen mode */
3561
#define UCFE                   (0x40)         /* USCI Frame Error Flag */
3562
#define UCOE                   (0x20)         /* USCI Overrun Error Flag */
3563
#define UCPE                   (0x10)         /* USCI Parity Error Flag */
3564
#define UCBRK                  (0x08)         /* USCI Break received */
3565
#define UCRXERR                (0x04)         /* USCI RX Error Flag */
3566
#define UCADDR                 (0x02)         /* USCI Address received Flag */
3567
#define UCBUSY                 (0x01)         /* USCI Busy Flag */
3568
#define UCIDLE                 (0x02)         /* USCI Idle line detected Flag */
3569
 
3570
/* UCBxSTAT Control Bits */
3571
#define UCSCLLOW               (0x40)         /* SCL low */
3572
#define UCGC                   (0x20)         /* General Call address received Flag */
3573
#define UCBBUSY                (0x10)         /* Bus Busy Flag */
3574
 
3575
/* UCAxIRTCTL Control Bits */
3576
#define UCIRTXPL5              (0x80)         /* IRDA Transmit Pulse Length 5 */
3577
#define UCIRTXPL4              (0x40)         /* IRDA Transmit Pulse Length 4 */
3578
#define UCIRTXPL3              (0x20)         /* IRDA Transmit Pulse Length 3 */
3579
#define UCIRTXPL2              (0x10)         /* IRDA Transmit Pulse Length 2 */
3580
#define UCIRTXPL1              (0x08)         /* IRDA Transmit Pulse Length 1 */
3581
#define UCIRTXPL0              (0x04)         /* IRDA Transmit Pulse Length 0 */
3582
#define UCIRTXCLK              (0x02)         /* IRDA Transmit Pulse Clock Select */
3583
#define UCIREN                 (0x01)         /* IRDA Encoder/Decoder enable */
3584
 
3585
/* UCAxIRRCTL Control Bits */
3586
#define UCIRRXFL5              (0x80)         /* IRDA Receive Filter Length 5 */
3587
#define UCIRRXFL4              (0x40)         /* IRDA Receive Filter Length 4 */
3588
#define UCIRRXFL3              (0x20)         /* IRDA Receive Filter Length 3 */
3589
#define UCIRRXFL2              (0x10)         /* IRDA Receive Filter Length 2 */
3590
#define UCIRRXFL1              (0x08)         /* IRDA Receive Filter Length 1 */
3591
#define UCIRRXFL0              (0x04)         /* IRDA Receive Filter Length 0 */
3592
#define UCIRRXPL               (0x02)         /* IRDA Receive Input Polarity */
3593
#define UCIRRXFE               (0x01)         /* IRDA Receive Filter enable */
3594
 
3595
/* UCAxABCTL Control Bits */
3596
//#define res               (0x80)    /* reserved */
3597
//#define res               (0x40)    /* reserved */
3598
#define UCDELIM1               (0x20)         /* Break Sync Delimiter 1 */
3599
#define UCDELIM0               (0x10)         /* Break Sync Delimiter 0 */
3600
#define UCSTOE                 (0x08)         /* Sync-Field Timeout error */
3601
#define UCBTOE                 (0x04)         /* Break Timeout error */
3602
//#define res               (0x02)    /* reserved */
3603
#define UCABDEN                (0x01)         /* Auto Baud Rate detect enable */
3604
 
3605
/* UCBxI2COA Control Bits */
3606
#define UCGCEN                 (0x8000)       /* I2C General Call enable */
3607
#define UCOA9                  (0x0200)       /* I2C Own Address 9 */
3608
#define UCOA8                  (0x0100)       /* I2C Own Address 8 */
3609
#define UCOA7                  (0x0080)       /* I2C Own Address 7 */
3610
#define UCOA6                  (0x0040)       /* I2C Own Address 6 */
3611
#define UCOA5                  (0x0020)       /* I2C Own Address 5 */
3612
#define UCOA4                  (0x0010)       /* I2C Own Address 4 */
3613
#define UCOA3                  (0x0008)       /* I2C Own Address 3 */
3614
#define UCOA2                  (0x0004)       /* I2C Own Address 2 */
3615
#define UCOA1                  (0x0002)       /* I2C Own Address 1 */
3616
#define UCOA0                  (0x0001)       /* I2C Own Address 0 */
3617
 
3618
/* UCBxI2COA Control Bits */
3619
#define UCOA7_L                (0x0080)       /* I2C Own Address 7 */
3620
#define UCOA6_L                (0x0040)       /* I2C Own Address 6 */
3621
#define UCOA5_L                (0x0020)       /* I2C Own Address 5 */
3622
#define UCOA4_L                (0x0010)       /* I2C Own Address 4 */
3623
#define UCOA3_L                (0x0008)       /* I2C Own Address 3 */
3624
#define UCOA2_L                (0x0004)       /* I2C Own Address 2 */
3625
#define UCOA1_L                (0x0002)       /* I2C Own Address 1 */
3626
#define UCOA0_L                (0x0001)       /* I2C Own Address 0 */
3627
 
3628
/* UCBxI2COA Control Bits */
3629
#define UCGCEN_H               (0x0080)       /* I2C General Call enable */
3630
#define UCOA9_H                (0x0002)       /* I2C Own Address 9 */
3631
#define UCOA8_H                (0x0001)       /* I2C Own Address 8 */
3632
 
3633
/* UCBxI2CSA Control Bits */
3634
#define UCSA9                  (0x0200)       /* I2C Slave Address 9 */
3635
#define UCSA8                  (0x0100)       /* I2C Slave Address 8 */
3636
#define UCSA7                  (0x0080)       /* I2C Slave Address 7 */
3637
#define UCSA6                  (0x0040)       /* I2C Slave Address 6 */
3638
#define UCSA5                  (0x0020)       /* I2C Slave Address 5 */
3639
#define UCSA4                  (0x0010)       /* I2C Slave Address 4 */
3640
#define UCSA3                  (0x0008)       /* I2C Slave Address 3 */
3641
#define UCSA2                  (0x0004)       /* I2C Slave Address 2 */
3642
#define UCSA1                  (0x0002)       /* I2C Slave Address 1 */
3643
#define UCSA0                  (0x0001)       /* I2C Slave Address 0 */
3644
 
3645
/* UCBxI2CSA Control Bits */
3646
#define UCSA7_L                (0x0080)       /* I2C Slave Address 7 */
3647
#define UCSA6_L                (0x0040)       /* I2C Slave Address 6 */
3648
#define UCSA5_L                (0x0020)       /* I2C Slave Address 5 */
3649
#define UCSA4_L                (0x0010)       /* I2C Slave Address 4 */
3650
#define UCSA3_L                (0x0008)       /* I2C Slave Address 3 */
3651
#define UCSA2_L                (0x0004)       /* I2C Slave Address 2 */
3652
#define UCSA1_L                (0x0002)       /* I2C Slave Address 1 */
3653
#define UCSA0_L                (0x0001)       /* I2C Slave Address 0 */
3654
 
3655
/* UCBxI2CSA Control Bits */
3656
#define UCSA9_H                (0x0002)       /* I2C Slave Address 9 */
3657
#define UCSA8_H                (0x0001)       /* I2C Slave Address 8 */
3658
 
3659
/* UCAxIE Control Bits */
3660
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
3661
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
3662
 
3663
/* UCBxIE Control Bits */
3664
#define UCNACKIE               (0x0020)       /* NACK Condition interrupt enable */
3665
#define UCALIE                 (0x0010)       /* Arbitration Lost interrupt enable */
3666
#define UCSTPIE                (0x0008)       /* STOP Condition interrupt enable */
3667
#define UCSTTIE                (0x0004)       /* START Condition interrupt enable */
3668
#define UCTXIE                 (0x0002)       /* USCI Transmit Interrupt Enable */
3669
#define UCRXIE                 (0x0001)       /* USCI Receive Interrupt Enable */
3670
 
3671
/* UCAxIFG Control Bits */
3672
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
3673
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
3674
 
3675
/* UCBxIFG Control Bits */
3676
#define UCNACKIFG              (0x0020)       /* NAK Condition interrupt Flag */
3677
#define UCALIFG                (0x0010)       /* Arbitration Lost interrupt Flag */
3678
#define UCSTPIFG               (0x0008)       /* STOP Condition interrupt Flag */
3679
#define UCSTTIFG               (0x0004)       /* START Condition interrupt Flag */
3680
#define UCTXIFG                (0x0002)       /* USCI Transmit Interrupt Flag */
3681
#define UCRXIFG                (0x0001)       /* USCI Receive Interrupt Flag */
3682
 
3683
/* USCI Definitions */
3684
#define USCI_NONE              (0x0000)       /* No Interrupt pending */
3685
#define USCI_UCRXIFG           (0x0002)       /* USCI UCRXIFG */
3686
#define USCI_UCTXIFG           (0x0004)       /* USCI UCTXIFG */
3687
#define USCI_I2C_UCALIFG       (0x0002)       /* USCI I2C Mode: UCALIFG */
3688
#define USCI_I2C_UCNACKIFG     (0x0004)       /* USCI I2C Mode: UCNACKIFG */
3689
#define USCI_I2C_UCSTTIFG      (0x0006)       /* USCI I2C Mode: UCSTTIFG*/
3690
#define USCI_I2C_UCSTPIFG      (0x0008)       /* USCI I2C Mode: UCSTPIFG*/
3691
#define USCI_I2C_UCRXIFG       (0x000A)       /* USCI I2C Mode: UCRXIFG */
3692
#define USCI_I2C_UCTXIFG       (0x000C)       /* USCI I2C Mode: UCTXIFG */
3693
 
3694
/************************************************************
3695
* WATCHDOG TIMER A
3696
************************************************************/
3697
#define __MSP430_HAS_WDT_A__                  /* Definition to show that Module is available */
3698
#define __MSP430_BASEADDRESS_WDT_A__ 0x0150
3699
 
3700
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
3701
SFR_8BIT(WDTCTL_L);                           /* Watchdog Timer Control */
3702
SFR_8BIT(WDTCTL_H);                           /* Watchdog Timer Control */
3703
/* The bit names have been prefixed with "WDT" */
3704
/* WDTCTL Control Bits */
3705
#define WDTIS0                 (0x0001)       /* WDT - Timer Interval Select 0 */
3706
#define WDTIS1                 (0x0002)       /* WDT - Timer Interval Select 1 */
3707
#define WDTIS2                 (0x0004)       /* WDT - Timer Interval Select 2 */
3708
#define WDTCNTCL               (0x0008)       /* WDT - Timer Clear */
3709
#define WDTTMSEL               (0x0010)       /* WDT - Timer Mode Select */
3710
#define WDTSSEL0               (0x0020)       /* WDT - Timer Clock Source Select 0 */
3711
#define WDTSSEL1               (0x0040)       /* WDT - Timer Clock Source Select 1 */
3712
#define WDTHOLD                (0x0080)       /* WDT - Timer hold */
3713
 
3714
/* WDTCTL Control Bits */
3715
#define WDTIS0_L               (0x0001)       /* WDT - Timer Interval Select 0 */
3716
#define WDTIS1_L               (0x0002)       /* WDT - Timer Interval Select 1 */
3717
#define WDTIS2_L               (0x0004)       /* WDT - Timer Interval Select 2 */
3718
#define WDTCNTCL_L             (0x0008)       /* WDT - Timer Clear */
3719
#define WDTTMSEL_L             (0x0010)       /* WDT - Timer Mode Select */
3720
#define WDTSSEL0_L             (0x0020)       /* WDT - Timer Clock Source Select 0 */
3721
#define WDTSSEL1_L             (0x0040)       /* WDT - Timer Clock Source Select 1 */
3722
#define WDTHOLD_L              (0x0080)       /* WDT - Timer hold */
3723
 
3724
/* WDTCTL Control Bits */
3725
 
3726
#define WDTPW                  (0x5A00)
3727
 
3728
#define WDTIS_0                (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
3729
#define WDTIS_1                (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
3730
#define WDTIS_2                (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
3731
#define WDTIS_3                (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
3732
#define WDTIS_4                (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
3733
#define WDTIS_5                (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
3734
#define WDTIS_6                (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
3735
#define WDTIS_7                (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
3736
#define WDTIS__2G              (0*0x0001u)    /* WDT - Timer Interval Select: /2G */
3737
#define WDTIS__128M            (1*0x0001u)    /* WDT - Timer Interval Select: /128M */
3738
#define WDTIS__8192K           (2*0x0001u)    /* WDT - Timer Interval Select: /8192k */
3739
#define WDTIS__512K            (3*0x0001u)    /* WDT - Timer Interval Select: /512k */
3740
#define WDTIS__32K             (4*0x0001u)    /* WDT - Timer Interval Select: /32k */
3741
#define WDTIS__8192            (5*0x0001u)    /* WDT - Timer Interval Select: /8192 */
3742
#define WDTIS__512             (6*0x0001u)    /* WDT - Timer Interval Select: /512 */
3743
#define WDTIS__64              (7*0x0001u)    /* WDT - Timer Interval Select: /64 */
3744
 
3745
#define WDTSSEL_0              (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
3746
#define WDTSSEL_1              (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
3747
#define WDTSSEL_2              (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
3748
#define WDTSSEL_3              (3*0x0020u)    /* WDT - Timer Clock Source Select: reserved */
3749
#define WDTSSEL__SMCLK         (0*0x0020u)    /* WDT - Timer Clock Source Select: SMCLK */
3750
#define WDTSSEL__ACLK          (1*0x0020u)    /* WDT - Timer Clock Source Select: ACLK */
3751
#define WDTSSEL__VLO           (2*0x0020u)    /* WDT - Timer Clock Source Select: VLO_CLK */
3752
 
3753
/* WDT-interval times [1ms] coded with Bits 0-2 */
3754
/* WDT is clocked by fSMCLK (assumed 1MHz) */
3755
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2)                         /* 32ms interval (default) */
3756
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS0)                  /* 8ms     " */
3757
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1)                  /* 0.5ms   " */
3758
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)           /* 0.064ms " */
3759
/* WDT is clocked by fACLK (assumed 32KHz) */
3760
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0)                /* 1000ms  " */
3761
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS0)         /* 250ms   " */
3762
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1)         /* 16ms    " */
3763
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS2+WDTSSEL0+WDTIS1+WDTIS0)  /* 1.9ms   " */
3764
/* Watchdog mode -> reset after expired time */
3765
/* WDT is clocked by fSMCLK (assumed 1MHz) */
3766
#define WDT_MRST_32         (WDTPW+WDTCNTCL+WDTIS2)                                  /* 32ms interval (default) */
3767
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS2+WDTIS0)                           /* 8ms     " */
3768
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS2+WDTIS1)                           /* 0.5ms   " */
3769
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS2+WDTIS1+WDTIS0)                    /* 0.064ms " */
3770
/* WDT is clocked by fACLK (assumed 32KHz) */
3771
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2)                         /* 1000ms  " */
3772
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS0)                  /* 250ms   " */
3773
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1)                  /* 16ms    " */
3774
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL0+WDTIS2+WDTIS1+WDTIS0)           /* 1.9ms   " */
3775
 
3776
 
3777
/************************************************************
3778
* TLV Descriptors
3779
************************************************************/
3780
#define __MSP430_HAS_TLV__                    /* Definition to show that Module is available */
3781
 
3782
#define TLV_START              (0x1A08)       /* Start Address of the TLV structure */
3783
#define TLV_END                (0x1AFF)       /* End Address of the TLV structure */
3784
 
3785
#define TLV_LDTAG              (0x01)         /*  Legacy descriptor (1xx, 2xx, 4xx families) */
3786
#define TLV_PDTAG              (0x02)         /*  Peripheral discovery descriptor */
3787
#define TLV_Reserved3          (0x03)         /*  Future usage */
3788
#define TLV_Reserved4          (0x04)         /*  Future usage */
3789
#define TLV_BLANK              (0x05)         /*  Blank descriptor */
3790
#define TLV_Reserved6          (0x06)         /*  Future usage */
3791
#define TLV_Reserved7          (0x07)         /*  Serial Number */
3792
#define TLV_DIERECORD          (0x08)         /*  Die Record  */
3793
#define TLV_ADCCAL             (0x11)         /*  ADC12 calibration */
3794
#define TLV_ADC12CAL           (0x11)         /*  ADC12 calibration */
3795
#define TLV_ADC10CAL           (0x13)         /*  ADC10 calibration */
3796
#define TLV_REFCAL             (0x12)         /*  REF calibration */
3797
#define TLV_TAGEXT             (0xFE)         /*  Tag extender */
3798
#define TLV_TAGEND             (0xFF)         //  Tag End of Table
3799
 
3800
/************************************************************
3801
* Interrupt Vectors (offset from 0xFF80)
3802
************************************************************/
3803
 
3804
#pragma diag_suppress 1107
3805
#define VECTOR_NAME(name)             name##_ptr
3806
#define EMIT_PRAGMA(x)                _Pragma(#x)
3807
#define CREATE_VECTOR(name)           void * const VECTOR_NAME(name) = (void *)(long)&name
3808
#define PLACE_VECTOR(vector,section)  EMIT_PRAGMA(DATA_SECTION(vector,section))
3809
#define PLACE_INTERRUPT(func)         EMIT_PRAGMA(CODE_SECTION(func,".text:_isr"))
3810
#define ISR_VECTOR(func,offset)       CREATE_VECTOR(func); \
3811
                                      PLACE_VECTOR(VECTOR_NAME(func), offset) \
3812
                                      PLACE_INTERRUPT(func)
3813
 
3814
 
3815
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3816
#define PORT2_VECTOR            ".int45"                    /* 0xFFDA Port 2 */
3817
#else
3818
#define PORT2_VECTOR            (45 * 1u)                    /* 0xFFDA Port 2 */
3819
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int45")  */ /* 0xFFDA Port 2 */ /* CCE V2 Style */
3820
#endif
3821
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3822
#define PORT1_VECTOR            ".int46"                    /* 0xFFDC Port 1 */
3823
#else
3824
#define PORT1_VECTOR            (46 * 1u)                    /* 0xFFDC Port 1 */
3825
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int46")  */ /* 0xFFDC Port 1 */ /* CCE V2 Style */
3826
#endif
3827
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3828
#define TIMER1_D1_VECTOR        ".int47"                    /* 0xFFDE Timer1_D3 CC1-2, TA1 */
3829
#else
3830
#define TIMER1_D1_VECTOR        (47 * 1u)                    /* 0xFFDE Timer1_D3 CC1-2, TA1 */
3831
/*#define TIMER1_D1_ISR(func)     ISR_VECTOR(func, ".int47")  */ /* 0xFFDE Timer1_D3 CC1-2, TA1 */ /* CCE V2 Style */
3832
#endif
3833
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3834
#define TIMER1_D0_VECTOR        ".int48"                    /* 0xFFE0 Timer1_D3 CC0 */
3835
#else
3836
#define TIMER1_D0_VECTOR        (48 * 1u)                    /* 0xFFE0 Timer1_D3 CC0 */
3837
/*#define TIMER1_D0_ISR(func)     ISR_VECTOR(func, ".int48")  */ /* 0xFFE0 Timer1_D3 CC0 */ /* CCE V2 Style */
3838
#endif
3839
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3840
#define TEC1_VECTOR             ".int49"                    /* 0xFFF2 Timer Event Controller 1 */
3841
#else
3842
#define TEC1_VECTOR             (49 * 1u)                    /* 0xFFF2 Timer Event Controller 1 */
3843
/*#define TEC1_ISR(func)          ISR_VECTOR(func, ".int49")  */ /* 0xFFF2 Timer Event Controller 1 */ /* CCE V2 Style */
3844
#endif
3845
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3846
#define DMA_VECTOR              ".int50"                    /* 0xFFE4 DMA */
3847
#else
3848
#define DMA_VECTOR              (50 * 1u)                    /* 0xFFE4 DMA */
3849
/*#define DMA_ISR(func)           ISR_VECTOR(func, ".int50")  */ /* 0xFFE4 DMA */ /* CCE V2 Style */
3850
#endif
3851
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3852
#define TIMER0_A1_VECTOR        ".int51"                    /* 0xFFE6 Timer0_A3 CC1-2, TA */
3853
#else
3854
#define TIMER0_A1_VECTOR        (51 * 1u)                    /* 0xFFE6 Timer0_A3 CC1-2, TA */
3855
/*#define TIMER0_A1_ISR(func)     ISR_VECTOR(func, ".int51")  */ /* 0xFFE6 Timer0_A3 CC1-2, TA */ /* CCE V2 Style */
3856
#endif
3857
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3858
#define TIMER0_A0_VECTOR        ".int52"                    /* 0xFFE8 Timer0_A3 CC0 */
3859
#else
3860
#define TIMER0_A0_VECTOR        (52 * 1u)                    /* 0xFFE8 Timer0_A3 CC0 */
3861
/*#define TIMER0_A0_ISR(func)     ISR_VECTOR(func, ".int52")  */ /* 0xFFE8 Timer0_A3 CC0 */ /* CCE V2 Style */
3862
#endif
3863
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3864
#define ADC10_VECTOR            ".int53"                    /* 0xFFEA ADC */
3865
#else
3866
#define ADC10_VECTOR            (53 * 1u)                    /* 0xFFEA ADC */
3867
/*#define ADC10_ISR(func)         ISR_VECTOR(func, ".int53")  */ /* 0xFFEA ADC */ /* CCE V2 Style */
3868
#endif
3869
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3870
#define USCI_B0_VECTOR          ".int54"                    /* 0xFFEC USCI B0 Receive/Transmit */
3871
#else
3872
#define USCI_B0_VECTOR          (54 * 1u)                    /* 0xFFEC USCI B0 Receive/Transmit */
3873
/*#define USCI_B0_ISR(func)       ISR_VECTOR(func, ".int54")  */ /* 0xFFEC USCI B0 Receive/Transmit */ /* CCE V2 Style */
3874
#endif
3875
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3876
#define USCI_A0_VECTOR          ".int55"                    /* 0xFFEE USCI A0 Receive/Transmit */
3877
#else
3878
#define USCI_A0_VECTOR          (55 * 1u)                    /* 0xFFEE USCI A0 Receive/Transmit */
3879
/*#define USCI_A0_ISR(func)       ISR_VECTOR(func, ".int55")  */ /* 0xFFEE USCI A0 Receive/Transmit */ /* CCE V2 Style */
3880
#endif
3881
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3882
#define WDT_VECTOR              ".int56"                    /* 0xFFF0 Watchdog Timer */
3883
#else
3884
#define WDT_VECTOR              (56 * 1u)                    /* 0xFFF0 Watchdog Timer */
3885
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int56")  */ /* 0xFFF0 Watchdog Timer */ /* CCE V2 Style */
3886
#endif
3887
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3888
#define TIMER0_D1_VECTOR        ".int57"                    /* 0xFFE2 Timer0_D3 CC1-2, TA */
3889
#else
3890
#define TIMER0_D1_VECTOR        (57 * 1u)                    /* 0xFFE2 Timer0_D3 CC1-2, TA */
3891
/*#define TIMER0_D1_ISR(func)     ISR_VECTOR(func, ".int57")  */ /* 0xFFE2 Timer0_D3 CC1-2, TA */ /* CCE V2 Style */
3892
#endif
3893
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3894
#define TIMER0_D0_VECTOR        ".int58"                    /* 0xFFE4 Timer0_D3 CC0 */
3895
#else
3896
#define TIMER0_D0_VECTOR        (58 * 1u)                    /* 0xFFE4 Timer0_D3 CC0 */
3897
/*#define TIMER0_D0_ISR(func)     ISR_VECTOR(func, ".int58")  */ /* 0xFFE4 Timer0_D3 CC0 */ /* CCE V2 Style */
3898
#endif
3899
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3900
#define TEC0_VECTOR             ".int59"                    /* 0xFFF6 Timer Event Controller 0 */
3901
#else
3902
#define TEC0_VECTOR             (59 * 1u)                    /* 0xFFF6 Timer Event Controller 0 */
3903
/*#define TEC0_ISR(func)          ISR_VECTOR(func, ".int59")  */ /* 0xFFF6 Timer Event Controller 0 */ /* CCE V2 Style */
3904
#endif
3905
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3906
#define COMP_B_VECTOR           ".int60"                    /* 0xFFF8 Watchdog Timer */
3907
#else
3908
#define COMP_B_VECTOR           (60 * 1u)                    /* 0xFFF8 Watchdog Timer */
3909
/*#define COMP_B_ISR(func)        ISR_VECTOR(func, ".int60")  */ /* 0xFFF8 Watchdog Timer */ /* CCE V2 Style */
3910
#endif
3911
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3912
#define UNMI_VECTOR             ".int61"                    /* 0xFFFA User Non-maskable */
3913
#else
3914
#define UNMI_VECTOR             (61 * 1u)                    /* 0xFFFA User Non-maskable */
3915
/*#define UNMI_ISR(func)          ISR_VECTOR(func, ".int61")  */ /* 0xFFFA User Non-maskable */ /* CCE V2 Style */
3916
#endif
3917
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3918
#define SYSNMI_VECTOR           ".int62"                    /* 0xFFFC System Non-maskable */
3919
#else
3920
#define SYSNMI_VECTOR           (62 * 1u)                    /* 0xFFFC System Non-maskable */
3921
/*#define SYSNMI_ISR(func)        ISR_VECTOR(func, ".int62")  */ /* 0xFFFC System Non-maskable */ /* CCE V2 Style */
3922
#endif
3923
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
3924
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
3925
#else
3926
#define RESET_VECTOR            (63 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
3927
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int63")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
3928
#endif
3929
 
3930
/************************************************************
3931
* End of Modules
3932
************************************************************/
3933
 
3934
#ifdef __cplusplus
3935
}
3936
#endif /* extern "C" */
3937
 
3938
#endif /* #ifndef __MSP430F5132 */
3939