0
|
1 |
/*
|
|
2 |
This file is part of CanFestival, a library implementing CanOpen Stack.
|
|
3 |
|
|
4 |
Copyright (C): Edouard TISSERANT and Francis DUPIN
|
|
5 |
|
|
6 |
See COPYING file for copyrights details.
|
|
7 |
|
|
8 |
This library is free software; you can redistribute it and/or
|
|
9 |
modify it under the terms of the GNU Lesser General Public
|
|
10 |
License as published by the Free Software Foundation; either
|
|
11 |
version 2.1 of the License, or (at your option) any later version.
|
|
12 |
|
|
13 |
This library is distributed in the hope that it will be useful,
|
|
14 |
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
15 |
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU
|
|
16 |
Lesser General Public License for more details.
|
|
17 |
|
|
18 |
You should have received a copy of the GNU Lesser General Public
|
|
19 |
License along with this library; if not, write to the Free Software
|
|
20 |
Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
|
|
21 |
*/
|
|
22 |
/*
|
|
23 |
Definition of the i/o ports of the Motorola HCS12
|
|
24 |
*/
|
|
25 |
|
|
26 |
/*
|
|
27 |
On HCS12, ports are maped by default at 0X0000. (see ports.s)
|
|
28 |
It can also be done at link stage with an option in
|
|
29 |
command line : for example to map at 0X8000
|
|
30 |
--defsym _io_ports8=0X8000 --defsym _io_ports16=0X8000
|
|
31 |
Or in the file memory.x :
|
|
32 |
PROVIDE (_io_ports8 = 0X8000);
|
|
33 |
PROVIDE (_io_ports16 = 0X8000);
|
|
34 |
(see portsaccess.h)
|
|
35 |
I wonder if the value in INITRG must not be changed too
|
|
36 |
at run time.
|
|
37 |
*/
|
|
38 |
|
|
39 |
#ifndef __HCS12_PORTS__
|
|
40 |
#define __HCS12_PORTS__
|
|
41 |
|
|
42 |
#define PORTA 0x0000
|
|
43 |
#define PORTB 0x0001
|
|
44 |
#define DDRA 0x0002
|
|
45 |
#define DDRB 0x0003
|
|
46 |
|
|
47 |
#define PORTE 0x0008
|
|
48 |
#define DDRE 0x0009
|
|
49 |
#define PEAR 0x000A
|
|
50 |
#define MODE 0x000B
|
|
51 |
#define PUCR 0x000C
|
|
52 |
#define RDRIV 0x000D
|
|
53 |
#define EBICTL 0x000E
|
|
54 |
|
|
55 |
#define INITRM 0x0010
|
|
56 |
#define INITRG 0x0011
|
|
57 |
#define INITEE 0x0012
|
|
58 |
#define MISC 0x0013
|
|
59 |
#define MTST0 0x0014
|
|
60 |
#define ITCR 0x0015
|
|
61 |
#define ITEST 0x0016
|
|
62 |
#define MTST1 0x0017
|
|
63 |
|
|
64 |
#define PARTIDH 0x001A
|
|
65 |
#define PARTIDL 0x001B
|
|
66 |
#define MEMSIZ0 0x001C
|
|
67 |
#define MEMSIZ1 0x001D
|
|
68 |
#define INTCR 0x001E
|
|
69 |
#define HPRIO 0x001F
|
|
70 |
|
|
71 |
#define BKPCT0 0x0028
|
|
72 |
#define BKPCT1 0x0029
|
|
73 |
#define BKP0X 0x002A
|
|
74 |
#define BKP0H 0x002B
|
|
75 |
#define BKP0L 0x002C
|
|
76 |
#define BKP1X 0x002D
|
|
77 |
#define BKP1H 0x002E
|
|
78 |
#define BKP1L 0x002F
|
|
79 |
#define PPAGE 0x0030
|
|
80 |
|
|
81 |
#define PORTK 0x0032
|
|
82 |
#define DDRK 0x0033
|
|
83 |
#define SYNR 0x0034
|
|
84 |
#define REFDV 0x0035
|
|
85 |
#define CTFLG 0x0036
|
|
86 |
#define CRGFLG 0x0037
|
|
87 |
#define CRGINT 0x0038
|
|
88 |
#define CLKSEL 0x0039
|
|
89 |
#define PLLCTL 0x003A
|
|
90 |
#define RTICTL 0x003B
|
|
91 |
#define COPCTL 0x003C
|
|
92 |
#define FORBYP 0x003D
|
|
93 |
#define CTCTL 0x003E
|
|
94 |
#define ARMCOP 0x003F
|
|
95 |
#define TIOS 0x0040
|
|
96 |
#define TCFORC 0x0041
|
|
97 |
#define TOC7M 0x0042
|
|
98 |
#define TOC7D 0x0043
|
|
99 |
#define TCNTH 0x0044
|
|
100 |
#define TCNTL 0x0045
|
|
101 |
#define TSCR1 0x0046
|
|
102 |
#define TTOV 0x0047
|
|
103 |
#define TCTL1 0x0048
|
|
104 |
#define TCTL2 0x0049
|
|
105 |
#define TCTL3 0x004A
|
|
106 |
#define TCTL4 0x004B
|
|
107 |
#define TIE 0x004C
|
|
108 |
#define TSCR2 0x004D
|
|
109 |
#define TFLG1 0x004E
|
|
110 |
#define TFLG2 0x004F
|
|
111 |
#define TC0H 0x0050
|
|
112 |
#define TC0L 0x0051
|
|
113 |
#define TC1H 0x0052
|
|
114 |
#define TC1L 0x0053
|
|
115 |
#define TC2H 0x0054
|
|
116 |
#define TC2L 0x0055
|
|
117 |
#define TC3H 0x0056
|
|
118 |
#define TC3L 0x0057
|
|
119 |
#define TC4H 0x0058
|
|
120 |
#define TC4L 0x0059
|
|
121 |
#define TC5H 0x005A
|
|
122 |
#define TC5L 0x005B
|
|
123 |
#define TC6H 0x005C
|
|
124 |
#define TC6L 0x005D
|
|
125 |
#define TC7H 0x005E
|
|
126 |
#define TC7L 0x005F
|
|
127 |
#define PACTL 0x0060
|
|
128 |
#define PAFLG 0x0061
|
|
129 |
#define PACN3H 0x0062
|
|
130 |
#define PACN2L 0x0063
|
|
131 |
#define PACN1H 0x0064
|
|
132 |
#define PACN0L 0x0065
|
|
133 |
#define MCCTL 0x0066
|
|
134 |
#define MCFLG 0x0067
|
|
135 |
#define ICPAR 0x0068
|
|
136 |
#define DLYCT 0x0069
|
|
137 |
#define ICOVW 0x006A
|
|
138 |
#define ICSYS 0x006B
|
|
139 |
|
|
140 |
#define TIMTST 0x006D
|
|
141 |
|
|
142 |
#define PBCTL 0x0070
|
|
143 |
#define PBFLG 0x0071
|
|
144 |
#define PA3H 0x0072
|
|
145 |
#define PA2H 0x0073
|
|
146 |
#define PA1H 0x0074
|
|
147 |
#define PA0H 0x0075
|
|
148 |
#define MCCNTH 0x0076
|
|
149 |
#define MCCNTL 0x0077
|
|
150 |
#define TC0HH 0x0078
|
|
151 |
#define TC0HL 0x0079
|
|
152 |
#define TC1HH 0x007A
|
|
153 |
#define TC1HL 0x007B
|
|
154 |
#define TC2HH 0x007C
|
|
155 |
#define TC2HL 0x007D
|
|
156 |
#define TC3HH 0x007E
|
|
157 |
|
|
158 |
#define ATD0CTL0 0x0080
|
|
159 |
#define ATD00CTL1 0x0081
|
|
160 |
#define ATD0CTL2 0x0082
|
|
161 |
#define ATD0CTL3 0x0083
|
|
162 |
#define ATD0CTL4 0x0084
|
|
163 |
#define ATD0CTL5 0x0085
|
|
164 |
#define ATD0STAT0 0x0086
|
|
165 |
#define ATD0STAT1 0x0087
|
|
166 |
#define ATD0TEST0 0x0088
|
|
167 |
#define ATD0TEST1 0x0089
|
|
168 |
|
|
169 |
#define ATD0DIEN 0x008D
|
|
170 |
|
|
171 |
#define PORTAD0 0x008F
|
|
172 |
#define ATD0DR0H 0x0090
|
|
173 |
#define ATD0DR0L 0x0091
|
|
174 |
#define ATD0DR1H 0x0092
|
|
175 |
#define ATD0DR1L 0x0093
|
|
176 |
#define ATD0DR2H 0x0094
|
|
177 |
#define ATD0DR2L 0x0095
|
|
178 |
#define ATD0DR3H 0x0096
|
|
179 |
#define ATD0DR3L 0x0097
|
|
180 |
#define ATD0DR4H 0x0098
|
|
181 |
#define ATD0DR4L 0x0099
|
|
182 |
#define ATD0DR5H 0x009A
|
|
183 |
#define ATD0DR5L 0x009B
|
|
184 |
#define ATD0DR6H 0x009C
|
|
185 |
#define ATD0DR6L 0x009D
|
|
186 |
#define ATD0DR7H 0x009E
|
|
187 |
#define ATD0DR7L 0x009F
|
|
188 |
#define PWME 0x00A0
|
|
189 |
#define PWMPOL 0x00A1
|
|
190 |
#define PWMCLK 0x00A2
|
|
191 |
#define PWMPRCLK 0x00A3
|
|
192 |
#define PWMCAE 0x00A4
|
|
193 |
#define PWMCTL 0x00A5
|
|
194 |
#define PWMTST 0x00A6
|
|
195 |
#define PWMPRSC 0x00A7
|
|
196 |
#define PWMSCLA 0x00A8
|
|
197 |
#define PWMSCLB 0x00A9
|
|
198 |
#define PWMSCNTA 0x00AA
|
|
199 |
#define PWMSCNTB 0x00AB
|
|
200 |
#define PWMCNT0 0x00AC
|
|
201 |
#define PWMCNT1 0x00AD
|
|
202 |
#define PWMCNT2 0x00AE
|
|
203 |
#define PWMCNT3 0x00AF
|
|
204 |
#define PWMCNT4 0x00B0
|
|
205 |
#define PWMCNT5 0x00B1
|
|
206 |
#define PWMCNT6 0x00B2
|
|
207 |
#define PWMCNT7 0x00B3
|
|
208 |
#define PWMPER0 0x00B4
|
|
209 |
#define PWMPER1 0x00B5
|
|
210 |
#define PWMPER2 0x00B6
|
|
211 |
#define PWMPER3 0x00B7
|
|
212 |
#define PWMPER4 0x00B8
|
|
213 |
#define PWMPER5 0x00B9
|
|
214 |
#define PWMPER6 0x00BA
|
|
215 |
#define PWMPER7 0x00BB
|
|
216 |
#define PWMDTY0 0x00BC
|
|
217 |
#define PWMDTY1 0x00BD
|
|
218 |
#define PWMDTY2 0x00BE
|
|
219 |
#define PWMDTY3 0x00BF
|
|
220 |
#define PWMDTY4 0x00C0
|
|
221 |
#define PWMDTY5 0x00C1
|
|
222 |
#define PWMDTY6 0x00C2
|
|
223 |
#define PWMDTY7 0x00C3
|
|
224 |
#define PWMSDN 0x00C4
|
|
225 |
|
|
226 |
#define SCI0BDH 0x00C8
|
|
227 |
#define SCI0BDL 0x00C9
|
|
228 |
#define SC0CR1 0x00CA
|
|
229 |
#define SCI0CR2 0x00CB
|
|
230 |
#define SCI0SR1 0x00CC
|
|
231 |
#define SC0SR2 0x00CD
|
|
232 |
#define SCI0DRH 0x00CE
|
|
233 |
#define SCI0DRL 0x00CF
|
|
234 |
#define SCI1BDH 0x00D0
|
|
235 |
#define SCI1BDL 0x00D1
|
|
236 |
#define SC1CR1 0x00D2
|
|
237 |
#define SCI1CR2 0x00D3
|
|
238 |
#define SCI1SR1 0x00D4
|
|
239 |
#define SC1SR2 0x00D5
|
|
240 |
#define SCI1DRH 0x00D6
|
|
241 |
#define SCI1DRL 0x00D7
|
|
242 |
#define SPI0CR1 0x00D8
|
|
243 |
#define SPI0CR2 0x00D9
|
|
244 |
#define SPI0BR 0x00DA
|
|
245 |
#define SPI0SR 0x00DB
|
|
246 |
|
|
247 |
#define SPI0DR 0x00DD
|
|
248 |
|
|
249 |
#define IBAD 0x00E0
|
|
250 |
#define IBFD 0x00E1
|
|
251 |
#define IBCR 0x00E2
|
|
252 |
#define IBSR 0x00E3
|
|
253 |
#define IICDR 0x00E4
|
|
254 |
|
|
255 |
#define DLCBCR1 0x00E8
|
|
256 |
#define DLCBSVR 0x00E9
|
|
257 |
#define DLCBCR2 0x00EA
|
|
258 |
#define DLCBDR 0x00EB
|
|
259 |
#define DLCBARD 0x00EC
|
|
260 |
#define DLCBRSR 0x00ED
|
|
261 |
#define DLCSCR 0x00EE
|
|
262 |
#define DLCBSTAT 0x00EF
|
|
263 |
#define SPI1CR1 0x00F0
|
|
264 |
#define SPI1CR2 0x00F1
|
|
265 |
#define SPI1BR 0x00F2
|
|
266 |
#define SPI1SR 0x00F3
|
|
267 |
|
|
268 |
#define SPI1DR 0x00F5
|
|
269 |
|
|
270 |
#define SPI2CR1 0x00F8
|
|
271 |
#define SPI2CR2 0x00F9
|
|
272 |
#define SPI2BR 0x00FA
|
|
273 |
#define SPI2SR 0x00FB
|
|
274 |
|
|
275 |
#define SPI2DR 0x00FD
|
|
276 |
|
|
277 |
#define FCLKDIV 0x0100
|
|
278 |
#define FSEC 0x0101
|
|
279 |
|
|
280 |
#define FCNFG 0x0103
|
|
281 |
#define FPROT 0x0104
|
|
282 |
#define FSTAT 0x0105
|
|
283 |
#define FCMD 0x0106
|
|
284 |
|
|
285 |
#define ECLKDIV 0x0110
|
|
286 |
|
|
287 |
#define ECNFG 0x0113
|
|
288 |
#define EPROT 0x0114
|
|
289 |
#define ESTAT 0x0115
|
|
290 |
#define ECMD 0x0116
|
|
291 |
|
|
292 |
#define ATD1CTL0 0x0120
|
|
293 |
#define ATD1CTL1 0x0121
|
|
294 |
#define ATD1CTL2 0x0122
|
|
295 |
#define ATD1CTL3 0x0123
|
|
296 |
#define ATD1CTL4 0x0124
|
|
297 |
#define ATD1CTL5 0x0125
|
|
298 |
#define ATD1STAT0 0x0126
|
|
299 |
#define ATD1STAT1 0x0127
|
|
300 |
#define ATD1TEST0 0x0128
|
|
301 |
#define ATD1TEST1 0x0129
|
|
302 |
|
|
303 |
#define ATDDIEN 0x012D
|
|
304 |
|
|
305 |
#define PORTAD1 0x012F
|
|
306 |
#define ATD1DR0H 0x0130
|
|
307 |
#define ATD1DR0L 0x0131
|
|
308 |
#define ATD1DR1H 0x0132
|
|
309 |
#define ATD1DR1L 0x0133
|
|
310 |
#define ATD1DR2H 0x0134
|
|
311 |
#define ATD1DR2L 0x0135
|
|
312 |
#define ATD1DR3H 0x0136
|
|
313 |
#define ATD1DR3L 0x0137
|
|
314 |
#define ATD1DR4H 0x0138
|
|
315 |
#define ATD1DR4L 0x0139
|
|
316 |
#define ATD1DR5H 0x013A
|
|
317 |
#define ATD1DR5L 0x013B
|
|
318 |
#define ATD1DR6H 0x013C
|
|
319 |
#define ATD1DR6L 0x013D
|
|
320 |
#define ATD1DR7H 0x013E
|
|
321 |
#define ATD1DR7L 0x013F
|
|
322 |
#define CAN0CTL0 0x0140
|
|
323 |
#define CAN0CTL1 0x0141
|
|
324 |
#define CAN0BTR0 0x0142
|
|
325 |
#define CAN0BTR1 0x0143
|
|
326 |
#define CAN0RFLG 0x0144
|
|
327 |
#define CAN0RIER 0x0145
|
|
328 |
#define CAN0TFLG 0x0146
|
|
329 |
#define CAN0TIER 0x0147
|
|
330 |
#define CAN0TARQ 0x0148
|
|
331 |
#define CAN0TAAK 0x0149
|
|
332 |
#define CAN0TBSEL 0x014A
|
|
333 |
#define CAN0IDAC 0x014B
|
|
334 |
|
|
335 |
#define CAN0RXERR 0x014E
|
|
336 |
#define CAN0TXERR 0x014F
|
|
337 |
#define CAN0IDAR0 0x0150
|
|
338 |
#define CAN0IDAR1 0x0151
|
|
339 |
#define CAN0IDAR2 0x0152
|
|
340 |
#define CAN0IDAR3 0x0153
|
|
341 |
#define CAN0IDMR0 0x0154
|
|
342 |
#define CAN0IDMR1 0x0155
|
|
343 |
#define CAN0IDMR2 0x0156
|
|
344 |
#define CAN0IDMR3 0x0157
|
|
345 |
#define CAN0IDAR4 0x0158
|
|
346 |
#define CAN0IDAR5 0x0159
|
|
347 |
#define CAN0IDAR6 0x015A
|
|
348 |
#define CAN0IDAR7 0x015B
|
|
349 |
#define CAN0IDMR4 0x015C
|
|
350 |
#define CAN0IDMR5 0x015D
|
|
351 |
#define CAN0IDMR6 0x015E
|
|
352 |
#define CAN0IDMR7 0x015F
|
|
353 |
#define CAN0RXFG0 0x0160
|
|
354 |
#define CAN0RXFG1 0x0161
|
|
355 |
#define CAN0RXFG2 0x0162
|
|
356 |
#define CAN0RXFG3 0x0163
|
|
357 |
#define CAN0RXFG4 0x0164
|
|
358 |
#define CAN0RXFG5 0x0165
|
|
359 |
#define CAN0RXFG6 0x0166
|
|
360 |
#define CAN0RXFG7 0x0167
|
|
361 |
#define CAN0RXFG8 0x0168
|
|
362 |
#define CAN0RXFG9 0x0169
|
|
363 |
#define CAN0RXFGA 0x016A
|
|
364 |
#define CAN0RXFGB 0x016B
|
|
365 |
#define CAN0RXFGC 0x016C
|
|
366 |
#define CAN0RXFGD 0x016D
|
|
367 |
#define CAN0RXFGE 0x016E
|
|
368 |
#define CAN0RXFGF 0x016F
|
|
369 |
#define CAN0TXFG0 0x0170
|
|
370 |
#define CAN0TXFG1 0x0171
|
|
371 |
#define CAN0TXFG2 0x0172
|
|
372 |
#define CAN0TXFG3 0x0173
|
|
373 |
#define CAN0TXFG4 0x0174
|
|
374 |
#define CAN0TXFG5 0x0175
|
|
375 |
#define CAN0TXFG6 0x0176
|
|
376 |
#define CAN0TXFG7 0x0177
|
|
377 |
#define CAN0TXFG8 0x0178
|
|
378 |
#define CAN0TXFG9 0x0179
|
|
379 |
#define CAN0TXFGA 0x017A
|
|
380 |
#define CAN0TXFGB 0x017B
|
|
381 |
#define CAN0TXFGC 0x017C
|
|
382 |
#define CAN0TXFGD 0x017D
|
|
383 |
#define CAN0TXFGE 0x017E
|
|
384 |
#define CAN0TXFGF 0x017F
|
|
385 |
|
|
386 |
#define CAN1CTL0 0x0180
|
|
387 |
#define CAN1CTL1 0x0181
|
|
388 |
#define CAN1BTR0 0x0182
|
|
389 |
#define CAN1BTR1 0x0183
|
|
390 |
#define CAN1RFLG 0x0184
|
|
391 |
#define CAN1RIER 0x0185
|
|
392 |
#define CAN1TFLG 0x0186
|
|
393 |
#define CAN1TIER 0x0187
|
|
394 |
#define CAN1TARQ 0x0188
|
|
395 |
#define CAN1TAAK 0x0189
|
|
396 |
#define CAN1TBSEL 0x018A
|
|
397 |
#define CAN1IDAC 0x018B
|
|
398 |
#define CAN1RXERR 0x018E
|
|
399 |
#define CAN1TXERR 0x018F
|
|
400 |
#define CAN1IDAR0 0x0190
|
|
401 |
#define CAN1IDAR1 0x0191
|
|
402 |
#define CAN1IDAR2 0x0192
|
|
403 |
#define CAN1IDAR3 0x0193
|
|
404 |
#define CAN1IDMR0 0x0194
|
|
405 |
#define CAN1IDMR1 0x0195
|
|
406 |
#define CAN1IDMR2 0x0196
|
|
407 |
#define CAN1IDMR3 0x0197
|
|
408 |
#define CAN1IDAR4 0x0198
|
|
409 |
#define CAN1IDAR5 0x0199
|
|
410 |
#define CAN1IDAR6 0x019A
|
|
411 |
#define CAN1IDAR7 0x019B
|
|
412 |
#define CAN1IDMR4 0x019C
|
|
413 |
#define CAN1IDMR5 0x019D
|
|
414 |
#define CAN1IDMR6 0x019E
|
|
415 |
#define CAN1IDMR7 0x019F
|
|
416 |
|
|
417 |
#define CAN1RXFG0 0x01A0
|
|
418 |
#define CAN1RXFG1 0x01A1
|
|
419 |
#define CAN1RXFG2 0x01A2
|
|
420 |
#define CAN1RXFG3 0x01A3
|
|
421 |
#define CAN1RXFG4 0x01A4
|
|
422 |
#define CAN1RXFG5 0x01A5
|
|
423 |
#define CAN1RXFG6 0x01A6
|
|
424 |
#define CAN1RXFG7 0x01A7
|
|
425 |
#define CAN1RXFG8 0x01A8
|
|
426 |
#define CAN1RXFG9 0x01A9
|
|
427 |
#define CAN1RXFGA 0x01AA
|
|
428 |
#define CAN1RXFGB 0x01AB
|
|
429 |
#define CAN1RXFGC 0x01AC
|
|
430 |
#define CAN1RXFGD 0x01AD
|
|
431 |
#define CAN1RXFGE 0x01AE
|
|
432 |
#define CAN1RXFGF 0x01AF
|
|
433 |
#define CAN1TXFG0 0x01B0
|
|
434 |
#define CAN1TXFG1 0x01B1
|
|
435 |
#define CAN1TXFG2 0x01B2
|
|
436 |
#define CAN1TXFG3 0x01B3
|
|
437 |
#define CAN1TXFG4 0x01B4
|
|
438 |
#define CAN1TXFG5 0x01B5
|
|
439 |
#define CAN1TXFG6 0x01B6
|
|
440 |
#define CAN1TXFG7 0x01B7
|
|
441 |
#define CAN1TXFG8 0x01B8
|
|
442 |
#define CAN1TXFG9 0x01B9
|
|
443 |
#define CAN1TXFGA 0x01BA
|
|
444 |
#define CAN1TXFGB 0x01BB
|
|
445 |
#define CAN1TXFGC 0x01BC
|
|
446 |
#define CAN1TXFGD 0x01BD
|
|
447 |
#define CAN1TXFGE 0x01BE
|
|
448 |
#define CAN1TXFGF 0x01BF
|
|
449 |
#define CAN2CTL0 0x01C0
|
|
450 |
#define CAN2CTL1 0x01C1
|
|
451 |
#define CAN2BTR0 0x01C2
|
|
452 |
#define CAN2BTR1 0x01C3
|
|
453 |
#define CAN2RFLG 0x01C4
|
|
454 |
#define CAN2RIER 0x01C5
|
|
455 |
#define CAN2TFLG 0x01C6
|
|
456 |
#define CAN2TIER 0x01C7
|
|
457 |
#define CAN2TARQ 0x01C8
|
|
458 |
#define CAN2TAAK 0x01C9
|
|
459 |
#define CAN2TBSEL 0x01CA
|
|
460 |
#define CAN2IDAC 0x01CB
|
|
461 |
|
|
462 |
#define CAN2RXERR 0x01CE
|
|
463 |
#define CAN2TXERR 0x01CF
|
|
464 |
#define CAN2IDAR0 0x01D0
|
|
465 |
#define CAN2IDAR1 0x01D1
|
|
466 |
#define CAN2IDAR2 0x01D2
|
|
467 |
#define CAN2IDAR3 0x01D3
|
|
468 |
#define CAN2IDMR0 0x01D4
|
|
469 |
#define CAN2IDMR1 0x01D5
|
|
470 |
#define CAN2IDMR2 0x01D6
|
|
471 |
#define CAN2IDMR3 0x01D7
|
|
472 |
#define CAN2IDAR4 0x01D8
|
|
473 |
#define CAN2IDAR5 0x01D9
|
|
474 |
#define CAN2IDAR6 0x01DA
|
|
475 |
#define CAN2IDAR7 0x01DB
|
|
476 |
#define CAN2IDMR4 0x01DC
|
|
477 |
#define CAN2IDMR5 0x01DD
|
|
478 |
#define CAN2IDMR6 0x01DE
|
|
479 |
#define CAN2IDMR7 0x01DF
|
|
480 |
#define CAN2RXFG0 0x01E0
|
|
481 |
#define CAN2RXFG1 0x01E1
|
|
482 |
#define CAN2RXFG2 0x01E2
|
|
483 |
#define CAN2RXFG3 0x01E3
|
|
484 |
#define CAN2RXFG4 0x01E4
|
|
485 |
#define CAN2RXFG5 0x01E5
|
|
486 |
#define CAN2RXFG6 0x01E6
|
|
487 |
#define CAN2RXFG7 0x01E7
|
|
488 |
#define CAN2RXFG8 0x01E8
|
|
489 |
#define CAN2RXFG9 0x01E9
|
|
490 |
#define CAN2RXFGA 0x01EA
|
|
491 |
#define CAN2RXFGB 0x01EB
|
|
492 |
#define CAN2RXFGC 0x01EC
|
|
493 |
#define CAN2RXFGD 0x01ED
|
|
494 |
#define CAN2RXFGE 0x01EE
|
|
495 |
#define CAN2RXFGF 0x01EF
|
|
496 |
#define CAN2TXFG0 0x01F0
|
|
497 |
#define CAN2TXFG1 0x01F1
|
|
498 |
#define CAN2TXFG2 0x01F2
|
|
499 |
#define CAN2TXFG3 0x01F3
|
|
500 |
#define CAN2TXFG4 0x01F4
|
|
501 |
#define CAN2TXFG5 0x01F5
|
|
502 |
#define CAN2TXFG6 0x01F6
|
|
503 |
#define CAN2TXFG7 0x01F7
|
|
504 |
#define CAN2TXFG8 0x01F8
|
|
505 |
#define CAN2TXFG9 0x01F9
|
|
506 |
#define CAN2TXFGA 0x01FA
|
|
507 |
#define CAN2TXFGB 0x01FB
|
|
508 |
#define CAN2TXFGC 0x01FC
|
|
509 |
#define CAN2TXFGD 0x01FD
|
|
510 |
#define CAN2TXFGE 0x01FE
|
|
511 |
#define CAN2TXFGF 0x01FF
|
|
512 |
|
|
513 |
#define CAN3CTL0 0x0200
|
|
514 |
#define CAN3CTL1 0x0201
|
|
515 |
#define CAN3BTR0 0x0202
|
|
516 |
#define CAN3BTR1 0x0203
|
|
517 |
#define CAN3RFLG 0x0204
|
|
518 |
#define CAN3RIER 0x0205
|
|
519 |
#define CAN3TFLG 0x0206
|
|
520 |
#define CAN3TIER 0x0207
|
|
521 |
#define CAN3TARQ 0x0208
|
|
522 |
#define CAN3TAAK 0x0209
|
|
523 |
#define CAN3TBSEL 0x020A
|
|
524 |
#define CAN3IDAC 0x020B
|
|
525 |
|
|
526 |
#define CAN3RXERR 0x020E
|
|
527 |
#define CAN3TXERR 0x020F
|
|
528 |
#define CAN3IDAR0 0x0210
|
|
529 |
#define CAN3IDAR1 0x0211
|
|
530 |
#define CAN3IDAR2 0x0212
|
|
531 |
#define CAN3IDAR3 0x0213
|
|
532 |
#define CAN3IDMR0 0x0214
|
|
533 |
#define CAN3IDMR1 0x0215
|
|
534 |
#define CAN3IDMR2 0x0216
|
|
535 |
#define CAN3IDMR3 0x0217
|
|
536 |
#define CAN3IDAR4 0x0218
|
|
537 |
#define CAN3IDAR5 0x0219
|
|
538 |
#define CAN3IDAR6 0x021A
|
|
539 |
#define CAN3IDAR7 0x021B
|
|
540 |
#define CAN3IDMR4 0x021C
|
|
541 |
#define CAN3IDMR5 0x021D
|
|
542 |
#define CAN3IDMR6 0x021E
|
|
543 |
#define CAN3IDMR7 0x021F
|
|
544 |
|
|
545 |
#define CAN3RXFG0 0x0220
|
|
546 |
#define CAN3RXFG1 0x0221
|
|
547 |
#define CAN3RXFG2 0x0222
|
|
548 |
#define CAN3RXFG3 0x0223
|
|
549 |
#define CAN3RXFG4 0x0224
|
|
550 |
#define CAN3RXFG5 0x0225
|
|
551 |
#define CAN3RXFG6 0x0226
|
|
552 |
#define CAN3RXFG7 0x0227
|
|
553 |
#define CAN3RXFG8 0x0228
|
|
554 |
#define CAN3RXFG9 0x0229
|
|
555 |
#define CAN3RXFGA 0x022A
|
|
556 |
#define CAN3RXFGB 0x022B
|
|
557 |
#define CAN3RXFGC 0x022C
|
|
558 |
#define CAN3RXFGD 0x022D
|
|
559 |
#define CAN3RXFGE 0x022E
|
|
560 |
#define CAN3RXFGF 0x022F
|
|
561 |
#define CAN3TXFG0 0x0230
|
|
562 |
#define CAN3TXFG1 0x0231
|
|
563 |
#define CAN3TXFG2 0x0232
|
|
564 |
#define CAN3TXFG3 0x0233
|
|
565 |
#define CAN3TXFG4 0x0234
|
|
566 |
#define CAN3TXFG5 0x0235
|
|
567 |
#define CAN3TXFG6 0x0236
|
|
568 |
#define CAN3TXFG7 0x0237
|
|
569 |
#define CAN3TXFG8 0x0238
|
|
570 |
#define CAN3TXFG9 0x0239
|
|
571 |
#define CAN3TXFGA 0x023A
|
|
572 |
#define CAN3TXFGB 0x023B
|
|
573 |
#define CAN3TXFGC 0x023C
|
|
574 |
#define CAN3TXFGD 0x023D
|
|
575 |
#define CAN3TXFGE 0x023E
|
|
576 |
#define CAN3TXFGF 0x023F
|
|
577 |
|
|
578 |
#define PTT 0x0240
|
|
579 |
#define PTIT 0x0241
|
|
580 |
#define DDRT 0x0242
|
|
581 |
#define RDRT 0x0243
|
|
582 |
#define PERT 0x0244
|
|
583 |
#define PPST 0x0245
|
|
584 |
|
|
585 |
#define PTS 0x0248
|
|
586 |
#define PTIS 0x0249
|
|
587 |
#define DDRS 0x024A
|
|
588 |
#define RDRS 0x024B
|
|
589 |
#define PERS 0x024C
|
|
590 |
#define PPSS 0x024D
|
|
591 |
#define WOMS 0x024E
|
|
592 |
|
|
593 |
#define PTM 0x0250
|
|
594 |
#define PTIM 0x0251
|
|
595 |
#define DDRM 0x0252
|
|
596 |
#define RDRM 0x0253
|
|
597 |
#define PERM 0x0254
|
|
598 |
#define PPSM 0x0255
|
|
599 |
#define WOMM 0x0256
|
|
600 |
|
|
601 |
#define PTP 0x0258
|
|
602 |
#define PTIP 0x0259
|
|
603 |
#define DDRP 0x025A
|
|
604 |
#define RDRP 0x025B
|
|
605 |
#define PERP 0x025C
|
|
606 |
#define PPSP 0x025D
|
|
607 |
#define PIEP 0x025E
|
|
608 |
#define PIFP 0x025F
|
|
609 |
#define PTH 0x0260
|
|
610 |
#define PTIH 0x0261
|
|
611 |
#define DDRH 0x0262
|
|
612 |
#define RDRH 0x0263
|
|
613 |
#define PERH 0x0264
|
|
614 |
#define PPSH 0x0265
|
|
615 |
#define PIEH 0x0266
|
|
616 |
#define PIFH 0x0267
|
|
617 |
#define PTJ 0x0268
|
|
618 |
#define PTIJ 0x0269
|
|
619 |
#define DDRJ 0x026A
|
|
620 |
#define RDRJ 0x026B
|
|
621 |
#define PERJ 0x026C
|
|
622 |
#define PPSJ 0x026D
|
|
623 |
#define PIEJ 0x026E
|
|
624 |
#define PIFJ 0x026F
|
|
625 |
|
|
626 |
#define CAN4CTL0 0x0280
|
|
627 |
#define CAN4CTL1 0x0281
|
|
628 |
#define CAN4BTR0 0x0282
|
|
629 |
#define CAN4BTR1 0x0283
|
|
630 |
#define CAN4RFLG 0x0284
|
|
631 |
#define CAN4RIER 0x0285
|
|
632 |
#define CAN4TFLG 0x0286
|
|
633 |
#define CAN4TIER 0x0287
|
|
634 |
#define CAN4TARQ 0x0288
|
|
635 |
#define CAN4TAAK 0x0289
|
|
636 |
#define CAN4TBSEL 0x028A
|
|
637 |
#define CAN4IDAC 0x028B
|
|
638 |
|
|
639 |
#define CAN4RXERR 0x028E
|
|
640 |
#define CAN4TXERR 0x028F
|
|
641 |
#define CAN4IDAR0 0x0290
|
|
642 |
#define CAN4IDAR1 0x0291
|
|
643 |
#define CAN4IDAR2 0x0292
|
|
644 |
#define CAN4IDAR3 0x0293
|
|
645 |
#define CAN4IDMR0 0x0294
|
|
646 |
#define CAN4IDMR1 0x0295
|
|
647 |
#define CAN4IDMR2 0x0296
|
|
648 |
#define CAN4IDMR3 0x0297
|
|
649 |
#define CAN4IDAR4 0x0298
|
|
650 |
#define CAN4IDAR5 0x0299
|
|
651 |
#define CAN4IDAR6 0x029A
|
|
652 |
#define CAN4IDAR7 0x029B
|
|
653 |
#define CAN4IDMR4 0x029C
|
|
654 |
#define CAN4IDMR5 0x029D
|
|
655 |
#define CAN4IDMR6 0x029E
|
|
656 |
#define CAN4IDMR7 0x029F
|
|
657 |
|
|
658 |
#define CAN4RXFG0 0x02A0
|
|
659 |
#define CAN4RXFG1 0x02A1
|
|
660 |
#define CAN4RXFG2 0x02A2
|
|
661 |
#define CAN4RXFG3 0x02A3
|
|
662 |
#define CAN4RXFG4 0x02A4
|
|
663 |
#define CAN4RXFG5 0x02A5
|
|
664 |
#define CAN4RXFG6 0x02A6
|
|
665 |
#define CAN4RXFG7 0x02A7
|
|
666 |
#define CAN4RXFG8 0x02A8
|
|
667 |
#define CAN4RXFG9 0x02A9
|
|
668 |
#define CAN4RXFGA 0x02AA
|
|
669 |
#define CAN4RXFGB 0x02AB
|
|
670 |
#define CAN4RXFGC 0x02AC
|
|
671 |
#define CAN4RXFGD 0x02AD
|
|
672 |
#define CAN4RXFGE 0x02AE
|
|
673 |
#define CAN4RXFGF 0x02AF
|
|
674 |
#define CAN4TXFG0 0x02B0
|
|
675 |
#define CAN4TXFG1 0x02B1
|
|
676 |
#define CAN4TXFG2 0x02B2
|
|
677 |
#define CAN4TXFG3 0x02B3
|
|
678 |
#define CAN4TXFG4 0x02B4
|
|
679 |
#define CAN4TXFG5 0x02B5
|
|
680 |
#define CAN4TXFG6 0x02B6
|
|
681 |
#define CAN4TXFG7 0x02B7
|
|
682 |
#define CAN4TXFG8 0x02B8
|
|
683 |
#define CAN4TXFG9 0x02B9
|
|
684 |
#define CAN4TXFGA 0x02BA
|
|
685 |
#define CAN4TXFGB 0x02BB
|
|
686 |
#define CAN4TXFGC 0x02BC
|
|
687 |
#define CAN4TXFGD 0x02BD
|
|
688 |
#define CAN4TXFGE 0x02BE
|
|
689 |
#define CAN4TXFGF 0x02BF
|
|
690 |
|
|
691 |
|
|
692 |
|
|
693 |
/***********************************************
|
|
694 |
Constants for MSCAN
|
|
695 |
************************************************
|
|
696 |
*/
|
|
697 |
|
|
698 |
#define CAN0 0x0140 /* First address for MSCAN0 */
|
|
699 |
#define CAN1 0x0180 /* First address for MSCAN1 */
|
|
700 |
#define CAN2 0x01C0 /* First address for MSCAN2 */
|
|
701 |
#define CAN3 0x0200 /* First address for MSCAN3 */
|
|
702 |
#define CAN4 0x0280 /* First address for MSCAN4 */
|
|
703 |
|
|
704 |
#define CANCTL0 0X00 /* Control register 0 */
|
|
705 |
#define CANCTL1 0X01 /* Control register 1 */
|
|
706 |
#define CANBTR0 0X02 /* Bus timing register 0 */
|
|
707 |
#define CANBTR1 0X03 /* Bus timing register 1 */
|
|
708 |
#define CANRFLG 0X04 /* Receiver flag register */
|
|
709 |
#define CANRIER 0X05 /* Enable interruptions when reception */
|
|
710 |
#define CANTFLG 0X06 /* Transmit flag register */
|
|
711 |
#define CANTIER 0X07 /* Enable interruptions when transmission */
|
|
712 |
#define CANTBSEL 0X0A /* Select foreground buffer for transmit */
|
|
713 |
#define CANIDAC 0x0B /* Identifier acceptance control register */
|
|
714 |
#define CANIDAR0 0x10
|
|
715 |
#define CANIDAR1 0x11
|
|
716 |
#define CANIDAR2 0x12
|
|
717 |
#define CANIDAR3 0x13
|
|
718 |
#define CANIDMR0 0x14
|
|
719 |
#define CANIDMR1 0x15
|
|
720 |
#define CANIDMR2 0x16
|
|
721 |
#define CANIDMR3 0x17
|
|
722 |
#define CANIDAR4 0x18
|
|
723 |
#define CANIDAR5 0x19
|
|
724 |
#define CANIDAR6 0x1A
|
|
725 |
#define CANIDAR7 0x1B
|
|
726 |
#define CANIDMR4 0x1C
|
|
727 |
#define CANIDMR5 0x1D
|
|
728 |
#define CANIDMR6 0x1E
|
|
729 |
#define CANIDMR7 0x1F
|
|
730 |
|
|
731 |
/* Received foreground buffer */
|
|
732 |
#define CANRCVID 0x20 /* Base of identifier registers */
|
|
733 |
#define CANRCVDTA 0x24 /* Base of data registers */
|
|
734 |
#define CANRCVLEN 0x2C /* Data length register */
|
|
735 |
|
|
736 |
/* Transmit foreground buffer */
|
|
737 |
#define CANTRSID 0x30 /* Base of identifier registers */
|
|
738 |
#define CANTRSDTA 0x34 /* Base of data registers */
|
|
739 |
#define CANTRSLEN 0x3C /* Data length register */
|
|
740 |
#define CANTRSPRI 0x3D /* Priority register */
|
|
741 |
|
|
742 |
|
|
743 |
/* Constants for serials port */
|
|
744 |
#define SCI0 0x00C8
|
|
745 |
#define SCI1 0x00D0
|
|
746 |
|
|
747 |
#define SCIBDH 0x00
|
|
748 |
#define SCIBDL 0x01
|
|
749 |
#define SCICR1 0x02
|
|
750 |
#define SCICR2 0x03
|
|
751 |
#define SCISR1 0x04
|
|
752 |
#define SCISR2 0x05
|
|
753 |
#define SCIDRH 0x06
|
|
754 |
#define SCIDRL 0x07
|
|
755 |
|
|
756 |
|
|
757 |
#endif /* __HCS12_PORTS__ */
|
|
758 |
|
|
759 |
|
|
760 |
|
|
761 |
|
|
762 |
|
|
763 |
|
|
764 |
|
|
765 |
|
|
766 |
|
|
767 |
|
|
768 |
|