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
* MSP430xE42x2 devices.
8
*
9
* Texas Instruments, Version 1.2
10
*
11
*
12
* Rev. 1.0,  Initial Version
13
* Rev. 1.1,
14
* Rev. 1.2,  Fixed swapped IRMS and IRMS_2 definitions
15
*
16
********************************************************************/
17
 
18
#ifndef __msp430xE42x2
19
#define __msp430xE42x2
20
 
21
#ifdef __cplusplus
22
extern "C" {
23
#endif
24
 
25
 
26
/*----------------------------------------------------------------------------*/
27
/* PERIPHERAL FILE MAP                                                        */
28
/*----------------------------------------------------------------------------*/
29
 
30
/* External references resolved by a device-specific linker command file */
31
#define SFR_8BIT(address)   extern volatile unsigned char address
32
#define SFR_16BIT(address)  extern volatile unsigned int address
33
 
34
 
35
/************************************************************
36
* STANDARD BITS
37
************************************************************/
38
 
39
#define BIT0                   (0x0001)
40
#define BIT1                   (0x0002)
41
#define BIT2                   (0x0004)
42
#define BIT3                   (0x0008)
43
#define BIT4                   (0x0010)
44
#define BIT5                   (0x0020)
45
#define BIT6                   (0x0040)
46
#define BIT7                   (0x0080)
47
#define BIT8                   (0x0100)
48
#define BIT9                   (0x0200)
49
#define BITA                   (0x0400)
50
#define BITB                   (0x0800)
51
#define BITC                   (0x1000)
52
#define BITD                   (0x2000)
53
#define BITE                   (0x4000)
54
#define BITF                   (0x8000)
55
 
56
/************************************************************
57
* STATUS REGISTER BITS
58
************************************************************/
59
 
60
#define C                      (0x0001)
61
#define Z                      (0x0002)
62
#define N                      (0x0004)
63
#define V                      (0x0100)
64
#define GIE                    (0x0008)
65
#define CPUOFF                 (0x0010)
66
#define OSCOFF                 (0x0020)
67
#define SCG0                   (0x0040)
68
#define SCG1                   (0x0080)
69
 
70
/* Low Power Modes coded with Bits 4-7 in SR */
71
 
72
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
73
#define LPM0                   (CPUOFF)
74
#define LPM1                   (SCG0+CPUOFF)
75
#define LPM2                   (SCG1+CPUOFF)
76
#define LPM3                   (SCG1+SCG0+CPUOFF)
77
#define LPM4                   (SCG1+SCG0+OSCOFF+CPUOFF)
78
/* End #defines for assembler */
79
 
80
#else /* Begin #defines for C */
81
#define LPM0_bits              (CPUOFF)
82
#define LPM1_bits              (SCG0+CPUOFF)
83
#define LPM2_bits              (SCG1+CPUOFF)
84
#define LPM3_bits              (SCG1+SCG0+CPUOFF)
85
#define LPM4_bits              (SCG1+SCG0+OSCOFF+CPUOFF)
86
 
87
#include "in430.h"
88
 
89
#define LPM0         _bis_SR_register(LPM0_bits)         /* Enter Low Power Mode 0 */
90
#define LPM0_EXIT    _bic_SR_register_on_exit(LPM0_bits) /* Exit Low Power Mode 0 */
91
#define LPM1         _bis_SR_register(LPM1_bits)         /* Enter Low Power Mode 1 */
92
#define LPM1_EXIT    _bic_SR_register_on_exit(LPM1_bits) /* Exit Low Power Mode 1 */
93
#define LPM2         _bis_SR_register(LPM2_bits)         /* Enter Low Power Mode 2 */
94
#define LPM2_EXIT    _bic_SR_register_on_exit(LPM2_bits) /* Exit Low Power Mode 2 */
95
#define LPM3         _bis_SR_register(LPM3_bits)         /* Enter Low Power Mode 3 */
96
#define LPM3_EXIT    _bic_SR_register_on_exit(LPM3_bits) /* Exit Low Power Mode 3 */
97
#define LPM4         _bis_SR_register(LPM4_bits)         /* Enter Low Power Mode 4 */
98
#define LPM4_EXIT    _bic_SR_register_on_exit(LPM4_bits) /* Exit Low Power Mode 4 */
99
#endif /* End #defines for C */
100
 
101
/************************************************************
102
* PERIPHERAL FILE MAP
103
************************************************************/
104
 
105
/************************************************************
106
* SPECIAL FUNCTION REGISTER ADDRESSES + CONTROL BITS
107
************************************************************/
108
 
109
SFR_8BIT(IE1);                                /* Interrupt Enable 1 */
110
#define U0IE                   IE1            /* UART0 Interrupt Enable Register */
111
#define WDTIE                  (0x01)
112
#define OFIE                   (0x02)
113
#define NMIIE                  (0x10)
114
#define ACCVIE                 (0x20)
115
#define URXIE0                 (0x40)
116
#define UTXIE0                 (0x80)
117
 
118
SFR_8BIT(IFG1);                               /* Interrupt Flag 1 */
119
#define U0IFG                  IFG1           /* UART0 Interrupt Flag Register */
120
#define WDTIFG                 (0x01)
121
#define OFIFG                  (0x02)
122
#define NMIIFG                 (0x10)
123
#define URXIFG0                (0x40)
124
#define UTXIFG0                (0x80)
125
 
126
SFR_8BIT(ME1);                                /* Module Enable 1 */
127
#define U0ME                   ME1            /* UART0 Module Enable Register */
128
#define URXE0                  (0x40)
129
#define UTXE0                  (0x80)
130
#define USPIE0                 (0x40)
131
 
132
SFR_8BIT(IE2);                                /* Interrupt Enable 2 */
133
#define BTIE                   (0x80)
134
 
135
SFR_8BIT(IFG2);                               /* Interrupt Flag 2 */
136
#define BTIFG                  (0x80)
137
 
138
/************************************************************
139
* WATCHDOG TIMER
140
************************************************************/
141
#define __MSP430_HAS_WDT__                    /* Definition to show that Module is available */
142
 
143
SFR_16BIT(WDTCTL);                            /* Watchdog Timer Control */
144
/* The bit names have been prefixed with "WDT" */
145
#define WDTIS0                 (0x0001)
146
#define WDTIS1                 (0x0002)
147
#define WDTSSEL                (0x0004)
148
#define WDTCNTCL               (0x0008)
149
#define WDTTMSEL               (0x0010)
150
#define WDTNMI                 (0x0020)
151
#define WDTNMIES               (0x0040)
152
#define WDTHOLD                (0x0080)
153
 
154
#define WDTPW                  (0x5A00)
155
 
156
/* WDT-interval times [1ms] coded with Bits 0-2 */
157
/* WDT is clocked by fSMCLK (assumed 1MHz) */
158
#define WDT_MDLY_32         (WDTPW+WDTTMSEL+WDTCNTCL)                         /* 32ms interval (default) */
159
#define WDT_MDLY_8          (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS0)                  /* 8ms     " */
160
#define WDT_MDLY_0_5        (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1)                  /* 0.5ms   " */
161
#define WDT_MDLY_0_064      (WDTPW+WDTTMSEL+WDTCNTCL+WDTIS1+WDTIS0)           /* 0.064ms " */
162
/* WDT is clocked by fACLK (assumed 32KHz) */
163
#define WDT_ADLY_1000       (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL)                 /* 1000ms  " */
164
#define WDT_ADLY_250        (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS0)          /* 250ms   " */
165
#define WDT_ADLY_16         (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1)          /* 16ms    " */
166
#define WDT_ADLY_1_9        (WDTPW+WDTTMSEL+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)   /* 1.9ms   " */
167
/* Watchdog mode -> reset after expired time */
168
/* WDT is clocked by fSMCLK (assumed 1MHz) */
169
#define WDT_MRST_32         (WDTPW+WDTCNTCL)                                  /* 32ms interval (default) */
170
#define WDT_MRST_8          (WDTPW+WDTCNTCL+WDTIS0)                           /* 8ms     " */
171
#define WDT_MRST_0_5        (WDTPW+WDTCNTCL+WDTIS1)                           /* 0.5ms   " */
172
#define WDT_MRST_0_064      (WDTPW+WDTCNTCL+WDTIS1+WDTIS0)                    /* 0.064ms " */
173
/* WDT is clocked by fACLK (assumed 32KHz) */
174
#define WDT_ARST_1000       (WDTPW+WDTCNTCL+WDTSSEL)                          /* 1000ms  " */
175
#define WDT_ARST_250        (WDTPW+WDTCNTCL+WDTSSEL+WDTIS0)                   /* 250ms   " */
176
#define WDT_ARST_16         (WDTPW+WDTCNTCL+WDTSSEL+WDTIS1)                   /* 16ms    " */
177
#define WDT_ARST_1_9        (WDTPW+WDTCNTCL+WDTSSEL+WDTIS1+WDTIS0)            /* 1.9ms   " */
178
 
179
/* INTERRUPT CONTROL */
180
/* These two bits are defined in the Special Function Registers */
181
/* #define WDTIE               0x01 */
182
/* #define WDTIFG              0x01 */
183
 
184
/************************************************************
185
* DIGITAL I/O Port1/2
186
************************************************************/
187
#define __MSP430_HAS_PORT1__                  /* Definition to show that Module is available */
188
#define __MSP430_HAS_PORT2__                  /* Definition to show that Module is available */
189
 
190
SFR_8BIT(P1IN);                               /* Port 1 Input */
191
SFR_8BIT(P1OUT);                              /* Port 1 Output */
192
SFR_8BIT(P1DIR);                              /* Port 1 Direction */
193
SFR_8BIT(P1IFG);                              /* Port 1 Interrupt Flag */
194
SFR_8BIT(P1IES);                              /* Port 1 Interrupt Edge Select */
195
SFR_8BIT(P1IE);                               /* Port 1 Interrupt Enable */
196
SFR_8BIT(P1SEL);                              /* Port 1 Selection */
197
 
198
SFR_8BIT(P2IN);                               /* Port 2 Input */
199
SFR_8BIT(P2OUT);                              /* Port 2 Output */
200
SFR_8BIT(P2DIR);                              /* Port 2 Direction */
201
SFR_8BIT(P2IFG);                              /* Port 2 Interrupt Flag */
202
SFR_8BIT(P2IES);                              /* Port 2 Interrupt Edge Select */
203
SFR_8BIT(P2IE);                               /* Port 2 Interrupt Enable */
204
SFR_8BIT(P2SEL);                              /* Port 2 Selection */
205
 
206
/************************************************************
207
* BASIC TIMER
208
************************************************************/
209
#define __MSP430_HAS_BT__                     /* Definition to show that Module is available */
210
 
211
SFR_8BIT(BTCTL);                              /* Basic Timer Control */
212
/* The bit names have been prefixed with "BT" */
213
#define BTIP0                  (0x01)
214
#define BTIP1                  (0x02)
215
#define BTIP2                  (0x04)
216
#define BTFRFQ0                (0x08)
217
#define BTFRFQ1                (0x10)
218
#define BTDIV                  (0x20)         /* fCLK2 = ACLK:256 */
219
#define BTHOLD                 (0x40)         /* BT1 is held if this bit is set */
220
#define BTSSEL                 (0x80)         /* fBT = fMCLK (main clock) */
221
 
222
SFR_8BIT(BTCNT1);                             /* Basic Timer Count 1 */
223
SFR_8BIT(BTCNT2);                             /* Basic Timer Count 2 */
224
 
225
/* Frequency of the BTCNT2 coded with Bit 5 and 7 in BTCTL */
226
#define BT_fCLK2_ACLK          (0x00)
227
#define BT_fCLK2_ACLK_DIV256   (BTDIV)
228
#define BT_fCLK2_MCLK          (BTSSEL)
229
 
230
/* Interrupt interval time fINT coded with Bits 0-2 in BTCTL */
231
#define BT_fCLK2_DIV2          (0x00)         /* fINT = fCLK2:2 (default) */
232
#define BT_fCLK2_DIV4          (BTIP0)        /* fINT = fCLK2:4 */
233
#define BT_fCLK2_DIV8          (BTIP1)        /* fINT = fCLK2:8 */
234
#define BT_fCLK2_DIV16         (BTIP1+BTIP0)  /* fINT = fCLK2:16 */
235
#define BT_fCLK2_DIV32         (BTIP2)        /* fINT = fCLK2:32 */
236
#define BT_fCLK2_DIV64         (BTIP2+BTIP0)  /* fINT = fCLK2:64 */
237
#define BT_fCLK2_DIV128        (BTIP2+BTIP1)  /* fINT = fCLK2:128 */
238
#define BT_fCLK2_DIV256     (BTIP2+BTIP1+BTIP0)       /* fINT = fCLK2:256 */
239
/* Frequency of LCD coded with Bits 3-4 */
240
#define BT_fLCD_DIV32          (0x00)         /* fLCD = fACLK:32 (default) */
241
#define BT_fLCD_DIV64          (BTFRFQ0)      /* fLCD = fACLK:64 */
242
#define BT_fLCD_DIV128         (BTFRFQ1)      /* fLCD = fACLK:128 */
243
#define BT_fLCD_DIV256      (BTFRFQ1+BTFRFQ0)         /* fLCD = fACLK:256 */
244
/* LCD frequency values with fBT=fACLK */
245
#define BT_fLCD_1K             (0x00)         /* fACLK:32 (default) */
246
#define BT_fLCD_512            (BTFRFQ0)      /* fACLK:64 */
247
#define BT_fLCD_256            (BTFRFQ1)      /* fACLK:128 */
248
#define BT_fLCD_128         (BTFRFQ1+BTFRFQ0)         /* fACLK:256 */
249
/* LCD frequency values with fBT=fMCLK */
250
#define BT_fLCD_31K            (BTSSEL)       /* fMCLK:32 */
251
#define BT_fLCD_15_5K       (BTSSEL+BTFRFQ0)          /* fMCLK:64 */
252
#define BT_fLCD_7_8K        (BTSSEL+BTFRFQ1+BTFRFQ0)  /* fMCLK:256 */
253
/* with assumed vlues of fACLK=32KHz, fMCLK=1MHz */
254
/* fBT=fACLK is thought for longer interval times */
255
#define BT_ADLY_0_064          (0x00)         /* 0.064ms interval (default) */
256
#define BT_ADLY_0_125          (BTIP0)        /* 0.125ms    " */
257
#define BT_ADLY_0_25           (BTIP1)        /* 0.25ms     " */
258
#define BT_ADLY_0_5            (BTIP1+BTIP0)  /* 0.5ms      " */
259
#define BT_ADLY_1              (BTIP2)        /* 1ms        " */
260
#define BT_ADLY_2              (BTIP2+BTIP0)  /* 2ms        " */
261
#define BT_ADLY_4              (BTIP2+BTIP1)  /* 4ms        " */
262
#define BT_ADLY_8           (BTIP2+BTIP1+BTIP0)       /* 8ms        " */
263
#define BT_ADLY_16             (BTDIV)        /* 16ms       " */
264
#define BT_ADLY_32             (BTDIV+BTIP0)  /* 32ms       " */
265
#define BT_ADLY_64             (BTDIV+BTIP1)  /* 64ms       " */
266
#define BT_ADLY_125         (BTDIV+BTIP1+BTIP0)       /* 125ms      " */
267
#define BT_ADLY_250            (BTDIV+BTIP2)  /* 250ms      " */
268
#define BT_ADLY_500         (BTDIV+BTIP2+BTIP0)       /* 500ms      " */
269
#define BT_ADLY_1000        (BTDIV+BTIP2+BTIP1)       /* 1000ms     " */
270
#define BT_ADLY_2000        (BTDIV+BTIP2+BTIP1+BTIP0) /* 2000ms     " */
271
/* fCLK2=fMCLK (1MHz) is thought for short interval times */
272
/* the timing for short intervals is more precise than ACLK */
273
/* NOTE */
274
/* Be sure that the SCFQCTL-Register is set to 01Fh so that fMCLK=1MHz */
275
/* Too low interval time results in interrupts too frequent for the processor to handle! */
276
#define BT_MDLY_0_002          (BTSSEL)       /* 0.002ms interval       *** interval times */
277
#define BT_MDLY_0_004          (BTSSEL+BTIP0) /* 0.004ms    "           *** too short for */
278
#define BT_MDLY_0_008          (BTSSEL+BTIP1) /* 0.008ms    "           *** interrupt */
279
#define BT_MDLY_0_016       (BTSSEL+BTIP1+BTIP0)      /* 0.016ms    "           *** handling */
280
#define BT_MDLY_0_032          (BTSSEL+BTIP2) /* 0.032ms    " */
281
#define BT_MDLY_0_064       (BTSSEL+BTIP2+BTIP0)      /* 0.064ms    " */
282
#define BT_MDLY_0_125       (BTSSEL+BTIP2+BTIP1)      /* 0.125ms    " */
283
#define BT_MDLY_0_25        (BTSSEL+BTIP2+BTIP1+BTIP0)/* 0.25ms     " */
284
 
285
/* Reset/Hold coded with Bits 6-7 in BT(1)CTL */
286
/* this is for BT */
287
//#define BTRESET_CNT1        (BTRESET)           /* BTCNT1 is reset while BTRESET is set */
288
//#define BTRESET_CNT1_2      (BTRESET+BTDIV)     /* BTCNT1 .AND. BTCNT2 are reset while ~ is set */
289
/* this is for BT1 */
290
#define BTHOLD_CNT1            (BTHOLD)       /* BTCNT1 is held while BTHOLD is set */
291
#define BTHOLD_CNT1_2          (BTHOLD+BTDIV) /* BT1CNT1 .AND. BT1CNT2 are held while ~ is set */
292
 
293
/* INTERRUPT CONTROL BITS */
294
/* #define BTIE                0x80 */
295
/* #define BTIFG               0x80 */
296
 
297
/************************************************************
298
* SYSTEM CLOCK, FLL+ (x41x)
299
************************************************************/
300
#define __MSP430_HAS_FLLPLUS_SMALL__                /* Definition to show that Module is available */
301
 
302
SFR_8BIT(SCFI0);                              /* System Clock Frequency Integrator 0 */
303
#define FN_2                   (0x04)         /* fDCOCLK =   1.4-12MHz*/
304
#define FN_3                   (0x08)         /* fDCOCLK =   2.2-17Mhz*/
305
#define FN_4                   (0x10)         /* fDCOCLK =   3.2-25Mhz*/
306
#define FN_8                   (0x20)         /* fDCOCLK =     5-40Mhz*/
307
#define FLLD0                  (0x40)         /* Loop Divider Bit : 0 */
308
#define FLLD1                  (0x80)         /* Loop Divider Bit : 1 */
309
 
310
#define FLLD_1                 (0x00)         /* Multiply Selected Loop Freq. By 1 */
311
#define FLLD_2                 (0x40)         /* Multiply Selected Loop Freq. By 2 */
312
#define FLLD_4                 (0x80)         /* Multiply Selected Loop Freq. By 4 */
313
#define FLLD_8                 (0xC0)         /* Multiply Selected Loop Freq. By 8 */
314
 
315
SFR_8BIT(SCFI1);                              /* System Clock Frequency Integrator 1 */
316
SFR_8BIT(SCFQCTL);                            /* System Clock Frequency Control */
317
/* System clock frequency values fMCLK coded with Bits 0-6 in SCFQCTL */
318
/* #define SCFQ_32K            0x00                        fMCLK=1*fACLK       only a range from */
319
#define SCFQ_64K               (0x01)         /* fMCLK=2*fACLK          1+1 to 127+1 is possible */
320
#define SCFQ_128K              (0x03)         /* fMCLK=4*fACLK */
321
#define SCFQ_256K              (0x07)         /* fMCLK=8*fACLK */
322
#define SCFQ_512K              (0x0F)         /* fMCLK=16*fACLK */
323
#define SCFQ_1M                (0x1F)         /* fMCLK=32*fACLK */
324
#define SCFQ_2M                (0x3F)         /* fMCLK=64*fACLK */
325
#define SCFQ_4M                (0x7F)         /* fMCLK=128*fACLK */
326
#define SCFQ_M                 (0x80)         /* Modulation Disable */
327
 
328
SFR_8BIT(FLL_CTL0);                           /* FLL+ Control 0 */
329
#define DCOF                   (0x01)         /* DCO Fault Flag */
330
#define LFOF                   (0x02)         /* Low Frequency Oscillator Fault Flag */
331
#define XT1OF                  (0x04)         /* High Frequency Oscillator Fault Flag */
332
#define OSCCAP0                (0x10)         /* XIN/XOUT Cap 0 */
333
#define OSCCAP1                (0x20)         /* XIN/XOUT Cap 1 */
334
#define XTS_FLL                (0x40)         /* 1: Selects high-freq. oscillator */
335
#define DCOPLUS                (0x80)         /* DCO+ Enable */
336
 
337
#define XCAP0PF                (0x00)         /* XIN Cap = XOUT Cap = 0pf */
338
#define XCAP10PF               (0x10)         /* XIN Cap = XOUT Cap = 10pf */
339
#define XCAP14PF               (0x20)         /* XIN Cap = XOUT Cap = 14pf */
340
#define XCAP18PF               (0x30)         /* XIN Cap = XOUT Cap = 18pf */
341
#define OSCCAP_0               (0x00)         /* XIN Cap = XOUT Cap = 0pf */
342
#define OSCCAP_1               (0x10)         /* XIN Cap = XOUT Cap = 10pf */
343
#define OSCCAP_2               (0x20)         /* XIN Cap = XOUT Cap = 14pf */
344
#define OSCCAP_3               (0x30)         /* XIN Cap = XOUT Cap = 18pf */
345
 
346
SFR_8BIT(FLL_CTL1);                           /* FLL+ Control 1 */
347
#define FLL_DIV0               (0x01)         /* FLL+ Divide Px.x/ACLK 0 */
348
#define FLL_DIV1               (0x02)         /* FLL+ Divide Px.x/ACLK 1 */
349
 
350
#define FLL_DIV_1              (0x00)         /* FLL+ Divide Px.x/ACLK By 1 */
351
#define FLL_DIV_2              (0x01)         /* FLL+ Divide Px.x/ACLK By 2 */
352
#define FLL_DIV_4              (0x02)         /* FLL+ Divide Px.x/ACLK By 4 */
353
#define FLL_DIV_8              (0x03)         /* FLL+ Divide Px.x/ACLK By 8 */
354
 
355
/* INTERRUPT CONTROL BITS */
356
/* These two bits are defined in the Special Function Registers */
357
/* #define OFIFG               0x02 */
358
/* #define OFIE                0x02 */
359
 
360
/************************************************************
361
* Brown-Out, Supply Voltage Supervision (SVS)
362
************************************************************/
363
#define __MSP430_HAS_SVS__                    /* Definition to show that Module is available */
364
 
365
SFR_8BIT(SVSCTL);                             /* SVS Control */
366
#define SVSFG                  (0x01)         /* SVS Flag */
367
#define SVSOP                  (0x02)         /* SVS output (read only) */
368
#define SVSON                  (0x04)         /* Switches the SVS on/off */
369
#define PORON                  (0x08)         /* Enable POR Generation if Low Voltage */
370
#define VLD0                   (0x10)
371
#define VLD1                   (0x20)
372
#define VLD2                   (0x40)
373
#define VLD3                   (0x80)
374
 
375
#define VLDON                  (0x10)
376
#define VLDOFF                 (0x00)
377
#define VLD_1_8V               (0x10)
378
 
379
/************************************************************
380
* LCD
381
************************************************************/
382
#define __MSP430_HAS_LCD4__                   /* Definition to show that Module is available */
383
 
384
SFR_8BIT(LCDCTL);                             /* LCD Control */
385
/* the names of the mode bits are different from the spec */
386
#define LCDON                  (0x01)
387
//#define LCDLOWR             (0x02)
388
#define LCDSON                 (0x04)
389
#define LCDMX0                 (0x08)
390
#define LCDMX1                 (0x10)
391
#define LCDP0                  (0x20)
392
#define LCDP1                  (0x40)
393
#define LCDP2                  (0x80)
394
/* Display modes coded with Bits 2-4 */
395
#define LCDSTATIC              (LCDSON)
396
#define LCD2MUX                (LCDMX0+LCDSON)
397
#define LCD3MUX                (LCDMX1+LCDSON)
398
#define LCD4MUX                (LCDMX1+LCDMX0+LCDSON)
399
/* Group select code with Bits 5-7                     Seg.lines   Dig.output */
400
#define LCDSG0                 (0x00)         /* ---------   Port Only (default) */
401
#define LCDSG0_1               (LCDP0)        /* S0  - S15   see Datasheet */
402
#define LCDSG0_2               (LCDP1)        /* S0  - S19   see Datasheet */
403
#define LCDSG0_3               (LCDP1+LCDP0)  /* S0  - S23   see Datasheet */
404
#define LCDSG0_4               (LCDP2)        /* S0  - S27   see Datasheet */
405
#define LCDSG0_5               (LCDP2+LCDP0)  /* S0  - S31   see Datasheet */
406
#define LCDSG0_6               (LCDP2+LCDP1)  /* S0  - S35   see Datasheet */
407
#define LCDSG0_7            (LCDP2+LCDP1+LCDP0)       /* S0  - S39   see Datasheet */
408
/* NOTE: YOU CAN ONLY USE THE 'S' OR 'G' DECLARATIONS FOR A COMMAND */
409
/* MOV  #LCDSG0_3+LCDOG2_7,&LCDCTL ACTUALY MEANS MOV  #LCDP1,&LCDCTL! */
410
#define LCDOG1_7               (0x00)         /* ---------   Port Only (default) */
411
#define LCDOG2_7               (LCDP0)        /* S0  - S15   see Datasheet */
412
#define LCDOG3_7               (LCDP1)        /* S0  - S19   see Datasheet */
413
#define LCDOG4_7               (LCDP1+LCDP0)  /* S0  - S23   see Datasheet */
414
#define LCDOG5_7               (LCDP2)        /* S0  - S27   see Datasheet */
415
#define LCDOG6_7               (LCDP2+LCDP0)  /* S0  - S31   see Datasheet */
416
#define LCDOG7                 (LCDP2+LCDP1)  /* S0  - S35   see Datasheet */
417
#define LCDOGOFF            (LCDP2+LCDP1+LCDP0)       /* S0  - S39   see Datasheet */
418
 
419
#define LCDMEM_                (0x0091)       /* LCD Memory */
420
#ifdef __ASM_HEADER__
421
#define LCDMEM                 (LCDMEM_)      /* LCD Memory (for assembler) */
422
#else
423
#define LCDMEM                 ((char*)       LCDMEM_) /* LCD Memory (for C) */
424
#endif
425
SFR_8BIT(LCDM1);                              /* LCD Memory 1 */
426
SFR_8BIT(LCDM2);                              /* LCD Memory 2 */
427
SFR_8BIT(LCDM3);                              /* LCD Memory 3 */
428
SFR_8BIT(LCDM4);                              /* LCD Memory 4 */
429
SFR_8BIT(LCDM5);                              /* LCD Memory 5 */
430
SFR_8BIT(LCDM6);                              /* LCD Memory 6 */
431
SFR_8BIT(LCDM7);                              /* LCD Memory 7 */
432
SFR_8BIT(LCDM8);                              /* LCD Memory 8 */
433
SFR_8BIT(LCDM9);                              /* LCD Memory 9 */
434
SFR_8BIT(LCDM10);                             /* LCD Memory 10 */
435
SFR_8BIT(LCDM11);                             /* LCD Memory 11 */
436
SFR_8BIT(LCDM12);                             /* LCD Memory 12 */
437
SFR_8BIT(LCDM13);                             /* LCD Memory 13 */
438
SFR_8BIT(LCDM14);                             /* LCD Memory 14 */
439
SFR_8BIT(LCDM15);                             /* LCD Memory 15 */
440
SFR_8BIT(LCDM16);                             /* LCD Memory 16 */
441
SFR_8BIT(LCDM17);                             /* LCD Memory 17 */
442
SFR_8BIT(LCDM18);                             /* LCD Memory 18 */
443
SFR_8BIT(LCDM19);                             /* LCD Memory 19 */
444
SFR_8BIT(LCDM20);                             /* LCD Memory 20 */
445
 
446
#define LCDMA                  (LCDM10)       /* LCD Memory A */
447
#define LCDMB                  (LCDM11)       /* LCD Memory B */
448
#define LCDMC                  (LCDM12)       /* LCD Memory C */
449
#define LCDMD                  (LCDM13)       /* LCD Memory D */
450
#define LCDME                  (LCDM14)       /* LCD Memory E */
451
#define LCDMF                  (LCDM15)       /* LCD Memory F */
452
 
453
/************************************************************
454
* USART
455
************************************************************/
456
 
457
/* UxCTL */
458
#define PENA                   (0x80)         /* Parity enable */
459
#define PEV                    (0x40)         /* Parity 0:odd / 1:even */
460
#define SPB                    (0x20)         /* Stop Bits 0:one / 1: two */
461
#define CHAR                   (0x10)         /* Data 0:7-bits / 1:8-bits */
462
#define LISTEN                 (0x08)         /* Listen mode */
463
#define SYNC                   (0x04)         /* UART / SPI mode */
464
#define MM                     (0x02)         /* Master Mode off/on */
465
#define SWRST                  (0x01)         /* USART Software Reset */
466
 
467
/* UxTCTL */
468
#define CKPH                   (0x80)         /* SPI: Clock Phase */
469
#define CKPL                   (0x40)         /* Clock Polarity */
470
#define SSEL1                  (0x20)         /* Clock Source Select 1 */
471
#define SSEL0                  (0x10)         /* Clock Source Select 0 */
472
#define URXSE                  (0x08)         /* Receive Start edge select */
473
#define TXWAKE                 (0x04)         /* TX Wake up mode */
474
#define STC                    (0x02)         /* SPI: STC enable 0:on / 1:off */
475
#define TXEPT                  (0x01)         /* TX Buffer empty */
476
 
477
/* UxRCTL */
478
#define FE                     (0x80)         /* Frame Error */
479
#define PE                     (0x40)         /* Parity Error */
480
#define OE                     (0x20)         /* Overrun Error */
481
#define BRK                    (0x10)         /* Break detected */
482
#define URXEIE                 (0x08)         /* RX Error interrupt enable */
483
#define URXWIE                 (0x04)         /* RX Wake up interrupt enable */
484
#define RXWAKE                 (0x02)         /* RX Wake up detect */
485
#define RXERR                  (0x01)         /* RX Error Error */
486
 
487
/************************************************************
488
* USART 0
489
************************************************************/
490
#define __MSP430_HAS_UART0__                  /* Definition to show that Module is available */
491
 
492
SFR_8BIT(U0CTL);                              /* USART 0 Control */
493
SFR_8BIT(U0TCTL);                             /* USART 0 Transmit Control */
494
SFR_8BIT(U0RCTL);                             /* USART 0 Receive Control */
495
SFR_8BIT(U0MCTL);                             /* USART 0 Modulation Control */
496
SFR_8BIT(U0BR0);                              /* USART 0 Baud Rate 0 */
497
SFR_8BIT(U0BR1);                              /* USART 0 Baud Rate 1 */
498
SFR_8BIT(U0RXBUF);                            /* USART 0 Receive Buffer */
499
SFR_8BIT(U0TXBUF);                            /* USART 0 Transmit Buffer */
500
 
501
/* Alternate register names */
502
 
503
#define UCTL0                  U0CTL          /* USART 0 Control */
504
#define UTCTL0                 U0TCTL         /* USART 0 Transmit Control */
505
#define URCTL0                 U0RCTL         /* USART 0 Receive Control */
506
#define UMCTL0                 U0MCTL         /* USART 0 Modulation Control */
507
#define UBR00                  U0BR0          /* USART 0 Baud Rate 0 */
508
#define UBR10                  U0BR1          /* USART 0 Baud Rate 1 */
509
#define RXBUF0                 U0RXBUF        /* USART 0 Receive Buffer */
510
#define TXBUF0                 U0TXBUF        /* USART 0 Transmit Buffer */
511
#define UCTL0_                 U0CTL_         /* USART 0 Control */
512
#define UTCTL0_                U0TCTL_        /* USART 0 Transmit Control */
513
#define URCTL0_                U0RCTL_        /* USART 0 Receive Control */
514
#define UMCTL0_                U0MCTL_        /* USART 0 Modulation Control */
515
#define UBR00_                 U0BR0_         /* USART 0 Baud Rate 0 */
516
#define UBR10_                 U0BR1_         /* USART 0 Baud Rate 1 */
517
#define RXBUF0_                U0RXBUF_       /* USART 0 Receive Buffer */
518
#define TXBUF0_                U0TXBUF_       /* USART 0 Transmit Buffer */
519
#define UCTL_0                 U0CTL          /* USART 0 Control */
520
#define UTCTL_0                U0TCTL         /* USART 0 Transmit Control */
521
#define URCTL_0                U0RCTL         /* USART 0 Receive Control */
522
#define UMCTL_0                U0MCTL         /* USART 0 Modulation Control */
523
#define UBR0_0                 U0BR0          /* USART 0 Baud Rate 0 */
524
#define UBR1_0                 U0BR1          /* USART 0 Baud Rate 1 */
525
#define RXBUF_0                U0RXBUF        /* USART 0 Receive Buffer */
526
#define TXBUF_0                U0TXBUF        /* USART 0 Transmit Buffer */
527
#define UCTL_0_                U0CTL_         /* USART 0 Control */
528
#define UTCTL_0_               U0TCTL_        /* USART 0 Transmit Control */
529
#define URCTL_0_               U0RCTL_        /* USART 0 Receive Control */
530
#define UMCTL_0_               U0MCTL_        /* USART 0 Modulation Control */
531
#define UBR0_0_                U0BR0_         /* USART 0 Baud Rate 0 */
532
#define UBR1_0_                U0BR1_         /* USART 0 Baud Rate 1 */
533
#define RXBUF_0_               U0RXBUF_       /* USART 0 Receive Buffer */
534
#define TXBUF_0_               U0TXBUF_       /* USART 0 Transmit Buffer */
535
 
536
/************************************************************
537
* Timer A3
538
************************************************************/
539
#define __MSP430_HAS_TA3__                    /* Definition to show that Module is available */
540
 
541
SFR_16BIT(TAIV);                              /* Timer A Interrupt Vector Word */
542
SFR_16BIT(TACTL);                             /* Timer A Control */
543
SFR_16BIT(TACCTL0);                           /* Timer A Capture/Compare Control 0 */
544
SFR_16BIT(TACCTL1);                           /* Timer A Capture/Compare Control 1 */
545
SFR_16BIT(TACCTL2);                           /* Timer A Capture/Compare Control 2 */
546
SFR_16BIT(TAR);                               /* Timer A Counter Register */
547
SFR_16BIT(TACCR0);                            /* Timer A Capture/Compare 0 */
548
SFR_16BIT(TACCR1);                            /* Timer A Capture/Compare 1 */
549
SFR_16BIT(TACCR2);                            /* Timer A Capture/Compare 2 */
550
 
551
/* Alternate register names */
552
#define CCTL0                  TACCTL0        /* Timer A Capture/Compare Control 0 */
553
#define CCTL1                  TACCTL1        /* Timer A Capture/Compare Control 1 */
554
#define CCTL2                  TACCTL2        /* Timer A Capture/Compare Control 2 */
555
#define CCR0                   TACCR0         /* Timer A Capture/Compare 0 */
556
#define CCR1                   TACCR1         /* Timer A Capture/Compare 1 */
557
#define CCR2                   TACCR2         /* Timer A Capture/Compare 2 */
558
#define CCTL0_                 TACCTL0_       /* Timer A Capture/Compare Control 0 */
559
#define CCTL1_                 TACCTL1_       /* Timer A Capture/Compare Control 1 */
560
#define CCTL2_                 TACCTL2_       /* Timer A Capture/Compare Control 2 */
561
#define CCR0_                  TACCR0_        /* Timer A Capture/Compare 0 */
562
#define CCR1_                  TACCR1_        /* Timer A Capture/Compare 1 */
563
#define CCR2_                  TACCR2_        /* Timer A Capture/Compare 2 */
564
/* Alternate register names - 5xx style */
565
#define TA0IV                  TAIV           /* Timer A Interrupt Vector Word */
566
#define TA0CTL                 TACTL          /* Timer A Control */
567
#define TA0CCTL0               TACCTL0        /* Timer A Capture/Compare Control 0 */
568
#define TA0CCTL1               TACCTL1        /* Timer A Capture/Compare Control 1 */
569
#define TA0CCTL2               TACCTL2        /* Timer A Capture/Compare Control 2 */
570
#define TA0R                   TAR            /* Timer A Counter Register */
571
#define TA0CCR0                TACCR0         /* Timer A Capture/Compare 0 */
572
#define TA0CCR1                TACCR1         /* Timer A Capture/Compare 1 */
573
#define TA0CCR2                TACCR2         /* Timer A Capture/Compare 2 */
574
#define TA0IV_                 TAIV_          /* Timer A Interrupt Vector Word */
575
#define TA0CTL_                TACTL_         /* Timer A Control */
576
#define TA0CCTL0_              TACCTL0_       /* Timer A Capture/Compare Control 0 */
577
#define TA0CCTL1_              TACCTL1_       /* Timer A Capture/Compare Control 1 */
578
#define TA0CCTL2_              TACCTL2_       /* Timer A Capture/Compare Control 2 */
579
#define TA0R_                  TAR_           /* Timer A Counter Register */
580
#define TA0CCR0_               TACCR0_        /* Timer A Capture/Compare 0 */
581
#define TA0CCR1_               TACCR1_        /* Timer A Capture/Compare 1 */
582
#define TA0CCR2_               TACCR2_        /* Timer A Capture/Compare 2 */
583
 
584
#define TASSEL1                (0x0200)       /* Timer A clock source select 0 */
585
#define TASSEL0                (0x0100)       /* Timer A clock source select 1 */
586
#define ID1                    (0x0080)       /* Timer A clock input divider 1 */
587
#define ID0                    (0x0040)       /* Timer A clock input divider 0 */
588
#define MC1                    (0x0020)       /* Timer A mode control 1 */
589
#define MC0                    (0x0010)       /* Timer A mode control 0 */
590
#define TACLR                  (0x0004)       /* Timer A counter clear */
591
#define TAIE                   (0x0002)       /* Timer A counter interrupt enable */
592
#define TAIFG                  (0x0001)       /* Timer A counter interrupt flag */
593
 
594
#define MC_0                   (0*0x10u)      /* Timer A mode control: 0 - Stop */
595
#define MC_1                   (1*0x10u)      /* Timer A mode control: 1 - Up to CCR0 */
596
#define MC_2                   (2*0x10u)      /* Timer A mode control: 2 - Continous up */
597
#define MC_3                   (3*0x10u)      /* Timer A mode control: 3 - Up/Down */
598
#define ID_0                   (0*0x40u)      /* Timer A input divider: 0 - /1 */
599
#define ID_1                   (1*0x40u)      /* Timer A input divider: 1 - /2 */
600
#define ID_2                   (2*0x40u)      /* Timer A input divider: 2 - /4 */
601
#define ID_3                   (3*0x40u)      /* Timer A input divider: 3 - /8 */
602
#define TASSEL_0               (0*0x100u)     /* Timer A clock source select: 0 - TACLK */
603
#define TASSEL_1               (1*0x100u)     /* Timer A clock source select: 1 - ACLK  */
604
#define TASSEL_2               (2*0x100u)     /* Timer A clock source select: 2 - SMCLK */
605
#define TASSEL_3               (3*0x100u)     /* Timer A clock source select: 3 - INCLK */
606
 
607
#define CM1                    (0x8000)       /* Capture mode 1 */
608
#define CM0                    (0x4000)       /* Capture mode 0 */
609
#define CCIS1                  (0x2000)       /* Capture input select 1 */
610
#define CCIS0                  (0x1000)       /* Capture input select 0 */
611
#define SCS                    (0x0800)       /* Capture sychronize */
612
#define SCCI                   (0x0400)       /* Latched capture signal (read) */
613
#define CAP                    (0x0100)       /* Capture mode: 1 /Compare mode : 0 */
614
#define OUTMOD2                (0x0080)       /* Output mode 2 */
615
#define OUTMOD1                (0x0040)       /* Output mode 1 */
616
#define OUTMOD0                (0x0020)       /* Output mode 0 */
617
#define CCIE                   (0x0010)       /* Capture/compare interrupt enable */
618
#define CCI                    (0x0008)       /* Capture input signal (read) */
619
#define OUT                    (0x0004)       /* PWM Output signal if output mode 0 */
620
#define COV                    (0x0002)       /* Capture/compare overflow flag */
621
#define CCIFG                  (0x0001)       /* Capture/compare interrupt flag */
622
 
623
#define OUTMOD_0               (0*0x20u)      /* PWM output mode: 0 - output only */
624
#define OUTMOD_1               (1*0x20u)      /* PWM output mode: 1 - set */
625
#define OUTMOD_2               (2*0x20u)      /* PWM output mode: 2 - PWM toggle/reset */
626
#define OUTMOD_3               (3*0x20u)      /* PWM output mode: 3 - PWM set/reset */
627
#define OUTMOD_4               (4*0x20u)      /* PWM output mode: 4 - toggle */
628
#define OUTMOD_5               (5*0x20u)      /* PWM output mode: 5 - Reset */
629
#define OUTMOD_6               (6*0x20u)      /* PWM output mode: 6 - PWM toggle/set */
630
#define OUTMOD_7               (7*0x20u)      /* PWM output mode: 7 - PWM reset/set */
631
#define CCIS_0                 (0*0x1000u)    /* Capture input select: 0 - CCIxA */
632
#define CCIS_1                 (1*0x1000u)    /* Capture input select: 1 - CCIxB */
633
#define CCIS_2                 (2*0x1000u)    /* Capture input select: 2 - GND */
634
#define CCIS_3                 (3*0x1000u)    /* Capture input select: 3 - Vcc */
635
#define CM_0                   (0*0x4000u)    /* Capture mode: 0 - disabled */
636
#define CM_1                   (1*0x4000u)    /* Capture mode: 1 - pos. edge */
637
#define CM_2                   (2*0x4000u)    /* Capture mode: 1 - neg. edge */
638
#define CM_3                   (3*0x4000u)    /* Capture mode: 1 - both edges */
639
 
640
/* TA3IV Definitions */
641
#define TAIV_NONE              (0x0000)       /* No Interrupt pending */
642
#define TAIV_TACCR1            (0x0002)       /* TACCR1_CCIFG */
643
#define TAIV_TACCR2            (0x0004)       /* TACCR2_CCIFG */
644
#define TAIV_6                 (0x0006)       /* Reserved */
645
#define TAIV_8                 (0x0008)       /* Reserved */
646
#define TAIV_TAIFG             (0x000A)       /* TAIFG */
647
 
648
/*************************************************************
649
* Flash Memory
650
*************************************************************/
651
#define __MSP430_HAS_FLASH__                  /* Definition to show that Module is available */
652
 
653
SFR_16BIT(FCTL1);                             /* FLASH Control 1 */
654
SFR_16BIT(FCTL2);                             /* FLASH Control 2 */
655
SFR_16BIT(FCTL3);                             /* FLASH Control 3 */
656
 
657
#define FRKEY                  (0x9600)       /* Flash key returned by read */
658
#define FWKEY                  (0xA500)       /* Flash key for write */
659
#define FXKEY                  (0x3300)       /* for use with XOR instruction */
660
 
661
#define ERASE                  (0x0002)       /* Enable bit for Flash segment erase */
662
#define MERAS                  (0x0004)       /* Enable bit for Flash mass erase */
663
#define WRT                    (0x0040)       /* Enable bit for Flash write */
664
#define BLKWRT                 (0x0080)       /* Enable bit for Flash segment write */
665
#define SEGWRT                 (0x0080)       /* old definition */ /* Enable bit for Flash segment write */
666
 
667
#define FN0                    (0x0001)       /* Divide Flash clock by 1 to 64 using FN0 to FN5 according to: */
668
#define FN1                    (0x0002)       /*  32*FN5 + 16*FN4 + 8*FN3 + 4*FN2 + 2*FN1 + FN0 + 1 */
669
#ifndef FN2
670
#define FN2                    (0x0004)
671
#endif
672
#ifndef FN3
673
#define FN3                    (0x0008)
674
#endif
675
#ifndef FN4
676
#define FN4                    (0x0010)
677
#endif
678
#define FN5                    (0x0020)
679
#define FSSEL0                 (0x0040)       /* Flash clock select 0 */        /* to distinguish from USART SSELx */
680
#define FSSEL1                 (0x0080)       /* Flash clock select 1 */
681
 
682
#define FSSEL_0                (0x0000)       /* Flash clock select: 0 - ACLK */
683
#define FSSEL_1                (0x0040)       /* Flash clock select: 1 - MCLK */
684
#define FSSEL_2                (0x0080)       /* Flash clock select: 2 - SMCLK */
685
#define FSSEL_3                (0x00C0)       /* Flash clock select: 3 - SMCLK */
686
 
687
#define BUSY                   (0x0001)       /* Flash busy: 1 */
688
#define KEYV                   (0x0002)       /* Flash Key violation flag */
689
#define ACCVIFG                (0x0004)       /* Flash Access violation flag */
690
#define WAIT                   (0x0008)       /* Wait flag for segment write */
691
#define LOCK                   (0x0010)       /* Lock bit: 1 - Flash is locked (read only) */
692
#define EMEX                   (0x0020)       /* Flash Emergency Exit */
693
 
694
/************************************************************
695
* HARDWARE MULTIPLIER
696
************************************************************/
697
#define __MSP430_HAS_MPY__                    /* Definition to show that Module is available */
698
 
699
SFR_16BIT(MPY);                               /* Multiply Unsigned/Operand 1 */
700
SFR_16BIT(MPYS);                              /* Multiply Signed/Operand 1 */
701
SFR_16BIT(MAC);                               /* Multiply Unsigned and Accumulate/Operand 1 */
702
SFR_16BIT(MACS);                              /* Multiply Signed and Accumulate/Operand 1 */
703
SFR_16BIT(OP2);                               /* Operand 2 */
704
SFR_16BIT(RESLO);                             /* Result Low Word */
705
SFR_16BIT(RESHI);                             /* Result High Word */
706
SFR_16BIT(SUMEXT);                            /* Sum Extend */
707
 
708
/************************************************************
709
* SD16 - Sigma Delta 16 Bit
710
************************************************************/
711
#define __MSP430_HAS_SD16_2__                 /* Definition to show that Module is available */
712
 
713
SFR_8BIT(SD16INCTL0);                         /* SD16 Input Control Register Channel 0 */
714
SFR_8BIT(SD16INCTL1);                         /* SD16 Input Control Register Channel 1 */
715
SFR_8BIT(SD16PRE0);                           /* SD16 Preload Register Channel 0 */
716
SFR_8BIT(SD16PRE1);                           /* SD16 Preload Register Channel 1 */
717
SFR_8BIT(SD16CONF0);                          /* SD16 Internal Configuration Register 0 */
718
SFR_8BIT(SD16CONF1);                          /* SD16 Internal Configuration Register 1 */
719
                                      /* Please use only the recommended settings */
720
 
721
SFR_16BIT(SD16CTL);                           /* Sigma Delta ADC 16 Control Register */
722
SFR_16BIT(SD16CCTL0);                         /* SD16 Channel 0 Control Register */
723
SFR_16BIT(SD16CCTL1);                         /* SD16 Channel 1 Control Register */
724
SFR_16BIT(SD16IV);                            /* SD16 Interrupt Vector Register */
725
SFR_16BIT(SD16MEM0);                          /* SD16 Channel 0 Conversion Memory */
726
SFR_16BIT(SD16MEM1);                          /* SD16 Channel 1 Conversion Memory */
727
 
728
/* SD16INCTLx - AFEINCTLx */
729
#define SD16INCH0              (0x0001)       /* SD16 Input Channel select 0 */
730
#define SD16INCH1              (0x0002)       /* SD16 Input Channel select 1 */
731
#define SD16INCH2              (0x0004)       /* SD16 Input Channel select 2 */
732
#define SD16GAIN0              (0x0008)       /* SD16 Input Pre-Amplifier Gain Select 0 */
733
#define SD16GAIN1              (0x0010)       /* SD16 Input Pre-Amplifier Gain Select 1 */
734
#define SD16GAIN2              (0x0020)       /* SD16 Input Pre-Amplifier Gain Select 2 */
735
#define SD16INTDLY0            (0x0040)       /* SD16 Interrupt Delay after 1.Conversion 0 */
736
#define SD16INTDLY1            (0x0080)       /* SD16 Interrupt Delay after 1.Conversion 1 */
737
 
738
#define SD16GAIN_1             (0x0000)       /* SD16 Input Pre-Amplifier Gain Select *1  */
739
#define SD16GAIN_2             (0x0008)       /* SD16 Input Pre-Amplifier Gain Select *2  */
740
#define SD16GAIN_4             (0x0010)       /* SD16 Input Pre-Amplifier Gain Select *4  */
741
#define SD16GAIN_8             (0x0018)       /* SD16 Input Pre-Amplifier Gain Select *8  */
742
#define SD16GAIN_16            (0x0020)       /* SD16 Input Pre-Amplifier Gain Select *16 */
743
#define SD16GAIN_32            (0x0028)       /* SD16 Input Pre-Amplifier Gain Select *32 */
744
 
745
#define SD16INCH_0             (0x0000)       /* SD16 Input Channel select input */
746
#define SD16INCH_1             (0x0001)       /* SD16 Input Channel select input */
747
#define SD16INCH_2             (0x0002)       /* SD16 Input Channel select input */
748
#define SD16INCH_3             (0x0003)       /* SD16 Input Channel select input */
749
#define SD16INCH_4             (0x0004)       /* SD16 Input Channel select input */
750
#define SD16INCH_5             (0x0005)       /* SD16 Input Channel select input */
751
#define SD16INCH_6             (0x0006)       /* SD16 Input Channel select Temp */
752
#define SD16INCH_7             (0x0007)       /* SD16 Input Channel select Offset */
753
 
754
#define SD16INTDLY_0           (0x0000)       /* SD16 Interrupt Delay: Int. after 4.Conversion  */
755
#define SD16INTDLY_1           (0x0040)       /* SD16 Interrupt Delay: Int. after 3.Conversion  */
756
#define SD16INTDLY_2           (0x0080)       /* SD16 Interrupt Delay: Int. after 2.Conversion  */
757
#define SD16INTDLY_3           (0x00C0)       /* SD16 Interrupt Delay: Int. after 1.Conversion  */
758
 
759
/* SD16CTL - AFECTL */
760
#define SD16OVIE               (0x0002)       /* SD16 Overflow Interupt Enable */
761
#define SD16REFON              (0x0004)       /* SD16 Switch internal Reference on */
762
#define SD16VMIDON             (0x0008)       /* SD16 Switch Vmid Buffer on */
763
#define SD16SSEL0              (0x0010)       /* SD16 Clock Source Select 0 */
764
#define SD16SSEL1              (0x0020)       /* SD16 Clock Source Select 1 */
765
#define SD16DIV0               (0x0040)       /* SD16 Clock Divider Select 0 */
766
#define SD16DIV1               (0x0080)       /* SD16 Clock Divider Select 1 */
767
#define SD16LP                 (0x0100)       /* SD16 Low Power Mode Enable */
768
 
769
#define SD16DIV_0              (0x0000)       /* SD16 Clock Divider Select /1 */
770
#define SD16DIV_1              (SD16DIV0)     /* SD16 Clock Divider Select /2 */
771
#define SD16DIV_2              (SD16DIV1)     /* SD16 Clock Divider Select /4 */
772
#define SD16DIV_3            (SD16DIV0+SD16DIV1)    /* SD16 Clock Divider Select /8 */
773
 
774
#define SD16SSEL_0             (0x0000)       /* SD16 Clock Source Select MCLK  */
775
#define SD16SSEL_1             (SD16SSEL0)    /* SD16 Clock Source Select SMCLK */
776
#define SD16SSEL_2             (SD16SSEL1)    /* SD16 Clock Source Select ACLK  */
777
#define SD16SSEL_3           (SD16SSEL0+SD16SSEL1)  /* SD16 Clock Source Select TACLK */
778
 
779
/* SD16CCTLx - AFECCTLx */
780
#define SD16GRP                (0x0001)       /* SD16 Grouping of Channels: 0:Off/1:On */
781
#define SD16SC                 (0x0002)       /* SD16 Start Conversion */
782
#define SD16IFG                (0x0004)       /* SD16 Channel x Interrupt Flag */
783
#define SD16IE                 (0x0008)       /* SD16 Channel x Interrupt Enable */
784
#define SD16DF                 (0x0010)       /* SD16 Channel x Data Format: 0:Unipolar/1:Bipolar */
785
#define SD16OVIFG              (0x0020)       /* SD16 Channel x Overflow Interrupt Flag */
786
#define SD16LSBACC             (0x0040)       /* SD16 Channel x Access LSB of ADC */
787
#define SD16LSBTOG             (0x0080)       /* SD16 Channel x Toggle LSB Output of ADC */
788
#define SD16OSR0               (0x0100)       /* SD16 Channel x OverSampling Ratio 0 */
789
#define SD16OSR1               (0x0200)       /* SD16 Channel x OverSampling Ratio 1 */
790
#define SD16SNGL               (0x0400)       /* SD16 Channel x Single Conversion On/Off */
791
 
792
#define SD16OSR_256            (0x0000)       /* SD16 Channel x OverSampling Ratio 256 */
793
#define SD16OSR_128            (0x0100)       /* SD16 Channel x OverSampling Ratio 128 */
794
#define SD16OSR_64             (0x0200)       /* SD16 Channel x OverSampling Ratio  64 */
795
#define SD16OSR_32             (0x0300)       /* SD16 Channel x OverSampling Ratio  32 */
796
 
797
/* SD16IV Definitions */
798
#define SD16IV_NONE            (0x0000)       /* No Interrupt pending */
799
#define SD16IV_SD16OVIFG       (0x0002)       /* SD16OVIFG */
800
#define SD16IV_SD16MEM0        (0x0004)       /* SD16MEM0 SD16IFG */
801
#define SD16IV_SD16MEM1        (0x0006)       /* SD16MEM1 SD16IFG */
802
 
803
/************************************************************
804
* ESP430E
805
************************************************************/
806
#define __MSP430_HAS_ESP430E__                /* Definition to show that Module is available */
807
 
808
#define AFEINCTL0              SD16INCTL0     /* AFE Input Control Register Channel 0 */
809
#define AFEINCTL1              SD16INCTL1     /* AFE Input Control Register Channel 1 */
810
#define AFECTL                 SD16CTL        /* Analog Front End Control Register */
811
#define AFECCTL0               SD16CCTL0      /* AFE Channel 0 Control Register */
812
#define AFECCTL1               SD16CCTL1      /* AFE Channel 1 Control Register */
813
 
814
SFR_16BIT(ESPCTL);                            /* ESP430 Control Register */
815
SFR_16BIT(MBCTL);                             /* Mailbox Control Register */
816
SFR_16BIT(MBIN0);                             /* Incoming Mailbox 0 Register */
817
SFR_16BIT(MBIN1);                             /* Incoming Mailbox 1 Register */
818
SFR_16BIT(MBOUT0);                            /* Outgoing Mailbox 0 Register */
819
SFR_16BIT(MBOUT1);                            /* Outgoing Mailbox 1 Register */
820
 
821
SFR_16BIT(ESP430_STAT0);                      /* ESP430 Return Value 0 */
822
SFR_16BIT(ESP430_STAT1);                      /* ESP430 Return Value 1 */
823
SFR_16BIT(WAVEFSV1);                          /* ESP430 Return Value 2 */
824
SFR_16BIT(RET3);                              /* ESP430 Return Value 3 */
825
SFR_16BIT(RET4);                              /* ESP430 Return Value 4 */
826
SFR_16BIT(WAVEFSI1);                          /* ESP430 Return Value 5 */
827
SFR_16BIT(RET7);                              /* ESP430 Return Value 7 */
828
SFR_16BIT(ACTENERGY1_LO);                     /* ESP430 Return Value 8 */
829
SFR_16BIT(ACTENERGY1_HI);                     /* ESP430 Return Value 9 */
830
SFR_16BIT(REACTENERGY_LO);                    /* ESP430 Return Value 12 */
831
SFR_16BIT(REACTENERGY_HI);                    /* ESP430 Return Value 13 */
832
SFR_16BIT(APPENERGY_LO);                      /* ESP430 Return Value 14 */
833
SFR_16BIT(APPENERGY_HI);                      /* ESP430 Return Value 15 */
834
SFR_16BIT(ACTENSPER1_LO);                     /* ESP430 Return Value 16 */
835
SFR_16BIT(ACTENSPER1_HI);                     /* ESP430 Return Value 17 */
836
SFR_16BIT(IRMS_2_HI);                         /* ESP430 Return Value 18 */
837
SFR_16BIT(IRMS_2_LO);                         /* ESP430 Return Value 19 */
838
SFR_16BIT(POWERFCT);                          /* ESP430 Return Value 20 */
839
//const sfrw RESERVED         (0x01EA)  /* ESP430 Return Value 21 */
840
SFR_16BIT(MAINSPERIOD);                       /* ESP430 Return Value 22 */
841
SFR_16BIT(V1RMS);                             /* ESP430 Return Value 23 */
842
SFR_16BIT(IRMS_LO);                           /* ESP430 Return Value 24 */
843
SFR_16BIT(IRMS_HI);                           /* ESP430 Return Value 25 */
844
SFR_16BIT(VPEAK);                             /* ESP430 Return Value 26 */
845
SFR_16BIT(IPEAK);                             /* ESP430 Return Value 27 */
846
SFR_16BIT(LINECYCLCNT_LO);                    /* ESP430 Return Value 28 */
847
SFR_16BIT(LINECYCLCNT_HI);                    /* ESP430 Return Value 29 */
848
SFR_16BIT(NMBMEAS_LO);                        /* ESP430 Return Value 30 */
849
SFR_16BIT(NMBMEAS_HI);                        /* ESP430 Return Value 31 */
850
 
851
#define RET0                   ESP430_STAT0   /* STATUS0 of ESP430 */
852
#define RET1                   ESP430_STAT1   /* STATUS1 of ESP430 */
853
#define RET2                   WAVEFSV1       /* Waveform Sample V1 offset corrected*/
854
#define RET5                   WAVEFSI1       /* Waveform Sample I1 offset corrected*/
855
//#define RET6          RESERVED       /* Reserved */
856
#define RET8                   ACTENERGY1_LO  /* Active energy I1 Low Word */
857
#define RET9                   ACTENERGY1_HI  /* Active energy I1 High Word */
858
//#define RET10          RESERVED       /* Reserved */
859
//#define RET11          RESERVED       /* Reserved */
860
#define RET12                  REACTENERGY_LO /* Reactive energy Low Word */
861
#define RET13                  REACTENERGY_HI /* Reactive energy High Word */
862
#define RET14                  APPENERGY_LO   /* Apparent energy Low Word */
863
#define RET15                  APPENERGY_HI   /* Apparent energy High Word */
864
#define RET16                  ACTENSPER1_LO  /* Active energy I1 for last mains period Low Word */
865
#define RET17                  ACTENSPER1_HI  /* Active energy I1 for last mains period High Word */
866
#define RET18                  IRMS_2_HI      /* Current RMS value last second I1 High Word */
867
#define RET19                  IRMS_2_LO      /* Current RMS value last second I1 Low Word */
868
#define RET20                  POWERFCT       /* Power factor */
869
//#define RET21          RESERVED       /* Reserved */
870
#define RET22                  MAINSPERIOD    /* Mains period */
871
#define RET23                  V1RMS          /* Voltage RMS V1 value last second */
872
#define RET24                  IRMS_LO        /* Current RMS value last second I1 Low Word */
873
#define RET25                  IRMS_HI        /* Current RMS value last second I1 High Word */
874
#define RET26                  VPEAK          /* Voltage V1 absolute peak value */
875
#define RET27                  IPEAK          /* Current absolute peak value I1 */
876
#define RET28                  LINECYCLCNT_LO /* Line cycle counter Low Word */
877
#define RET29                  LINECYCLCNT_HI /* Line cycle counter High Word */
878
#define RET30                  NMBMEAS_LO     /* Number of Measurements for CPU signal Low Word */
879
#define RET31                  NMBMEAS_HI     /* Number of Measurements for CPU signal High Word */
880
 
881
/* ESPCTL */
882
#define ESPEN                  (0x0001)       /* ESP430 Module enable */
883
#define ESPSUSP                (0x0002)       /* ESP430 Module suspend */
884
#define IREQ                   (0x0004)       /* NOT supported by current ESP430 Software */
885
 
886
/* RET0 - Status0 Flags */
887
#define WFSRDYFG               (0x0001)       /* New waveform Samples ready Flag */
888
//#define RESERVED          (0x0002)  /* Reserved */
889
#define ILREACHEDFG            (0x0004)       /* Interrupt level reached Flag */
890
#define ENRDYFG                (0x0008)       /* New Energy values ready Flag */
891
#define ZXLDFG                 (0x0010)       /* Zero Crossing of V1 Flag (leading edge) */
892
#define ZXTRFG                 (0x0020)       /* Zero Crossing of V1 Flag (trailing edge) */
893
#define CALRDYFG               (0x0040)       /* Calibration values ready Flag */
894
#define TAMPFG                 (0x0080)       /* Tampering Occured Flag */
895
#define NEGENFG                (0x0100)       /* Negativ Energy Flag */
896
#define VDROPFG                (0x0200)       /* Voltage drop occured Flag */
897
#define VPEAKFG                (0x0400)       /* Voltage exceed VPeak level Flag */
898
#define I1PEAKFG               (0x0800)       /* Current exceed I1Peak level Flag */
899
//#define RESERVED          (0x1000)  /* Reserved */
900
//#define RESERVED          (0x2000)  /* Reserved */
901
//#define RESERVED          (0x4000)  /* Reserved */
902
#define ACTIVEFG               (0x8000)       /* Measurement or Calibration running Flag */
903
 
904
/* RET1 - Status1 Flags */
905
#define ILNEGFG                (0x0004)       /* Negative Interrupt level reached Flag */
906
#define VPEAKNEGFG             (0x0400)       /* Negative Voltage exceed VPeak level Flag */
907
#define I1PEAKNEGFG            (0x0800)       /* Negative Current exceed I1Peak level Flag */
908
 
909
/* MBCTL */
910
#define IN0IFG                 (0x0001)       /* Incoming Mail 0 Interrupt Flag */
911
#define IN1IFG                 (0x0002)       /* Incoming Mail 1 Interrupt Flag */
912
#define OUT0FG                 (0x0004)       /* Outgoing Mail 0 Flag */
913
#define OUT1FG                 (0x0008)       /* Outgoing Mail 1 Flag */
914
#define IN0IE                  (0x0010)       /* Incoming Mail 0 Interrupt Enable */
915
#define IN1IE                  (0x0020)       /* Incoming Mail 1 Interrupt Enable */
916
#define CLR0OFF                (0x0040)       /* Switch off automatic clear of IN0IFG */
917
#define CLR1OFF                (0x0080)       /* Switch off automatic clear of IN1IFG */
918
#define OUT0IFG                (0x0100)       /* Outgoing Mail 0 Interrupt Flag */
919
#define OUT1IFG                (0x0200)       /* Outgoing Mail 1 Interrupt Flag */
920
#define OUT0IE                 (0x0400)       /* Outgoing Mail 0 Interrupt Enable */
921
#define OUT1IE                 (0x0800)       /* Outgoing Mail 1 Interrupt Enable */
922
 
923
/* Messages to ESP */
924
#define mRESET                 (0x0001)       /* Restart ESP430 Software */
925
#define mSET_MODE              (0x0003)       /* Set Operation Mode for ESP430 Software */
926
#define mCLR_EVENT             (0x0005)       /* Clear Flags for ESP430 Software */
927
#define mINIT                  (0x0007)       /* Initialize ESP430 Software */
928
#define mTEMP                  (0x0009)       /* Request Temp. Measurement from ESP430 Software */
929
#define mSWVERSION             (0x000B)       /* Request software version of ESP430 */
930
#define mREAD_PARAM            (0x000D)       /* Request to read the parameter with no. “Parameter No.” */
931
 
932
#define mSET_CTRL0             (0x0200)       /* Set Control Register 0 */
933
#define mSET_CTRL1             (0x0202)       /* Set Control Register 1 */
934
#define mSET_EVENT             (0x0204)       /* Set which Evenets should cause an message */
935
#define mSET_PHASECORR1        (0x0206)       /* Set Phase Correction fo I1 */
936
#define mSET_V1OFFSET          (0x020A)       /* Set Offset for V1 */
937
#define mSET_I1OFFSET          (0x020C)       /* Set Offset for I1 */
938
#define mSET_ADAPTI1           (0x0210)       /* Set Adaption factor for I1 */
939
#define mSET_GAINCORR1         (0x0214)       /* Set Gain Correction for Power P1 */
940
#define mSET_POFFSET1_LO       (0x0216)       /* Set Power Offset for Power P1 */
941
#define mSET_POFFSET1_HI       (0x0218)       /* Set Power Offset for Power P1 */
942
#define mSET_INTRPTLEVL_LO     (0x0220)       /* Set Interrupt Level */
943
#define mSET_INTRPTLEVL_HI     (0x0222)       /* Set Interrupt Level */
944
#define mSET_CALCYCLCNT        (0x0224)       /* Set number of main cycles for calibration */
945
#define mSET_STARTCURR_FRAC    (0x0226)       /* Set start current fractional Part*/
946
#define mSET_STARTCURR_INT     (0x0228)       /* Set start current integer Part*/
947
#define mSET_NOMFREQ           (0x022A)       /* Set nominal main frequency */
948
#define mSET_VDROPCYCLS        (0x022C)       /* Set cylces for VDrop detection */
949
#define mSET_RATIOTAMP         (0x022E)       /* Set ratio for tamper detection */
950
#define mSET_ITAMP             (0x0230)       /* Set minimum current for tamper detection */
951
#define mSET_VDROPLEVEL        (0x0232)       /* Set level for VDrop detection */
952
#define mSET_VPEAKLEVEL        (0x0234)       /* Set level for VPeak detection */
953
#define mSET_IPEAKLEVEL        (0x0236)       /* Set level for IPeak detection */
954
#define mSET_DCREMPER          (0x0238)       /* Set number of periods for DC-removal */
955
 
956
#define mSET_DELTAV1MAX        (0x023A)       /* Set max. change of V1 if V1FILTER =1  */
957
#define mSET_CORRCOMP          (0x023C)       /* Set Common Mode Rejection ratio */
958
#define mSET_FADCU             (0x023E)       /* Set ADC sampling frequency fADC */
959
 
960
/* Flags for mSET_CTRL0 */
961
#define CURR_I1                (0x0002)       /* 0: Current transformer, dc-tol CT or shunt */
962
                                      /* 1: Rogowski coil (not yet implemented) */
963
#define MB                     (0x0004)       /* Intrpt to CPU: 0: energy level  1: #measurements */
964
#define NE0                    (0x0008)       /* Neg. energy treatment:      00: clear neg. energy */
965
#define NE1                    (0x0010)       /* 01: use absolute energy   10: use energy as it is */
966
#define DCREM_V1               (0x0020)       /* DC removal for V1:  0: off  1: on */
967
#define DCREM_I1               (0x0040)       /* DC removal for I1:  0: off  1: on */
968
#define V1FILTER               (0x0100)       /* Enable on V1 Spike Filter:  0: off  1: on */
969
 
970
/* Messages from ESP */
971
#define mEVENT                 (0x0001)       /* Event Status Flag for ESP430 Software */
972
#define mTEMPRDY               (0x0003)       /* Temperature measurement completed and in MBIN1 */
973
#define mSWRDY                 (0x0005)       /* Software version in MBIN1 */
974
#define mPARAMRDY              (0x0007)       /* Parameter requested by mREAD_PARAM returned in MBIN1  */
975
#define mPARAMSET              (0x0009)       /* Parameter has been set */
976
 
977
/* EVENT: Event Message Enable Bits */
978
#define WFSRDYME               (0x0001)       /* New waveform Samples ready */
979
#define ILREACHEDME            (0x0004)       /* Interrupt level reached */
980
#define ENRDYME                (0x0008)       /* New Energy values ready */
981
#define ZXLDME                 (0x0010)       /* Zero Crossing of V1 (leading edge) */
982
#define ZXTRME                 (0x0020)       /* Zero Crossing of V1 (trailing edge) */
983
#define CALRDYME               (0x0040)       /* Calibration values ready */
984
#define TAMPME                 (0x0080)       /* Tampering Occured */
985
#define NEGENME                (0x0100)       /* Negativ Energy */
986
#define VDROPME                (0x0200)       /* Voltage drop occured */
987
#define VPEAKME                (0x0400)       /* Voltage exceed VPeak level */
988
#define I1PEAKME               (0x0800)       /* Current exceed I1Peak level */
989
//#define RESERVED            (0x1000)  /* Reserved */
990
//#define RESERVED            (0x2000)  /* Reserved */
991
//#define RESERVED            (0x4000)  /* Reserved */
992
#define ACTIVEME               (0x8000)       /* Measurement of Calibration running */
993
 
994
/* ESP Modes */
995
#define modeIDLE               (0x0000)       /* Set Mode: Idle Mode */
996
#define modeCALIBRATION        (0x0002)       /* Set Mode: Calibration Mode */
997
#define modeMEASURE            (0x0004)       /* Set Mode: Measure Mode */
998
#define modeRESET              (0x0006)       /* Set Mode: Reset and Restart the ESP430 module */
999
#define modeINIT               (0x0008)       /* Set Mode: Initialize ESP430 module */
1000
 
1001
/************************************************************
1002
* Interrupt Vectors (offset from 0xFFE0)
1003
************************************************************/
1004
 
1005
#define VECTOR_NAME(name)       name##_ptr
1006
#define EMIT_PRAGMA(x)          _Pragma(#x)
1007
#define CREATE_VECTOR(name)     void (* const VECTOR_NAME(name))(void) = &name
1008
#define PLACE_VECTOR(vector,section) EMIT_PRAGMA(DATA_SECTION(vector,section))
1009
#define ISR_VECTOR(func,offset) CREATE_VECTOR(func); \
1010
                                PLACE_VECTOR(VECTOR_NAME(func), offset)
1011
 
1012
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1013
#define BASICTIMER_VECTOR       ".int00"                    /* 0xFFE0 Basic Timer */
1014
#else
1015
#define BASICTIMER_VECTOR       (0 * 1u)                     /* 0xFFE0 Basic Timer */
1016
/*#define BASICTIMER_ISR(func)    ISR_VECTOR(func, ".int00")  */ /* 0xFFE0 Basic Timer */ /* CCE V2 Style */
1017
#endif
1018
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1019
#define PORT2_VECTOR            ".int01"                    /* 0xFFE2 Port 2 */
1020
#else
1021
#define PORT2_VECTOR            (1 * 1u)                     /* 0xFFE2 Port 2 */
1022
/*#define PORT2_ISR(func)         ISR_VECTOR(func, ".int01")  */ /* 0xFFE2 Port 2 */ /* CCE V2 Style */
1023
#endif
1024
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1025
#define PORT1_VECTOR            ".int04"                    /* 0xFFE8 Port 1 */
1026
#else
1027
#define PORT1_VECTOR            (4 * 1u)                     /* 0xFFE8 Port 1 */
1028
/*#define PORT1_ISR(func)         ISR_VECTOR(func, ".int04")  */ /* 0xFFE8 Port 1 */ /* CCE V2 Style */
1029
#endif
1030
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1031
#define TIMERA1_VECTOR          ".int05"                    /* 0xFFEA Timer A CC1-2, TA */
1032
#else
1033
#define TIMERA1_VECTOR          (5 * 1u)                     /* 0xFFEA Timer A CC1-2, TA */
1034
/*#define TIMERA1_ISR(func)       ISR_VECTOR(func, ".int05")  */ /* 0xFFEA Timer A CC1-2, TA */ /* CCE V2 Style */
1035
#endif
1036
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1037
#define TIMERA0_VECTOR          ".int06"                    /* 0xFFEC Timer A CC0 */
1038
#else
1039
#define TIMERA0_VECTOR          (6 * 1u)                     /* 0xFFEC Timer A CC0 */
1040
/*#define TIMERA0_ISR(func)       ISR_VECTOR(func, ".int06")  */ /* 0xFFEC Timer A CC0 */ /* CCE V2 Style */
1041
#endif
1042
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1043
#define USART0TX_VECTOR         ".int08"                    /* 0xFFF0 USART 0 Transmit */
1044
#else
1045
#define USART0TX_VECTOR         (8 * 1u)                     /* 0xFFF0 USART 0 Transmit */
1046
/*#define USART0TX_ISR(func)      ISR_VECTOR(func, ".int08")  */ /* 0xFFF0 USART 0 Transmit */ /* CCE V2 Style */
1047
#endif
1048
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1049
#define USART0RX_VECTOR         ".int09"                    /* 0xFFF2 USART 0 Receive */
1050
#else
1051
#define USART0RX_VECTOR         (9 * 1u)                     /* 0xFFF2 USART 0 Receive */
1052
/*#define USART0RX_ISR(func)      ISR_VECTOR(func, ".int09")  */ /* 0xFFF2 USART 0 Receive */ /* CCE V2 Style */
1053
#endif
1054
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1055
#define WDT_VECTOR              ".int10"                    /* 0xFFF4 Watchdog Timer */
1056
#else
1057
#define WDT_VECTOR              (10 * 1u)                    /* 0xFFF4 Watchdog Timer */
1058
/*#define WDT_ISR(func)           ISR_VECTOR(func, ".int10")  */ /* 0xFFF4 Watchdog Timer */ /* CCE V2 Style */
1059
#endif
1060
 
1061
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1062
#define SD16_VECTOR             ".int12"                    /* 0xFFF8 Sigma Delta ADC */
1063
#else
1064
#define SD16_VECTOR             (12 * 1u)                    /* 0xFFF8 Sigma Delta ADC */
1065
/*#define SD16_ISR(func)          ISR_VECTOR(func, ".int12")  */ /* 0xFFF8 Sigma Delta ADC */ /* CCE V2 Style */
1066
#endif
1067
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1068
#define ESP430_VECTOR           ".int13"                    /* 0xFFFA ESP430 Mailbox */
1069
#else
1070
#define ESP430_VECTOR           (13 * 1u)                    /* 0xFFFA ESP430 Mailbox */
1071
/*#define ESP430_ISR(func)        ISR_VECTOR(func, ".int13")  */ /* 0xFFFA ESP430 Mailbox */ /* CCE V2 Style */
1072
#endif
1073
 
1074
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1075
#define NMI_VECTOR              ".int14"                    /* 0xFFFC Non-maskable */
1076
#else
1077
#define NMI_VECTOR              (14 * 1u)                    /* 0xFFFC Non-maskable */
1078
/*#define NMI_ISR(func)           ISR_VECTOR(func, ".int14")  */ /* 0xFFFC Non-maskable */ /* CCE V2 Style */
1079
#endif
1080
#ifdef __ASM_HEADER__ /* Begin #defines for assembler */
1081
#define RESET_VECTOR            ".reset"                    /* 0xFFFE Reset [Highest Priority] */
1082
#else
1083
#define RESET_VECTOR            (15 * 1u)                    /* 0xFFFE Reset [Highest Priority] */
1084
/*#define RESET_ISR(func)         ISR_VECTOR(func, ".int15")  */ /* 0xFFFE Reset [Highest Priority] */ /* CCE V2 Style */
1085
#endif
1086
 
1087
 
1088
/************************************************************
1089
* End of Modules
1090
************************************************************/
1091
 
1092
#ifdef __cplusplus
1093
}
1094
#endif /* extern "C" */
1095
 
1096
#endif /* #ifndef __msp430xE42x2 */
1097