OpenCores
URL https://opencores.org/ocsvn/openmsp430/openmsp430/trunk

Subversion Repositories openmsp430

[/] [openmsp430/] [trunk/] [core/] [sim/] [rtl_sim/] [src/] [tA_capture.s43] - Blame information for rev 141

Go to most recent revision | Details | Compare with Previous | View Log

Line No. Rev Author Line
1 2 olivier.gi
/*===========================================================================*/
2
/* Copyright (C) 2001 Authors                                                */
3
/*                                                                           */
4
/* This source file may be used and distributed without restriction provided */
5
/* that this copyright statement is not removed from the file and that any   */
6
/* derivative work contains the original copyright notice and the associated */
7
/* disclaimer.                                                               */
8
/*                                                                           */
9
/* This source file is free software; you can redistribute it and/or modify  */
10
/* it under the terms of the GNU Lesser General Public License as published  */
11
/* by the Free Software Foundation; either version 2.1 of the License, or    */
12
/* (at your option) any later version.                                       */
13
/*                                                                           */
14
/* This source is distributed in the hope that it will be useful, but WITHOUT*/
15
/* ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or     */
16
/* FITNESS FOR A PARTICULAR PURPOSE. See the GNU Lesser General Public       */
17
/* License for more details.                                                 */
18
/*                                                                           */
19
/* You should have received a copy of the GNU Lesser General Public License  */
20
/* along with this source; if not, write to the Free Software Foundation,    */
21
/* Inc., 51 Franklin Street, Fifth Floor, Boston, MA  02110-1301  USA        */
22
/*                                                                           */
23
/*===========================================================================*/
24
/*                                  TIMER A                                  */
25
/*---------------------------------------------------------------------------*/
26
/* Test the timer A:                                                         */
27
/*                        - Check the timer capture unit.                    */
28 18 olivier.gi
/*                                                                           */
29
/* Author(s):                                                                */
30
/*             - Olivier Girard,    olgirard@gmail.com                       */
31
/*                                                                           */
32
/*---------------------------------------------------------------------------*/
33 19 olivier.gi
/* $Rev: 141 $                                                                */
34
/* $LastChangedBy: olivier.girard $                                          */
35
/* $LastChangedDate: 2012-05-05 23:22:06 +0200 (Sat, 05 May 2012) $          */
36 2 olivier.gi
/*===========================================================================*/
37
 
38 141 olivier.gi
.include "pmem_defs.asm"
39
 
40 2 olivier.gi
.global main
41
 
42
WAIT_FUNC:
43
        dec r14
44
        jnz WAIT_FUNC
45
        ret
46
 
47
main:
48 111 olivier.gi
        mov  #DMEM_250, r1      ; # Initialize stack pointer
49
        mov  #0x0000, &DMEM_200
50 2 olivier.gi
        mov  #0x0000, r15
51
 
52
       /* --------------   TIMER A TEST:  INPUT MUX (CCI) ----------------- */
53
 
54
        mov  #0x0200, &TACTL
55
        mov  #0x0000, &TACCTL0
56
        mov  #0x0000, &TACCTL1
57
        mov  #0x0000, &TACCTL2
58
        dint
59
 
60
                                ; # --------- Comparator 0 ----------
61
        mov  #0x0204, &TACTL
62
        mov  #0x0000, &TACCR0
63
        mov  #0x0000, &TACCTL0  ; # CCIxA
64 111 olivier.gi
        mov  #0x0001, &DMEM_200
65
        mov &TACCTL0, &DMEM_202
66
        mov  #0x0002, &DMEM_200
67
        mov &TACCTL0, &DMEM_204
68
        mov  #0x0003, &DMEM_200
69 2 olivier.gi
 
70
        mov  #0x1000, &TACCTL0  ; # CCIxB
71 111 olivier.gi
        mov  #0x0004, &DMEM_200
72
        mov &TACCTL0, &DMEM_202
73
        mov  #0x0005, &DMEM_200
74
        mov &TACCTL0, &DMEM_204
