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