OSDN Git Service

improve pat files
[fast-forth/master.git] / MSP430FR5994.inc
1 ; MSP430FR5994.inc
2 ; MSP430FR5994  minimal declarations for FastForth usage
3 DEVICE = "MSP430FR5994"
4
5
6 ; ----------------------------------------------
7 ; MSP430FR5994 MEMORY MAP
8 ; ----------------------------------------------
9 ; 000A-001F = tiny RAM
10 ; 0020-0FFF = peripherals (4 KB)
11 ; 1000-17FF = ROM bootstrap loader BSL0..3 (4x512 B)
12 ; 1800-187F = FRAM info D (128 B)
13 ; 1880-18FF = FRAM info C (128 B)
14 ; 1900-197F = FRAM info B (128 B)
15 ; 1980-19FF = FRAM info A (128 B)
16 ; 1A00-1AFF = FRAM TLV device descriptor info (256 B)
17 ; 1B00-1BFF = unused (256 B)
18 ; 1C00-2BFF = RAM (4KB)
19 ; 2C00-3BFF = sharedRAM (4kB)
20 ; 4400-FF7F = FRAM code memory (FRAM) (MSP430FR59x8/9)
21 ; 8000-FF7F = FRAM code memory (FRAM) (MSP430FR59x7/8/9)
22 ; FF80-FFFF = FRAM interrupt vectors and signatures (FRAM)
23
24 ; ----------------------------------------------
25 PAGESIZE        .equ 512         ; MPU unit
26 ; ----------------------------------------------
27 ; BSL                         
28 ; ----------------------------------------------
29 BSL             .equ 1000h
30 ; ----------------------------------------------
31 ; FRAM                          ; INFO B, A, TLV
32 ; ----------------------------------------------
33 INFO_ORG        .equ 01800h
34 INFO_LEN        .equ 00200h
35 INFOD_ORG       .equ 01800h
36 INFOD_LEN       .equ 00080h
37 INFOC_ORG       .equ 01880h
38 INFOC_LEN       .equ 00080h
39 INFOB_ORG       .equ 01900h
40 INFOB_LEN       .equ 00080h
41 INFOA_ORG       .equ 01980h
42 INFOA_LEN       .equ 00080h
43 TLV_ORG         .equ 01A00h      ; Device Descriptor Info (Tag-Lenght-Value)
44 TLV_LEN         .equ 00100h      ;
45 ; ----------------------------------------------
46 ; RAM
47 ; ----------------------------------------------
48 TinyRAM_ORG     .equ 00Ah
49 TinyRAM_LEN     .equ 016h
50 RAM_ORG         .equ 01C00h
51 RAM_LEN         .equ 01000h
52 SharedRAM_ORG   .equ 02C00h
53 SharedRAM_LEN   .equ 01000h
54 ; ----------------------------------------------
55 ; FRAM
56 ; ----------------------------------------------
57 MAIN_ORG        .equ 04000h      ; Code space start
58 MAIN_LEN        .equ 40000h      ; 256 k FRAM
59 SIGNATURES      .equ 0FF80h      ; JTAG/BSL signatures
60 JTAG_SIG1       .equ 0FF80h      ; if 0, enable JTAG/SBW
61 JTAG_SIG2       .equ 0FF82h      ; if JTAG_SIG1=0xAAAA, length of password string @ JTAG_PASSWORD
62 BSL_SIG1        .equ 0FF84h      ;
63 BSL_SIG2        .equ 0FF86h      ;
64 JTAG_PASSWORD   .equ 0FF88h      ; 256 bits max
65 IPE_SIG_VALID   .equ 0FF88h      ; one word
66 IPE_STR_PTR_SRC .equ 0FF8Ah      ; one word
67 VECT_ORG        .equ 0FFB4h      ; FFB4-FFFF
68 VECT_LEN        .equ 4Ch
69 BSL_PASSWORD    .equ 0FFE0h      ; 256 bits
70 ; ----------------------------------------------
71 ;    .org    SIGNATURES
72 ;;Start of JTAG and BSL signatures
73 ;        .word   0FFFFh      ; JTAG signature 1
74 ;        .word   0FFFFh      ; JTAG signature 2
75 ;        .word   0FFFFh      ; BSL signature 1, 5555h to disable BSL
76 ;        .word   0FFFFh      ; BSL signature 2
77
78 ;    .org JTAG_PASSWORD     ;Start of JTAG PASSWORD
79 ;
80 ;    .org    INTVECT         ; FFB4-FFFF 37 vectors + reset
81 ;        .word reset         ; 0FFB4h - LEA_Vec        
82 ;        .word reset         ; 0FFB6h - P8_Vec         
83 ;        .word reset         ; 0FFB8h - P7_Vec         
84 ;        .word reset         ; 0FFBAh - eUSCI_B3_Vec   
85 ;        .word reset         ; 0FFBCh - eUSCI_B2_Vec   
86 ;        .word reset         ; 0FFBEh - eUSCI_B1_Vec   
87 ;        .word reset         ; 0FFC0h - eUSCI_A3_Vec   
88 ;        .word reset         ; 0FFC2h - eUSCI_A2_Vec   
89 ;        .word reset         ; 0FFC4h - P6_Vec         
90 ;        .word reset         ; 0FFC6h - P5_Vec         
91 ;        .word reset         ; 0FFC8h - TA4_x_Vec      
92 ;        .word reset         ; 0FFCAh - TA4_0_Vec      
93 ;        .word reset         ; 0FFCCh - AES_Vec        
94 ;        .word reset         ; 0FFCEh - RTC_C_Vec      
95 ;        .word reset         ; 0FFD0h - P4_Vec=        
96 ;        .word reset         ; 0FFD2h - P3_Vec=        
97 ;        .word reset         ; 0FFD4h - TA3_x_Vec      
98 ;        .word reset         ; 0FFD6h - TA3_0_Vec      
99 ;        .word reset         ; 0FFD8h - P2_Vec         
100 ;        .word reset         ; 0FFDAh - TA2_x_Vec      
101 ;        .word reset         ; 0FFDCh - TA2_0_Vec      
102 ;        .word reset         ; 0FFDEh - P1_Vec=        
103 ;;    .org BSL_PASSWORD      ;Start of BSL PASSWORD
104 ;        .word reset         ; 0FFE0h - TA1_x_Vec      
105 ;        .word reset         ; 0FFE2h - TA1_0_Vec      
106 ;        .word reset         ; 0FFE4h - DMA_Vec        
107 ;        .word reset         ; 0FFE6h - eUSCI_A1_Vec   
108 ;        .word reset         ; 0FFE8h - TA0_x_Vec      
109 ;        .word reset         ; 0FFEAh - TA0_0_Vec      
110 ;        .word reset         ; 0FFECh - ADC12_B_Vec    
111 ;        .word reset         ; 0FFEEh - eUSCI_B0_Vec   
112 ;        .word reset         ; 0FFF0h - eUSCI_A0_Vec   
113 ;        .word reset         ; 0FFF2h - WDT_Vec        
114 ;        .word reset         ; 0FFF4h - TB0_x_Vec      
115 ;        .word reset         ; 0FFF6h - TB0_0_Vec      
116 ;        .word reset         ; 0FFF8h - COMP_E_Vec     
117 ;        .word reset         ; 0FFFAh - U_NMI_Vec      
118 ;        .word reset         ; 0FFFCh - S_NMI_Vec      
119 ;        .word reset         ; 0FFFEh - RST_Vec        
120
121
122 ; ----------------------------------------------------------------------
123 ; MSP430FR5994 Peripheral File Map
124 ; ----------------------------------------------------------------------
125 SFR_SFR         .set 0100h           ; Special function
126 PMM_SFR         .set 0120h           ; PMM
127 FRAM_SFR        .set 0140h           ; FRAM control
128 CRC16_SFR       .set 0150h
129 RAM_SFR         .set 0158h
130 WDT_A_SFR       .set 015Ch           ; Watchdog
131 CS_SFR          .set 0160h           ; Clock System
132 SYS_SFR         .set 0180h           ; SYS
133 REF_SFR         .set 01B0h           ; REF
134 PA_SFR          .set 0200h           ; PORT1/2
135 PB_SFR          .set 0220h           ; PORT3/4
136 PC_SFR          .set 0240h           ; PORT3/4
137 PD_SFR          .set 0260h           ; PORT3/4
138 PJ_SFR          .set 0320h           ; PORTJ
139 TA0_SFR         .set 0340h
140 TA1_SFR         .set 0380h
141 TB0_SFR         .set 03C0h
142 TA2_SFR         .set 0400h
143 CTIO0_SFR       .set 0430h           ; Capacitive Touch IO
144 TA3_SFR         .set 0440h
145 CTIO1_SFR       .set 0470h           ; Capacitive Touch IO
146 RTC_C_SFR       .set 04A0h
147 MPY_SFR         .set 04C0h
148 DMA_CTRL_SFR    .set 0500h
149 DMA_CHN0_SFR    .set 0510h
150 DMA_CHN1_SFR    .set 0520h
151 DMA_CHN2_SFR    .set 0530h
152 DMA_CHN3_SFR    .set 0540h
153 DMA_CHN4_SFR    .set 0550h
154 DMA_CHN5_SFR    .set 0560h
155 MPU_SFR         .set 05A0h           ; memory protect unit
156 eUSCI_A0_SFR    .set 05C0h           ; eUSCI_A0
157 eUSCI_A1_SFR    .set 05E0h           ; eUSCI_A1
158 eUSCI_A2_SFR    .set 0600h           ; eUSCI_A1
159 eUSCI_A3_SFR    .set 0620h           ; eUSCI_A1
160 eUSCI_B0_SFR    .set 0640h           ; eUSCI_B0
161 eUSCI_B1_SFR    .set 0680h           ; eUSCI_B0
162 eUSCI_B2_SFR    .set 06C0h           ; eUSCI_B0
163 eUSCI_B3_SFR    .set 0700h           ; eUSCI_B0
164 TA4_SFR         .set 07C0h
165 ADC12_B_SFR     .set 0800h
166 COMP_E_SFR      .set 08C0h
167 CRC32_SFR       .set 0980h
168 AES_SFR         .set 09C0h
169 LEA_SFR         .set 0A80h
170
171 ; ----------------------------------------------------------------------
172 ; POWER ON RESET AND INITIALIZATION : LOCK PMM_LOCKLPM5
173 ; ----------------------------------------------------------------------
174 PMMCTL0     .set PMM_SFR
175 PMMSWBOR    .set 4
176
177 PM5CTL0     .set PMM_SFR + 10h    ; Power mode 5 control register 0
178 LOCKLPM5    .set 1
179
180 ; ----------------------------------------------------------------------
181 ; FRAM config
182 ; ----------------------------------------------------------------------
183 FRCTL0          .set FRAM_SFR + 00h   ; FRAM Controller Control 0
184 FRCTL0_H        .set FRAM_SFR + 01h   ; FRAM Controller Control 0 high byte
185
186 ; ----------------------------------------------------------------------
187 ; POWER ON RESET AND INITIALIZATION : WATCHDOG TIMER A
188 ; ----------------------------------------------------------------------
189
190 WDTCTL      .equ WDT_A_SFR + 00h    ; Watchdog Timer Control */
191
192 ; WDTCTL Control Bits
193 WDTPW       .equ 5A00h
194 WDTHOLD     .equ 0080h  ; WDT - Timer hold
195 WDTCNTCL    .equ 0008h  ; WDT timer counter clear
196
197
198 ; ----------------------------------------------------------------------
199 ; POWER ON RESET AND INITIALIZATION : CLOCK SYSTEM
200 ; ----------------------------------------------------------------------
201
202 CSCTL0          .equ CS_SFR + 00h       ; CS Control Register 0
203 CSCTL0_H        .equ CS_SFR + 01h       ; CS Control Register 0 high byte
204 CSCTL1          .equ CS_SFR + 02h       ; CS Control Register 1
205 CSCTL2          .equ CS_SFR + 04h       ; CS Control Register 2
206 CSCTL3          .equ CS_SFR + 06h       ; CS Control Register 3
207
208 ; CSCTL0 Control Bits
209 CSKEY           .equ 0A5h           ; CS Password
210 ; CSCTL1 Control Bits
211 DCORSEL         .equ 0040h
212 DCOFSEL0        .equ 0002h           ; DCO frequency select Bit: 0
213 DCOFSEL1        .equ 0004h           ; DCO frequency select Bit: 1
214 DCOFSEL2        .equ 0008h           ; DCO frequency select Bit: 2
215 DCOFSEL3        .equ 000Ch           ; DCO frequency select Bit: 21
216 ; CSCTL2 Control Bits
217 SELA_LFXCLK     .equ 0000h           ; 0 : ACLK Source Select LFXCLK
218 SELA_VLOCLK     .equ 0100h           ; 1 ACLK Source Select VLOCLK 10kHz
219 SELS_DCOCLK     .equ 0030h           ; 3 : SMCLK Source Select DCOCLK
220 SELM_DCOCLK     .equ 0003h           ; 3 : MCLK Source Select DCOCLK
221 ; CSCTL3 Control Bits
222 DIVA_0          .equ 0000h           ; ACLK Source Divider 0
223 DIVS_0          .equ 0000h           ; SMCLK Source Divider 0
224 DIVM_0          .equ 0000h           ; MCLK Source Divider 0
225 DIVA_2          .equ 0100h           ; ACLK Source Divider 0
226 DIVS_2          .equ 0010h           ; SMCLK Source Divider 0
227 DIVM_2          .equ 0001h           ; MCLK Source Divider 0
228 DIVA_4          .equ 0200h           ; ACLK Source Divider 0
229 DIVS_4          .equ 0020h           ; SMCLK Source Divider 0
230 DIVM_4          .equ 0002h           ; MCLK Source Divider 0
231 DIVA_8          .equ 0300h           ; ACLK Source Divider 0
232 DIVS_8          .equ 0030h           ; SMCLK Source Divider 0
233 DIVM_8          .equ 0003h           ; MCLK Source Divider 0
234 DIVA_16         .equ 0400h           ; ACLK Source Divider 0
235 DIVS_16         .equ 0040h           ; SMCLK Source Divider 0
236 DIVM_16         .equ 0004h           ; MCLK Source Divider 0
237 DIVA_32         .equ 0500h           ; ACLK Source Divider 0
238 DIVS_32         .equ 0050h           ; SMCLK Source Divider 0
239 DIVM_32         .equ 0005h           ; MCLK Source Divider 0
240
241 ; ----------------------------------------------------------------------
242 ; POWER ON RESET AND INITIALIZATION : SYS REGISTERS
243 ; ----------------------------------------------------------------------
244
245 SYSUNIV     .equ SYS_SFR + 001Ah
246 SYSSNIV     .equ SYS_SFR + 001Ch
247 SYSRSTIV    .equ SYS_SFR + 001Eh
248
249 ; SYS Control Bits
250 ; ...
251 ; ----------------------------------------------------------------------
252 ; POWER ON RESET AND INITIALIZATION : REF
253 ; ----------------------------------------------------------------------
254
255 REFCTL      equ REF_SFR + 00h       ; REF Shared Reference control register 0
256
257 ; REFCTL0 Control Bits
258 REFON       equ 0001h               ; REF Reference On
259 REFTCOFF    equ 0008h               ; REF Temp.Sensor off
260
261 ; ----------------------------------------------------------------------
262 ; POWER ON RESET AND INITIALIZATION : PORT1/2
263 ; ----------------------------------------------------------------------
264
265 PAIN        .equ PA_SFR + 00h    ; Port A INput
266 PAOUT       .equ PA_SFR + 02h    ; Port A OUTput
267 PADIR       .equ PA_SFR + 04h    ; Port A DIRection
268 PAREN       .equ PA_SFR + 06h    ; Port A Resistor ENable
269 PASEL0      .equ PA_SFR + 0Ah    ; Port A SELection 0
270 PASEL1      .equ PA_SFR + 0Ch    ; Port A SELection 1
271 PASELC      .equ PA_SFR + 16h    ; Port A SELection Complement
272 PAIES       .equ PA_SFR + 18h    ; Port A Interrupt Edge Select
273 PAIE        .equ PA_SFR + 1Ah    ; Port A Interrupt Enable
274 PAIFG       .equ PA_SFR + 1Ch    ; Port A Interrupt FlaG
275
276 P1IN        .equ PA_SFR + 00h    ; Port 1 INput
277 P1OUT       .equ PA_SFR + 02h    ; Port 1 OUTput
278 P1DIR       .equ PA_SFR + 04h    ; Port 1 DIRection
279 P1REN       .equ PA_SFR + 06h    ; Port 1 Resistor ENable
280 P1SEL0      .equ PA_SFR + 0Ah    ; Port 1 SELection 0
281 P1SEL1      .equ PA_SFR + 0Ch    ; Port 1 SELection 1
282 P1SELC      .equ PA_SFR + 16h    ; Port 1 SELection Complement
283 P1IES       .equ PA_SFR + 18h    ; Port 1 Interrupt Edge Select
284 P1IE        .equ PA_SFR + 1Ah    ; Port 1 Interrupt Enable
285 P1IFG       .equ PA_SFR + 1Ch    ; Port 1 Interrupt FlaG
286 P1IV        .equ PA_SFR + 0Eh    ; Port 1 Interrupt Vector word 
287
288 P2IN        .equ PA_SFR + 01h    ; Port 2 INput
289 P2OUT       .equ PA_SFR + 03h    ; Port 2 OUTput
290 P2DIR       .equ PA_SFR + 05h    ; Port 2 DIRection
291 P2REN       .equ PA_SFR + 07h    ; Port 2 Resistor ENable
292 P2SEL0      .equ PA_SFR + 0Bh    ; Port 2 SELection 0
293 P2SEL1      .equ PA_SFR + 0Dh    ; Port 2 SELection 1
294 P2SELC      .equ PA_SFR + 17h    ; Port 2 SELection Complement
295 P2IES       .equ PA_SFR + 19h    ; Port 2 Interrupt Edge Select
296 P2IE        .equ PA_SFR + 1Bh    ; Port 2 Interrupt Enable
297 P2IFG       .equ PA_SFR + 1Dh    ; Port 2 Interrupt FlaG
298 P2IV        .equ PA_SFR + 1Eh    ; Port 2 Interrupt Vector word 
299
300 ; ----------------------------------------------------------------------
301 ; POWER ON RESET AND INITIALIZATION : PORT3/4
302 ; ----------------------------------------------------------------------
303
304 PBIN        .equ PB_SFR + 00h    ; Port B Input
305 PBOUT       .equ PB_SFR + 02h    ; Port B Output 1/0 or pullup/pulldown resistor
306 PBDIR       .equ PB_SFR + 04h    ; Port B Direction
307 PBREN       .equ PB_SFR + 06h    ; Port B Resistor Enable
308 PBSEL0      .equ PB_SFR + 0Ah    ; Port B Selection 0
309 PBSEL1      .equ PB_SFR + 0Ch    ; Port B Selection 1
310 PBSELC      .equ PB_SFR + 16h    ; Port B Complement Selection
311 PBIES       .equ PB_SFR + 18h    ; Port B Interrupt Edge Select
312 PBIE        .equ PB_SFR + 1Ah    ; Port B Interrupt Enable
313 PBIFG       .equ PB_SFR + 1Ch    ; Port B Interrupt Flag
314
315 P3IN        .equ PB_SFR + 00h    ; Port 3 Input */
316 P3OUT       .equ PB_SFR + 02h    ; Port 3 Output
317 P3DIR       .equ PB_SFR + 04h    ; Port 3 Direction
318 P3REN       .equ PB_SFR + 06h    ; Port 3 Resistor Enable
319 P3SEL0      .equ PB_SFR + 0Ah    ; Port 3 Selection 0
320 P3SEL1      .equ PB_SFR + 0Ch    ; Port 3 Selection 1
321 P3SELC      .equ PB_SFR + 16h    ; Port 3 Complement Selection
322 P3IES       .equ PB_SFR + 18h    ; Port 3 Interrupt Edge Select
323 P3IE        .equ PB_SFR + 1Ah    ; Port 3 Interrupt Enable
324 P3IFG       .equ PB_SFR + 1Ch    ; Port 3 Interrupt Flag
325 P3IV        .equ PB_SFR + 0Eh    ; Port 3 Interrupt Vector word 
326
327 P4IN        .equ PB_SFR + 01h    ; Port 4 Input */
328 P4OUT       .equ PB_SFR + 03h    ; Port 4 Output
329 P4DIR       .equ PB_SFR + 05h    ; Port 4 Direction
330 P4REN       .equ PB_SFR + 07h    ; Port 4 Resistor Enable
331 P4SEL0      .equ PB_SFR + 0Bh    ; Port 4 Selection 0
332 P4SEL1      .equ PB_SFR + 0Dh    ; Port 4 Selection 1
333 P4SELC      .equ PB_SFR + 17h    ; Port 4 Complement Selection
334 P4IES       .equ PB_SFR + 19h    ; Port 4 Interrupt Edge Select
335 P4IE        .equ PB_SFR + 1Bh    ; Port 4 Interrupt Enable
336 P4IFG       .equ PB_SFR + 1Dh    ; Port 4 Interrupt Flag
337 P4IV        .equ PB_SFR + 1Eh    ; Port 4 Interrupt Vector word 
338
339 ; ----------------------------------------------------------------------
340 ; POWER ON RESET AND INITIALIZATION : PORT5/6
341 ; ----------------------------------------------------------------------
342
343 PCIN        .equ PC_SFR + 00h    ; Port C Input
344 PCOUT       .equ PC_SFR + 02h    ; Port C Output
345 PCDIR       .equ PC_SFR + 04h    ; Port C Direction
346 PCREN       .equ PC_SFR + 06h    ; Port C Resistor Enable
347 PCSEL0      .equ PC_SFR + 0Ah    ; Port C Selection 0
348 PCSEL1      .equ PC_SFR + 0Ch    ; Port C Selection 1
349 PCSELC      .equ PC_SFR + 16h    ; Port C Complement Selection
350 PCIES       .equ PC_SFR + 18h    ; Port C Interrupt Edge Select
351 PCIE        .equ PC_SFR + 1Ah    ; Port C Interrupt Enable
352 PCIFG       .equ PC_SFR + 1Ch    ; Port C Interrupt Flag
353
354 P5IN        .equ PC_SFR + 00h    ; Port 5 Input
355 P5OUT       .equ PC_SFR + 02h    ; Port 5 Output
356 P5DIR       .equ PC_SFR + 04h    ; Port 5 Direction
357 P5REN       .equ PC_SFR + 06h    ; Port 5 Resistor Enable
358 P5SEL0      .equ PC_SFR + 0Ah    ; Port 5 Selection 0
359 P5SEL1      .equ PC_SFR + 0Ch    ; Port 5 Selection 1
360 P5IV        .equ PC_SFR + 0Eh    ; Port 5 Interrupt Vector word 
361 P5SELC      .set PC_SFR + 16h    ; Port 5 Complement Selection
362 P5IES       .equ PC_SFR + 18h    ; Port 5 Interrupt Edge Select
363 P5IE        .equ PC_SFR + 1Ah    ; Port 5 Interrupt Enable
364 P5IFG       .equ PC_SFR + 1Ch    ; Port 5 Interrupt Flag
365
366 P6IN        .equ PC_SFR + 01h    ; Port 6 Input
367 P6OUT       .equ PC_SFR + 03h    ; Port 6 Output
368 P6DIR       .equ PC_SFR + 05h    ; Port 6 Direction
369 P6REN       .equ PC_SFR + 07h    ; Port 6 Resistor Enable
370 P6SEL0      .equ PC_SFR + 0Bh    ; Port 6 Selection 0
371 P6SEL1      .equ PC_SFR + 0Dh    ; Port 6 Selection 1
372 P6SELC      .set PC_SFR + 17h    ; Port 6 Complement Selection
373 P6IES       .equ PC_SFR + 19h    ; Port 6 Interrupt Edge Select
374 P6IE        .equ PC_SFR + 1Bh    ; Port 6 Interrupt Enable
375 P6IFG       .equ PC_SFR + 1Dh    ; Port 6 Interrupt Flag
376 P6IV        .equ PC_SFR + 1Eh    ; Port 6 Interrupt Vector word 
377
378 ; ----------------------------------------------------------------------
379 ; POWER ON RESET AND INITIALIZATION : PORT7/8
380 ; ----------------------------------------------------------------------
381
382 PDIN        .equ PD_SFR + 00h    ; Port D Input
383 PDOUT       .equ PD_SFR + 02h    ; Port D Output
384 PDDIR       .equ PD_SFR + 04h    ; Port D Direction
385 PDREN       .equ PD_SFR + 06h    ; Port D Resistor Enable
386 PDSEL0      .equ PD_SFR + 0Ah    ; Port D Selection 0
387 PDSEL1      .equ PD_SFR + 0Ch    ; Port D Selection 1
388 PDSELC      .equ PD_SFR + 16h    ; Port D Complement Selection
389 PDIES       .equ PD_SFR + 18h    ; Port D Interrupt Edge Select
390 PDIE        .equ PD_SFR + 1Ah    ; Port D Interrupt Enable
391 PDIFG       .equ PD_SFR + 1Ch    ; Port D Interrupt Flag
392
393 P7IN        .equ PD_SFR + 00h    ; Port 7 Input
394 P7OUT       .equ PD_SFR + 02h    ; Port 7 Output
395 P7DIR       .equ PD_SFR + 04h    ; Port 7 Direction
396 P7REN       .equ PD_SFR + 06h    ; Port 7 Resistor Enable
397 P7SEL0      .equ PD_SFR + 0Ah    ; Port 7 Selection 0
398 P7SEL1      .equ PD_SFR + 0Ch    ; Port 7 Selection 1
399 P7IV        .equ PD_SFR + 0Eh    ; Port 7 Interrupt Vector word 
400 P7SELC      .set PD_SFR + 16h    ; Port 7 Complement Selection
401 P7IES       .equ PD_SFR + 18h    ; Port 7 Interrupt Edge Select
402 P7IE        .equ PD_SFR + 1Ah    ; Port 7 Interrupt Enable
403 P7IFG       .equ PD_SFR + 1Ch    ; Port 7 Interrupt Flag
404
405 P8IN        .equ PD_SFR + 01h    ; Port 8 Input
406 P8OUT       .equ PD_SFR + 03h    ; Port 8 Output
407 P8DIR       .equ PD_SFR + 05h    ; Port 8 Direction
408 P8REN       .equ PD_SFR + 07h    ; Port 8 Resistor Enable
409 P8SEL0      .equ PD_SFR + 0Bh    ; Port 8 Selection 0
410 P8SEL1      .equ PD_SFR + 0Dh    ; Port 8 Selection 1
411 P8SELC      .set PD_SFR + 16h    ; Port 8 Complement Selection
412 P8IES       .equ PD_SFR + 19h    ; Port 8 Interrupt Edge Select
413 P8IE        .equ PD_SFR + 1Bh    ; Port 8 Interrupt Enable
414 P8IFG       .equ PD_SFR + 1Dh    ; Port 8 Interrupt Flag
415 P8IV        .equ PD_SFR + 1Eh    ; Port 8 Interrupt Vector word 
416
417
418 ; ----------------------------------------------------------------------
419 ; POWER ON RESET AND INITIALIZATION : PORTJ
420 ; ----------------------------------------------------------------------
421
422 PJIN        .equ PJ_SFR + 00h   ; Port J INput
423 PJOUT       .equ PJ_SFR + 02h   ; Port J OUTput
424 PJDIR       .equ PJ_SFR + 04h   ; Port J DIRection
425 PJREN       .equ PJ_SFR + 06h   ; Port J Resistor ENable
426 PJSEL0      .equ PJ_SFR + 0Ah   ; Port 2 SELection 0
427 PJSEL1      .equ PJ_SFR + 0Ch   ; Port 2 SELection 1
428 PJSELC      .equ PJ_SFR + 16h   ; Port 2 SELection Complement; PJ 5-0 usage
429
430
431 ; ----------------------------------------------------------------------
432 RTC_C
433 ; ----------------------------------------------------------------------
434 RTCCTL0_L     .set RTC_C_SFR + 00h
435 RTCCTL0_H     .set RTC_C_SFR + 01h
436 RTCCTL1       .set RTC_C_SFR + 02h
437 RTCCTL3       .set RTC_C_SFR + 03h
438 RTCOCAL       .set RTC_C_SFR + 04h
439 RTCTCMP       .set RTC_C_SFR + 06h
440 RTCPS0CTL     .set RTC_C_SFR + 08h
441 RTCPS1CTL     .set RTC_C_SFR + 0Ah
442 RTCPS         .set RTC_C_SFR + 0Ch ; = RT1PS:RT0PS
443 RTCIV         .set RTC_C_SFR + 0Eh
444 RTCSEC        .set RTC_C_SFR + 10h
445 RTCCNT1       .set RTC_C_SFR + 10h     
446 RTCMIN        .set RTC_C_SFR + 11h
447 RTCCNT2       .set RTC_C_SFR + 11h
448 RTCHOUR       .set RTC_C_SFR + 12h
449 RTCCNT3       .set RTC_C_SFR + 12h
450 RTCDOW        .set RTC_C_SFR + 13h
451 RTCCNT4       .set RTC_C_SFR + 13h
452 RTCDAY        .set RTC_C_SFR + 14h
453 RTCMON        .set RTC_C_SFR + 15h
454 RTCYEAR       .set RTC_C_SFR + 16h
455
456 RTCHOLD       .set 40h
457 RTCRDY        .set 10h
458
459 ; ----------------------------------------------------------------------
460 MPY_32
461 ; ----------------------------------------------------------------------
462
463 MPY       .equ MPY_SFR + 00h    ; Multiply16 Unsigned/Operand 1 */
464 MPYS      .equ MPY_SFR + 02h    ; Multiply16 signed/Operand 1
465 MAC       .equ MPY_SFR + 04h    ; MultiplyAccumulate16 Unsigned/Operand 1 */
466 MACS      .equ MPY_SFR + 06h    ; MultiplyAccumulate16 signed/Operand 1
467 OP2       .equ MPY_SFR + 08h    ; Operand2_16 */
468 RESLO     .equ MPY_SFR + 0Ah    ; 16x16-bit result low - least significant word */
469 RESHI     .equ MPY_SFR + 0Ch    ; 16x16-bit result high */
470 SUMEXT    .equ MPY_SFR + 0Eh    ; 16x16-bit sum extension register
471 MPY32L    .equ MPY_SFR + 10h    ; Multiply32 Unsigned/Operand 1
472 MPY32H    .equ MPY_SFR + 12h    ; Multiply32 Unsigned/Operand 1
473 MPYS32L   .equ MPY_SFR + 14h    ; Multiply32 signed/Operand 1
474 MPYS32H   .equ MPY_SFR + 16h    ; Multiply32 signed/Operand 1
475 MAC32L    .equ MPY_SFR + 18h    ; MultiplyAccumulate32 Unsigned/Operand 1
476 MAC32H    .equ MPY_SFR + 1Ah    ; MultiplyAccumulate32 Unsigned/Operand 1
477 MACS32L   .equ MPY_SFR + 1Ch    ; MultiplyAccumulate32 signed/Operand 1
478 MACS32H   .equ MPY_SFR + 1Eh    ; MultiplyAccumulate32 signed/Operand 1
479 OP2L      .equ MPY_SFR + 20h    ; Multiply32 Operand 2
480 OP2H      .equ MPY_SFR + 22h    ; Multiply32 Operand 2
481 RES0      .equ MPY_SFR + 24h    ; 32x32-bit result 0 - least significant word */
482 RES1      .equ MPY_SFR + 26h    ; 32x32-bit result 1 */
483 RES2      .equ MPY_SFR + 28h    ; 32x32-bit result 2 */
484 RES3      .equ MPY_SFR + 2Ah    ; 32x32-bit result 3 */
485 MPY32CTL0 .equ MPY_SFR + 2Ch    ; MPY32 control register 0
486
487
488
489
490
491
492
493 UCSWRST         .equ 1  ; eUSCI Software Reset
494 UCTXIE          .equ 2  ; eUSCI Transmit Interrupt Enable
495 UCRXIE          .equ 1  ; eUSCI Receive Interrupt Enable
496 UCTXIFG         .equ 2  ; eUSCI Transmit Interrupt Flag
497 UCRXIFG         .equ 1  ; eUSCI Receive Interrupt Flag
498
499 ; ----------------------------------------------------------------------
500 ; eUSCI_A0
501 ; ----------------------------------------------------------------------
502
503     .IFDEF UCA0_TERM
504 TERMCTLW0       .equ eUSCI_A0_SFR + 00h    ; eUSCI_A0 Control Word Register 0
505 TERMBRW         .equ eUSCI_A0_SFR + 06h    ; eUSCI_A0 Baud Word Rate 0
506 TERMMCTLW       .equ eUSCI_A0_SFR + 08h    ; eUSCI_A0 Modulation Control
507 TERMRXBUF       .equ eUSCI_A0_SFR + 0Ch    ; eUSCI_A0 Receive Buffer
508 TERMTXBUF       .equ eUSCI_A0_SFR + 0Eh    ; eUSCI_A0 Transmit Buffer
509 TERMIE          .equ eUSCI_A0_SFR + 1Ah    ; eUSCI_A0 Interrupt Enable Register
510 TERMIFG         .equ eUSCI_A0_SFR + 1Ch    ; eUSCI_A0 Interrupt Flags Register
511 TERMVEC         .equ 0FFF0h      ; interrupt vector for  eUSCI_A0
512     .ENDIF ;UCA0_TERM
513
514     .IFDEF UCA0_SD
515 SD_CTLW0       .equ eUSCI_A0_SFR + 00h    ; eUSCI_A0 Control Word Register 0
516 SD_BRW         .equ eUSCI_A0_SFR + 06h    ; eUSCI_A0 Baud Word Rate 0
517 SD_RXBUF       .equ eUSCI_A0_SFR + 0Ch    ; eUSCI_A0 Receive Buffer 8
518 SD_TXBUF       .equ eUSCI_A0_SFR + 0Eh    ; eUSCI_A0 Transmit Buffer 8
519 SD_IFG         .equ eUSCI_A0_SFR + 1Ch    ; eUSCI_A0 Interrupt Flags Register
520     .ENDIF ;UCA0_SD
521
522 ; ----------------------------------------------------------------------
523 ; eUSCI_A1
524 ; ----------------------------------------------------------------------
525
526     .IFDEF UCA1_TERM
527 TERMCTLW0       .equ eUSCI_A1_SFR + 00h    ; eUSCI_A1 Control Word Register 0
528 TERMBRW         .equ eUSCI_A1_SFR + 06h    ; eUSCI_A1 Baud Word Rate 0
529 TERMMCTLW       .equ eUSCI_A1_SFR + 08h    ; eUSCI_A1 Modulation Control
530 TERMRXBUF       .equ eUSCI_A1_SFR + 0Ch    ; eUSCI_A1 Receive Buffer
531 TERMTXBUF       .equ eUSCI_A1_SFR + 0Eh    ; eUSCI_A1 Transmit Buffer
532 TERMIE          .equ eUSCI_A1_SFR + 1Ah    ; eUSCI_A1 Interrupt Enable Register
533 TERMIFG         .equ eUSCI_A1_SFR + 1Ch    ; eUSCI_A1 Interrupt Flags Register
534 TERMVEC     .equ 0FFE6h
535     .ENDIF ;UCA1_TERM
536
537     .IFDEF UCA1_SD
538 SD_CTLW0        .equ eUSCI_A1_SFR + 00h    ; eUSCI_A1 Control Word Register 0
539 SD_BRW          .equ eUSCI_A1_SFR + 06h    ; eUSCI_A1 Baud Word Rate 0
540 SD_RXBUF        .equ eUSCI_A1_SFR + 0Ch    ; eUSCI_A1 Receive Buffer 8
541 SD_TXBUF        .equ eUSCI_A1_SFR + 0Eh    ; eUSCI_A1 Transmit Buffer 8
542 SD_IFG          .equ eUSCI_A1_SFR + 1Ch    ; eUSCI_A1 Interrupt Flags Register
543     .ENDIF ;UCA1_SD
544
545
546 ; ----------------------------------------------------------------------
547 ; eUSCI_B0
548 ; ----------------------------------------------------------------------
549     .IFDEF UCB0_SD
550 SD_CTLW0        .equ eUSCI_B0_SFR + 00h    ; eUSCI_B0 Control Word Register 0
551 SD_BRW          .equ eUSCI_B0_SFR + 06h    ; eUSCI_B0 Baud Word Rate 0
552 SD_RXBUF        .equ eUSCI_B0_SFR + 0Ch    ; eUSCI_B0 Receive Buffer 8
553 SD_TXBUF        .equ eUSCI_B0_SFR + 0Eh    ; eUSCI_B0 Transmit Buffer 8
554 SD_IFG          .equ eUSCI_B0_SFR + 2Ch    ; eUSCI_B0 Interrupt Flags Register
555     .ENDIF ;UCB0_SD
556
557 UCB0STATW       .equ eUSCI_B0_SFR + 08h     ; eUSCI_B0 Status words