75
        mov  #0x0006, &DMEM_200
76 2 olivier.gi
 
77
        mov  #0x2000, &TACCTL0  ; # GND
78 111 olivier.gi
        mov  #0x0007, &DMEM_200
79
        mov &TACCTL0, &DMEM_202
80
        mov  #0x0008, &DMEM_200
81
        mov &TACCTL0, &DMEM_204
82
        mov  #0x0009, &DMEM_200
83 2 olivier.gi
 
84
        mov  #0x3000, &TACCTL0  ; # VDD
85 111 olivier.gi
        mov  #0x000A, &DMEM_200
86
        mov &TACCTL0, &DMEM_202
87
        mov  #0x000B, &DMEM_200
88
        mov &TACCTL0, &DMEM_204
89
        mov  #0x000C, &DMEM_200
90 2 olivier.gi
 
91
                                ; # --------- Comparator 1 ----------
92
        mov  #0x0204, &TACTL
93
        mov  #0x0000, &TACCR1
94
        mov  #0x0000, &TACCTL1  ; # CCIxA
95 111 olivier.gi
        mov  #0x0011, &DMEM_200
96
        mov &TACCTL1, &DMEM_202
97
        mov  #0x0012, &DMEM_200
98
        mov &TACCTL1, &DMEM_204
99
        mov  #0x0013, &DMEM_200
100 2 olivier.gi
 
101
        mov  #0x1000, &TACCTL1  ; # CCIxB
102 111 olivier.gi
        mov  #0x0014, &DMEM_200
103
        mov &TACCTL1, &DMEM_202
104
        mov  #0x0015, &DMEM_200
105
        mov &TACCTL1, &DMEM_204
106
        mov  #0x0016, &DMEM_200
107 2 olivier.gi
 
108
        mov  #0x2000, &TACCTL1  ; # GND
109 111 olivier.gi
        mov  #0x0017, &DMEM_200
110
        mov &TACCTL1, &DMEM_202
111
        mov  #0x0018, &DMEM_200
112
        mov &TACCTL1, &DMEM_204
113
        mov  #0x0019, &DMEM_200
114 2 olivier.gi
 
115
        mov  #0x3000, &TACCTL1  ; # VDD
116 111 olivier.gi
        mov  #0x001A, &DMEM_200
117
        mov &TACCTL1, &DMEM_202
118
        mov  #0x001B, &DMEM_200
119
        mov &TACCTL1, &DMEM_204
120
        mov  #0x001C, &DMEM_200
121 2 olivier.gi
 
122
                                ; # --------- Comparator 2 ----------
123
        mov  #0x0204, &TACTL
124
        mov  #0x0000, &TACCR2
125
        mov  #0x0000, &TACCTL2  ; # CCIxA
126 111 olivier.gi
        mov  #0x0021, &DMEM_200
127
        mov &TACCTL2, &DMEM_202
128
        mov  #0x0022, &DMEM_200
129
        mov &TACCTL2, &DMEM_204
130
        mov  #0x0023, &DMEM_200
131 2 olivier.gi
 
132
        mov  #0x1000, &TACCTL2  ; # CCIxB
133 111 olivier.gi
        mov  #0x0024, &DMEM_200
134
        mov &TACCTL2, &DMEM_202
135
        mov  #0x0025, &DMEM_200
136
        mov &TACCTL2, &DMEM_204
137
        mov  #0x0026, &DMEM_200
138 2 olivier.gi
 
139
        mov  #0x2000, &TACCTL2  ; # GND
140 111 olivier.gi
        mov  #0x0027, &DMEM_200
141
        mov &TACCTL2, &DMEM_202
142
        mov  #0x0028, &DMEM_200
143
        mov &TACCTL2, &DMEM_204
144
        mov  #0x0029, &DMEM_200
145 2 olivier.gi
 
146
        mov  #0x3000, &TACCTL2  ; # VDD
147 111 olivier.gi
        mov  #0x002A, &DMEM_200
148
        mov &TACCTL2, &DMEM_202
149
        mov  #0x002B, &DMEM_200
150
        mov &TACCTL2, &DMEM_204
151
        mov  #0x002C, &DMEM_200
152 2 olivier.gi
 
153
 
154
        dint
155 111 olivier.gi
        mov  #0x0000, &DMEM_200
156 2 olivier.gi
        mov  #0x1000, r15
157
 
158
       /* --------------   TIMER A TEST:  CAPTURE, EDGE SELECTION AND INTERRUPT ----------------- */
159
 
160
        mov  #0x0200, &TACTL
161
        mov  #0x0000, &TACCTL0
162
        mov  #0x0000, &TACCTL1
163
        mov  #0x0000, &TACCTL2
164
        dint
165
 
166
                                ; # --------- Comparator 0 ----------
167
        mov  #0x0204, &TACTL
168
        mov  #0x1234, &TAR
169
        mov  #0x0110, &TACCTL0  ; # No capture, Interrupt enable
170
        mov  #0x0000, &TACCR0
171 111 olivier.gi
        mov  #0x0001, &DMEM_200
172 2 olivier.gi
        nop
173
        nop
174 111 olivier.gi
        mov  &TACCR0, &DMEM_202
175 2 olivier.gi
        mov  #0x0110, &TACCTL0  ; # No capture, Interrupt enable
176
        mov  #0x0000, &TACCR0
177 111 olivier.gi
        mov  #0x0002, &DMEM_200
178 2 olivier.gi
        nop
179
        nop
180 111 olivier.gi
        mov  &TACCR0, &DMEM_204
181 2 olivier.gi
        mov  #0x0000, &TACCTL0
182 111 olivier.gi
        mov  #0x0003, &DMEM_200
183 2 olivier.gi
 
184
        mov  #0x0204, &TACTL
185
        mov  #0x1234, &TAR
186
        mov  #0x4110, &TACCTL0  ; # Rising edge, Interrupt enable
187
        mov  #0x0000, &TACCR0
188 111 olivier.gi
        mov  #0x0004, &DMEM_200
189 2 olivier.gi
        nop
190
        nop
191 111 olivier.gi
        mov  &TACCR0, &DMEM_202
192 2 olivier.gi
        mov  #0x4110, &TACCTL0  ; # Rising edge, Interrupt enable
193
        mov  #0x0000, &TACCR0
194 111 olivier.gi
        mov  #0x0005, &DMEM_200
195 2 olivier.gi
        nop
196
        nop
197 111 olivier.gi
        mov  &TACCR0, &DMEM_204
198 2 olivier.gi
        mov  #0x0000, &TACCTL0
199 111 olivier.gi
        mov  #0x0006, &DMEM_200
200 2 olivier.gi
 
201
        mov  #0x0204, &TACTL
202
        mov  #0x1234, &TAR
203
        mov  #0x8110, &TACCTL0  ; # Falling edge, Interrupt enable
204
        mov  #0x0000, &TACCR0
205 111 olivier.gi
        mov  #0x0007, &DMEM_200
206 2 olivier.gi
        nop
207
        nop
208 111 olivier.gi
        mov  &TACCR0, &DMEM_202
209 2 olivier.gi
        mov  #0x8110, &TACCTL0  ; # Falling edge, Interrupt enable
210
        mov  #0x0000, &TACCR0
211 111 olivier.gi
        mov  #0x0008, &DMEM_200
212 2 olivier.gi
        nop
213
        nop
214 111 olivier.gi
        mov  &TACCR0, &DMEM_204
215 2 olivier.gi
        mov  #0x0000, &TACCTL0
216 111 olivier.gi
        mov  #0x0009, &DMEM_200
217 2 olivier.gi
 
218
        mov  #0x0204, &TACTL
219
        mov  #0x1234, &TAR
220
        mov  #0xC110, &TACCTL0  ; # Rising/Falling edge, Interrupt enable
221
        mov  #0x0000, &TACCR0
222 111 olivier.gi
        mov  #0x000A, &DMEM_200
223 2 olivier.gi
        nop
224
        nop
225 111 olivier.gi
        mov  &TACCR0, &DMEM_202
226 2 olivier.gi
        mov  #0xC110, &TACCTL0  ; # Rising/Falling edge, Interrupt enable
227
        mov  #0x0000, &TACCR0
228 111 olivier.gi
        mov  #0x000B, &DMEM_200
229 2 olivier.gi
        nop
230
        nop
231 111 olivier.gi
        mov  &TACCR0, &DMEM_204
232 2 olivier.gi
        mov  #0x0000, &TACCTL0
233 111 olivier.gi
        mov  #0x000C, &DMEM_200
234 2 olivier.gi
 
235
 
236
                                ; # --------- Comparator 1 ----------
237
        mov  #0x0204, &TACTL
238
        mov  #0x1234, &TAR
239
        mov  #0x0110, &TACCTL1  ; # No capture, Interrupt enable
240
        mov  #0x0000, &TACCR1
241 111 olivier.gi
        mov  #0x0001, &DMEM_200
242 2 olivier.gi
        nop
243
        nop
244 111 olivier.gi
        mov  &TACCR1, &DMEM_202
245 2 olivier.gi
        mov  #0x0110, &TACCTL1  ; # No capture, Interrupt enable
246
        mov  #0x0000, &TACCR1
247 111 olivier.gi
        mov  #0x0002, &DMEM_200
248 2 olivier.gi
        nop
249
        nop
250 111 olivier.gi
        mov  &TACCR1, &DMEM_204
251 2 olivier.gi
        mov  #0x0000, &TACCTL1
252 111 olivier.gi
        mov  #0x0003, &DMEM_200
253 2 olivier.gi
 
254
        mov  #0x0204, &TACTL
255
        mov  #0x1234, &TAR
256
        mov  #0x4110, &TACCTL1  ; # Rising edge, Interrupt enable
257
        mov  #0x0000, &TACCR1
258 111 olivier.gi
        mov  #0x0004, &DMEM_200
259 2 olivier.gi
        nop
260
        nop
261 111 olivier.gi
        mov  &TACCR1, &DMEM_202
262 2 olivier.gi
        mov  #0x4110, &TACCTL1  ; # Rising edge, Interrupt enable
263
        mov  #0x0000, &TACCR1
264 111 olivier.gi
        mov  #0x0005, &DMEM_200
265 2 olivier.gi
        nop
266
        nop
267 111 olivier.gi
        mov  &TACCR1, &DMEM_204
268 2 olivier.gi
        mov  #0x0000, &TACCTL1
269 111 olivier.gi
        mov  #0x0006, &DMEM_200
270 2 olivier.gi
 
271
        mov  #0x0204, &TACTL
272
        mov  #0x1234, &TAR
273
        mov  #0x8110, &TACCTL1  ; # Falling edge, Interrupt enable
274
        mov  #0x0000, &TACCR1
275 111 olivier.gi
        mov  #0x0007, &DMEM_200
276 2 olivier.gi
        nop
277
        nop
278 111 olivier.gi
        mov  &TACCR1, &DMEM_202
279 2 olivier.gi
        mov  #0x8110, &TACCTL1  ; # Falling edge, Interrupt enable
280
        mov  #0x0000, &TACCR1
281 111 olivier.gi
        mov  #0x0008, &DMEM_200
282 2 olivier.gi
        nop
283
        nop
284 111 olivier.gi
        mov  &TACCR1, &DMEM_204
285 2 olivier.gi
        mov  #0x0000, &TACCTL1
286 111 olivier.gi
        mov  #0x0009, &DMEM_200
287 2 olivier.gi
 
288
        mov  #0x0204, &TACTL
289
        mov  #0x1234, &TAR
290
        mov  #0xC110, &TACCTL1  ; # Rising/Falling edge, Interrupt enable
291
        mov  #0x0000, &TACCR1
292 111 olivier.gi
        mov  #0x000A, &DMEM_200
293 2 olivier.gi
        nop
294
        nop
295 111 olivier.gi
        mov  &TACCR1, &DMEM_202
296 2 olivier.gi
        mov  #0xC110, &TACCTL1  ; # Rising/Falling edge, Interrupt enable
297
        mov  #0x0000, &TACCR1
298 111 olivier.gi
        mov  #0x000B, &DMEM_200
299 2 olivier.gi
        nop
300
        nop
301 111 olivier.gi
        mov  &TACCR1, &DMEM_204
302 2 olivier.gi
        mov  #0x0000, &TACCTL1
303 111 olivier.gi
        mov  #0x000C, &DMEM_200
304 2 olivier.gi
 
305
 
306
                                ; # --------- Comparator 2 ----------
307
        mov  #0x0204, &TACTL
308
        mov  #0x1234, &TAR
309
        mov  #0x0110, &TACCTL2  ; # No capture, Interrupt enable
310
        mov  #0x0000, &TACCR2
311 111 olivier.gi
        mov  #0x0001, &DMEM_200
312 2 olivier.gi
        nop
313
        nop
314 111 olivier.gi
        mov  &TACCR2, &DMEM_202
315 2 olivier.gi
        mov  #0x0110, &TACCTL2  ; # No capture, Interrupt enable
316
        mov  #0x0000, &TACCR2
317 111 olivier.gi
        mov  #0x0002, &DMEM_200
318 2 olivier.gi
        nop
319
        nop
320 111 olivier.gi
        mov  &TACCR2, &DMEM_204
321 2 olivier.gi
        mov  #0x0000, &TACCTL2
322 111 olivier.gi
        mov  #0x0003, &DMEM_200
323 2 olivier.gi
 
324
        mov  #0x0204, &TACTL
325
        mov  #0x1234, &TAR
326
        mov  #0x4110, &TACCTL2  ; # Rising edge, Interrupt enable
327
        mov  #0x0000, &TACCR2
328 111 olivier.gi
        mov  #0x0004, &DMEM_200
329 2 olivier.gi
        nop
330
        nop
331 111 olivier.gi
        mov  &TACCR2, &DMEM_202
332 2 olivier.gi
        mov  #0x4110, &TACCTL2  ; # Rising edge, Interrupt enable
333
        mov  #0x0000, &TACCR2
334 111 olivier.gi
        mov  #0x0005, &DMEM_200
335 2 olivier.gi
        nop
336
        nop
337 111 olivier.gi
        mov  &TACCR2, &DMEM_204
338 2 olivier.gi
        mov  #0x0000, &TACCTL2
339 111 olivier.gi
        mov  #0x0006, &DMEM_200
340 2 olivier.gi
 
341
        mov  #0x0204, &TACTL
342
        mov  #0x1234, &TAR
343
        mov  #0x8110, &TACCTL2  ; # Falling edge, Interrupt enable
344
        mov  #0x0000, &TACCR2
345 111 olivier.gi
        mov  #0x0007, &DMEM_200
346 2 olivier.gi
        nop
347
        nop
348 111 olivier.gi
        mov  &TACCR2, &DMEM_202
349 2 olivier.gi
        mov  #0x8110, &TACCTL2  ; # Falling edge, Interrupt enable
350
        mov  #0x0000, &TACCR2
351 111 olivier.gi
        mov  #0x0008, &DMEM_200
352 2 olivier.gi
        nop
353
        nop
354 111 olivier.gi
        mov  &TACCR2, &DMEM_204
355 2 olivier.gi
        mov  #0x0000, &TACCTL2
356 111 olivier.gi
        mov  #0x0009, &DMEM_200
357 2 olivier.gi
 
358
        mov  #0x0204, &TACTL
359
        mov  #0x1234, &TAR
360
        mov  #0xC110, &TACCTL2  ; # Rising/Falling edge, Interrupt enable
361
        mov  #0x0000, &TACCR2
362 111 olivier.gi
        mov  #0x000A, &DMEM_200
363 2 olivier.gi
        nop
364
        nop
365 111 olivier.gi
        mov  &TACCR2, &DMEM_202
366 2 olivier.gi
        mov  #0xC110, &TACCTL2  ; # Rising/Falling edge, Interrupt enable
367
        mov  #0x0000, &TACCR2
368 111 olivier.gi
        mov  #0x000B, &DMEM_200
369 2 olivier.gi
        nop
370
        nop
371 111 olivier.gi
        mov  &TACCR2, &DMEM_204
372 2 olivier.gi
        mov  #0x0000, &TACCTL2
373 111 olivier.gi
        mov  #0x000C, &DMEM_200
374 2 olivier.gi
 
375
 
376
        dint
377 111 olivier.gi
        mov  #0x0000, &DMEM_200
378 2 olivier.gi
        mov  #0x2000, r15
379
 
380
       /* --------------   TIMER A TEST:  CAPTURE OVERFLOW ----------------- */
381
 
382
        mov  #0x0200, &TACTL
383
        mov  #0x0000, &TACCTL0
384
        mov  #0x0000, &TACCTL1
385
        mov  #0x0000, &TACCTL2
386
        dint
387
 
388
                                ; # --------- Comparator 0 ----------
389
        mov  #0x0204, &TACTL
390
        mov  #0xC000, &TACCTL0  ; # Both edges:    No read -> overflow
391 111 olivier.gi
        mov  #0x0001, &DMEM_200
392 2 olivier.gi
        nop
393
        nop
394 111 olivier.gi
        mov &TACCTL0, &DMEM_202
395
        mov  #0x0002, &DMEM_200
396 2 olivier.gi
        nop
397
        nop
398 111 olivier.gi
        mov &TACCTL0, &DMEM_204
399 2 olivier.gi
        mov  #0x0000, &TACCTL0
400 111 olivier.gi
        mov  #0x0003, &DMEM_200
401 2 olivier.gi
 
402
        mov  #0x0204, &TACTL
403
        mov  #0xC000, &TACCTL0  ; # Both edges:    Read -> no overflow
404 111 olivier.gi
        mov  #0x0004, &DMEM_200
405 2 olivier.gi
        nop
406
        nop
407 111 olivier.gi
        mov &TACCTL0, &DMEM_202
408 2 olivier.gi
        mov  &TACCR0, r10       ; # Read
409 111 olivier.gi
        mov  #0x0005, &DMEM_200
410 2 olivier.gi
        nop
411
        nop
412 111 olivier.gi
        mov &TACCTL0, &DMEM_204
413 2 olivier.gi
        mov  #0x0000, &TACCTL0
414 111 olivier.gi
        mov  #0x0006, &DMEM_200
415 2 olivier.gi
 
416
                                ; # --------- Comparator 1 ----------
417
        mov  #0x0204, &TACTL
418
        mov  #0xC000, &TACCTL1  ; # Both edges:    No read -> overflow
419 111 olivier.gi
        mov  #0x0001, &DMEM_200
420 2 olivier.gi
        nop
421
        nop
422 111 olivier.gi
        mov &TACCTL1, &DMEM_202
423
        mov  #0x0002, &DMEM_200
424 2 olivier.gi
        nop
425
        nop
426 111 olivier.gi
        mov &TACCTL1, &DMEM_204
427 2 olivier.gi
        mov  #0x0000, &TACCTL1
428 111 olivier.gi
        mov  #0x0003, &DMEM_200
429 2 olivier.gi
 
430
        mov  #0x0204, &TACTL
431
        mov  #0xC000, &TACCTL1  ; # Both edges:    Read -> no overflow
432 111 olivier.gi
        mov  #0x0004, &DMEM_200
433 2 olivier.gi
        nop
434
        nop
435 111 olivier.gi
        mov &TACCTL1, &DMEM_202
436 2 olivier.gi
        mov  &TACCR1, r10       ; # Read
437 111 olivier.gi
        mov  #0x0005, &DMEM_200
438 2 olivier.gi
        nop
439
        nop
440 111 olivier.gi
        mov &TACCTL1, &DMEM_204
441 2 olivier.gi
        mov  #0x0000, &TACCTL1
442 111 olivier.gi
        mov  #0x0006, &DMEM_200
443 2 olivier.gi
 
444
                                ; # --------- Comparator 2 ----------
445
        mov  #0x0204, &TACTL
446
        mov  #0xC000, &TACCTL2  ; # Both edges:    No read -> overflow
447 111 olivier.gi
        mov  #0x0001, &DMEM_200
448 2 olivier.gi
        nop
449
        nop
450 111 olivier.gi
        mov &TACCTL2, &DMEM_202
451
        mov  #0x0002, &DMEM_200
452 2 olivier.gi
        nop
453
        nop
454 111 olivier.gi
        mov &TACCTL2, &DMEM_204
455 2 olivier.gi
        mov  #0x0000, &TACCTL2
456 111 olivier.gi
        mov  #0x0003, &DMEM_200
457 2 olivier.gi
 
458
        mov  #0x0204, &TACTL
459
        mov  #0xC000, &TACCTL2  ; # Both edges:    Read -> no overflow
460 111 olivier.gi
        mov  #0x0004, &DMEM_200
461 2 olivier.gi
        nop
462
        nop
463 111 olivier.gi
        mov &TACCTL2, &DMEM_202
464 2 olivier.gi
        mov  &TACCR2, r10       ; # Read
465 111 olivier.gi
        mov  #0x0005, &DMEM_200
466 2 olivier.gi
        nop
467
        nop
468 111 olivier.gi
        mov &TACCTL2, &DMEM_204
469 2 olivier.gi
        mov  #0x0000, &TACCTL2
470 111 olivier.gi
        mov  #0x0006, &DMEM_200
471 2 olivier.gi
 
472
        dint
473 111 olivier.gi
        mov  #0x0000, &DMEM_200
474 2 olivier.gi
        mov  #0x3000, r15
475
 
476
 
477
        /* ----------------------         END OF TEST        --------------- */
478
end_of_test:
479
        nop
480
        br #0xffff
481
 
482
 
483
        /* ----------------------      INTERRUPT ROUTINES    --------------- */
484
 
485
TIMERA_CCR0_VECTOR:
486 111 olivier.gi
        inc  &DMEM_200
487 2 olivier.gi
        reti
488
 
489
 
490
TIMERA_TAIV_VECTOR:
491 111 olivier.gi
        mov     &TAR, &DMEM_204
492
        mov    &TAIV, &DMEM_206
493 2 olivier.gi
        reti
494
 
495
 
496
        /* ----------------------         INTERRUPT VECTORS  --------------- */
497
 
498
.section .vectors, "a"
499
.word end_of_test        ; Interrupt  0 (lowest priority)    
500
.word end_of_test        ; Interrupt  1                      
501
.word end_of_test        ; Interrupt  2                      
502
.word end_of_test        ; Interrupt  3                      
503
.word end_of_test        ; Interrupt  4                      
504
.word end_of_test        ; Interrupt  5                      
505
.word end_of_test        ; Interrupt  6                      
506
.word end_of_test        ; Interrupt  7                      
507
.word TIMERA_TAIV_VECTOR ; Interrupt  8                      
508
.word TIMERA_CCR0_VECTOR ; Interrupt  9                      
509
.word end_of_test        ; Interrupt 10                      Watchdog timer
510
.word end_of_test        ; Interrupt 11                      
511
.word end_of_test        ; Interrupt 12                      
512
.word end_of_test        ; Interrupt 13                      
513
.word end_of_test        ; Interrupt 14                      NMI
514
.word main               ; Interrupt 15 (highest priority)   RESET

powered by: WebSVN 2.1.0

© copyright 1999-2024 OpenCores.org, equivalent to Oliscience, all rights reserved. OpenCores®, registered trademark.