1 |
27 |
unneback |
#ifndef CYGONCE_VAR_INTR_H
|
2 |
|
|
#define CYGONCE_VAR_INTR_H
|
3 |
|
|
//=============================================================================
|
4 |
|
|
//
|
5 |
|
|
// var_intr.h
|
6 |
|
|
//
|
7 |
|
|
// Variant HAL interrupt and clock support
|
8 |
|
|
//
|
9 |
|
|
//=============================================================================
|
10 |
|
|
//####ECOSGPLCOPYRIGHTBEGIN####
|
11 |
|
|
// -------------------------------------------
|
12 |
|
|
// This file is part of eCos, the Embedded Configurable Operating System.
|
13 |
|
|
// Copyright (C) 1998, 1999, 2000, 2001, 2002 Red Hat, Inc.
|
14 |
|
|
//
|
15 |
|
|
// eCos is free software; you can redistribute it and/or modify it under
|
16 |
|
|
// the terms of the GNU General Public License as published by the Free
|
17 |
|
|
// Software Foundation; either version 2 or (at your option) any later version.
|
18 |
|
|
//
|
19 |
|
|
// eCos is distributed in the hope that it will be useful, but WITHOUT ANY
|
20 |
|
|
// WARRANTY; without even the implied warranty of MERCHANTABILITY or
|
21 |
|
|
// FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License
|
22 |
|
|
// for more details.
|
23 |
|
|
//
|
24 |
|
|
// You should have received a copy of the GNU General Public License along
|
25 |
|
|
// with eCos; if not, write to the Free Software Foundation, Inc.,
|
26 |
|
|
// 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA.
|
27 |
|
|
//
|
28 |
|
|
// As a special exception, if other files instantiate templates or use macros
|
29 |
|
|
// or inline functions from this file, or you compile this file and link it
|
30 |
|
|
// with other works to produce a work based on this file, this file does not
|
31 |
|
|
// by itself cause the resulting work to be covered by the GNU General Public
|
32 |
|
|
// License. However the source code for this file must still be made available
|
33 |
|
|
// in accordance with section (3) of the GNU General Public License.
|
34 |
|
|
//
|
35 |
|
|
// This exception does not invalidate any other reasons why a work based on
|
36 |
|
|
// this file might be covered by the GNU General Public License.
|
37 |
|
|
//
|
38 |
|
|
// Alternative licenses for eCos may be arranged by contacting Red Hat, Inc.
|
39 |
|
|
// at http://sources.redhat.com/ecos/ecos-license/
|
40 |
|
|
// -------------------------------------------
|
41 |
|
|
//####ECOSGPLCOPYRIGHTEND####
|
42 |
|
|
//=============================================================================
|
43 |
|
|
//#####DESCRIPTIONBEGIN####
|
44 |
|
|
//
|
45 |
|
|
// Author(s): Bob Koninckx
|
46 |
|
|
// Contributors:Bob Koninckx
|
47 |
|
|
// Date: 2001-12-15
|
48 |
|
|
// Purpose: Variant interrupt support
|
49 |
|
|
// Description: The macros defined here provide the HAL APIs for handling
|
50 |
|
|
// interrupts and the clock on the MPC5xx variant CPUs.
|
51 |
|
|
// Usage: Is included via the architecture interrupt header:
|
52 |
|
|
// #include <cyg/hal/hal_intr.h>
|
53 |
|
|
// ...
|
54 |
|
|
//
|
55 |
|
|
//####DESCRIPTIONEND####
|
56 |
|
|
//
|
57 |
|
|
//=============================================================================
|
58 |
|
|
|
59 |
|
|
#include <pkgconf/hal.h>
|
60 |
|
|
|
61 |
|
|
#include <cyg/hal/plf_intr.h>
|
62 |
|
|
|
63 |
|
|
#include <cyg/infra/cyg_type.h> // types
|
64 |
|
|
|
65 |
|
|
#include <cyg/hal/ppc_regs.h> // register definitions
|
66 |
|
|
|
67 |
|
|
#include <cyg/hal/hal_io.h> // io macros
|
68 |
|
|
#include <cyg/infra/cyg_ass.h> // CYG_FAIL
|
69 |
|
|
|
70 |
|
|
//-----------------------------------------------------------------------------
|
71 |
|
|
// Special IMB3 arbitration code
|
72 |
|
|
typedef struct t_hal_mpc5xx_arbitration_data {
|
73 |
|
|
cyg_uint32 priority;
|
74 |
|
|
CYG_ADDRWORD data;
|
75 |
|
|
cyg_uint32 (* arbiter)(CYG_ADDRWORD, CYG_ADDRWORD);
|
76 |
|
|
void * reserved;
|
77 |
|
|
} hal_mpc5xx_arbitration_data;
|
78 |
|
|
|
79 |
|
|
externC void
|
80 |
|
|
hal_mpc5xx_install_arbitration_isr(hal_mpc5xx_arbitration_data *adata);
|
81 |
|
|
|
82 |
|
|
externC void
|
83 |
|
|
hal_mpc5xx_remove_arbitration_isr(hal_mpc5xx_arbitration_data *adata);
|
84 |
|
|
|
85 |
|
|
//-----------------------------------------------------------------------------
|
86 |
|
|
// Exception vectors.
|
87 |
|
|
|
88 |
|
|
// Additional exceptions on the MPC5xx CPUs
|
89 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_F 15
|
90 |
|
|
#define CYGNUM_HAL_VECTOR_SW_EMUL 16
|
91 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_11 17
|
92 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_12 18
|
93 |
|
|
#define CYGNUM_HAL_VECTOR_ITLB_ERROR 19
|
94 |
|
|
#define CYGNUM_HAL_VECTOR_DTLB_ERROR 20
|
95 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_15 21
|
96 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_16 22
|
97 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_17 23
|
98 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_18 24
|
99 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_19 25
|
100 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_1A 26
|
101 |
|
|
#define CYGNUM_HAL_VECTOR_RESERVED_1B 27
|
102 |
|
|
#define CYGNUM_HAL_VECTOR_DATA_BP 28
|
103 |
|
|
#define CYGNUM_HAL_VECTOR_INSTRUCTION_BP 29
|
104 |
|
|
#define CYGNUM_HAL_VECTOR_PERIPHERAL_BP 30
|
105 |
|
|
#define CYGNUM_HAL_VECTOR_NMI 31
|
106 |
|
|
|
107 |
|
|
#define CYGNUM_HAL_VSR_MAX CYGNUM_HAL_VECTOR_NMI
|
108 |
|
|
|
109 |
|
|
// These are the values used when passed out to an
|
110 |
|
|
// external exception handler using cyg_hal_deliver_exception()
|
111 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_0 CYGNUM_HAL_VECTOR_RESERVED_0
|
112 |
|
|
#define CYGNUM_HAL_EXCEPTION_MACHINE_CHECK CYGNUM_HAL_VECTOR_MACHINE_CHECK
|
113 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_3 CYGNUM_HAL_VECTOR_RESERVED_3
|
114 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_4 CYGNUM_HAL_VECTOR_RESERVED_4
|
115 |
|
|
#define CYGNUM_HAL_EXCEPTION_DATA_UNALIGNED_ACCESS CYGNUM_HAL_VECTOR_ALIGNMENT
|
116 |
|
|
#define CYGNUM_HAL_EXCEPTION_FPU_NOT_AVAIL CYGNUM_HAL_VECTOR_FP_UNAVAILABLE
|
117 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_A CYGNUM_HAL_VECTOR_RESERVED_A
|
118 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_B CYGNUM_HAL_VECTOR_RESERVED_B
|
119 |
|
|
#define CYGNUM_HAL_EXCEPTION_SYSTEM_CALL CYGNUM_HAL_VECTOR_SYSTEM_CALL
|
120 |
|
|
#define CYGNUM_HAL_EXCEPTION_TRACE CYGNUM_HAL_VECTOR_TRACE
|
121 |
|
|
#define CYGNUM_HAL_EXCEPTION_FP_ASSIST CYGNUM_HAL_VECTOR_FP_ASSIST
|
122 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_F CYGNUM_HAL_VECTOR_RESERVED_F
|
123 |
|
|
#define CYGNUM_HAL_EXCEPTION_SW_EMUL CYGNUM_HAL_VECTOR_SW_EMUL
|
124 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_11 CYGNUM_HAL_VECTOR_RESERVED_11
|
125 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_12 CYGNUM_HAL_VECTOR_RESERVED_12
|
126 |
|
|
#define CYGNUM_HAL_EXCEPTION_CODE_TLBERROR_ACCESS CYGNUM_HAL_VECTOR_ITLB_ERROR
|
127 |
|
|
#define CYGNUM_HAL_EXCEPTION_DATA_TLBERROR_ACCESS CYGNUM_HAL_VECTOR_DTLB_ERROR
|
128 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_15 CYGNUM_HAL_VECTOR_RESERVED_15
|
129 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_16 CYGNUM_HAL_VECTOR_RESERVED_16
|
130 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_17 CYGNUM_HAL_VECTOR_RESERVED_17
|
131 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_18 CYGNUM_HAL_VECTOR_RESERVED_18
|
132 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_19 CYGNUM_HAL_VECTOR_RESERVED_19
|
133 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_1A CYGNUM_HAL_VECTOR_RESERVED_1A
|
134 |
|
|
#define CYGNUM_HAL_EXCEPTION_RESERVED_1B CYGNUM_HAL_VECTOR_RESERVED_1B
|
135 |
|
|
#define CYGNUM_HAL_EXCEPTION_DATA_BP CYGNUM_HAL_VECTOR_DATA_BP
|
136 |
|
|
#define CYGNUM_HAL_EXCEPTION_INSTRUCTION_BP CYGNUM_HAL_VECTOR_INSTRUCTION_BP
|
137 |
|
|
#define CYGNUM_HAL_EXCEPTION_PERIPHERAL_BP CYGNUM_HAL_VECTOR_PERIPHERAL_BP
|
138 |
|
|
#define CYGNUM_HAL_EXCEPTION_NMI CYGNUM_HAL_VECTOR_NMI
|
139 |
|
|
|
140 |
|
|
// decoded exception vectors (decoded program exception)
|
141 |
|
|
#define CYGNUM_HAL_EXCEPTION_TRAP (-1)
|
142 |
|
|
#define CYGNUM_HAL_EXCEPTION_PRIVILEGED_INSTRUCTION (-2)
|
143 |
|
|
#define CYGNUM_HAL_EXCEPTION_ILLEGAL_INSTRUCTION (-3)
|
144 |
|
|
#define CYGNUM_HAL_EXCEPTION_FPU (-4)
|
145 |
|
|
|
146 |
|
|
#define CYGNUM_HAL_EXCEPTION_MIN CYGNUM_HAL_EXCEPTION_RESERVED_0
|
147 |
|
|
#define CYGNUM_HAL_EXCEPTION_MAX CYGNUM_HAL_EXCEPTION_NMI
|
148 |
|
|
|
149 |
|
|
#define CYGHWR_HAL_EXCEPTION_VECTORS_DEFINED
|
150 |
|
|
|
151 |
|
|
//-----------------------------------------------------------------------------
|
152 |
|
|
// Interrupts
|
153 |
|
|
|
154 |
|
|
// The first level of external interrupts
|
155 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ0 1
|
156 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL0 2
|
157 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ1 3
|
158 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL1 4
|
159 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ2 5
|
160 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL2 6
|
161 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ3 7
|
162 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL3 8
|
163 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ4 9
|
164 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL4 10
|
165 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ5 11
|
166 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL5 12
|
167 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ6 13
|
168 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL6 14
|
169 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_IRQ7 15
|
170 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_LVL7 16
|
171 |
|
|
|
172 |
|
|
// Further decoded interrupts
|
173 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_TB_A 17 // Time base reference A
|
174 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_TB_B 18 // Time base reference B
|
175 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_PIT 19 // Periodic interrupt timer
|
176 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_RTC_SEC 20 // Real time clock once per second
|
177 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_RTC_ALR 21 // Real time clock alarm
|
178 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_COL 22 // Change of lock of the PLL
|
179 |
|
|
|
180 |
|
|
// Even further decoded interrupts
|
181 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1 23 // QUADCA queue 1 completion
|
182 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI1 24 // QUADCA queue 1 pause
|
183 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI2 25 // QUADCA queue 2 completion
|
184 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI2 26 // QUADCA queue 2 pause
|
185 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI1 27 // QUADCB queue 1 completion
|
186 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI1 28 // QUADCB queue 1 pause
|
187 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI2 29 // QUADCB queue 2 completion
|
188 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI2 30 // QUADCB queue 2 pause
|
189 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TX 31 // SCI 0 transmit
|
190 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TXC 32 // SCI 0 transmit complete
|
191 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_RX 33 // SCI 0 receiver full
|
192 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_IDLE 34 // SCI 0 idle line detected
|
193 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TX 35 // SCI 1 transmit
|
194 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXC 36 // SCI 1 transmit complete
|
195 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RX 37 // SCI 1 receiver full
|
196 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_IDLE 38 // SCI 1 idle line detected
|
197 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQTHF 39 // SCI 1 RX Queue top half full
|
198 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQBHF 40 // SCI 1 RX Queue bottom half full
|
199 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQTHE 41 // SCI 1 TX Queue top half full
|
200 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQBHE 42 // SCI 1 TX Queue bottom half full
|
201 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SPI_FI 43 // SPI finished
|
202 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SPI_MODF 44 // SPI Mode fault
|
203 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SPI_HALTA 45 // SPI Halt Acknowledge
|
204 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_BOFF 46 // TOUCANA buss off
|
205 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_ERR 47 // TOUCANA error
|
206 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_WU 48 // TOUCANA wake up
|
207 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0 49 // TOUCANA buffer 0
|
208 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B1 50 // TOUCANA buffer 1
|
209 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B2 51 // TOUCANA buffer 2
|
210 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B3 52 // TOUCANA buffer 3
|
211 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B4 53 // TOUCANA buffer 4
|
212 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B5 54 // TOUCANA buffer 5
|
213 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B6 55 // TOUCANA buffer 6
|
214 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B7 56 // TOUCANA buffer 7
|
215 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B8 57 // TOUCANA buffer 8
|
216 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B9 58 // TOUCANA buffer 9
|
217 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B10 59 // TOUCANA buffer 10
|
218 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B11 60 // TOUCANA buffer 11
|
219 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B12 61 // TOUCANA buffer 12
|
220 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B13 62 // TOUCANA buffer 13
|
221 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B14 63 // TOUCANA buffer 14
|
222 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B15 64 // TOUCANA buffer 15
|
223 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_BOFF 65 // TOUCANB buss off
|
224 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_ERR 66 // TOUCANB error
|
225 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_WU 67 // TOUCANB wake up
|
226 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0 68 // TOUCANB buffer 0
|
227 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B1 69 // TOUCANB buffer 1
|
228 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B2 70 // TOUCANB buffer 2
|
229 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B3 71 // TOUCANB buffer 3
|
230 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B4 72 // TOUCANB buffer 4
|
231 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B5 73 // TOUCANB buffer 5
|
232 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B6 74 // TOUCANB buffer 6
|
233 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B7 75 // TOUCANB buffer 7
|
234 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B8 76 // TOUCANB buffer 8
|
235 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B9 77 // TOUCANB buffer 9
|
236 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B10 78 // TOUCANB buffer 10
|
237 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B11 79 // TOUCANB buffer 11
|
238 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B12 80 // TOUCANB buffer 12
|
239 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B13 81 // TOUCANB buffer 13
|
240 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B14 82 // TOUCANB buffer 14
|
241 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B15 83 // TOUCANB buffer 15
|
242 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0 84 // TPU A channel 0
|
243 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH1 85 // TPU A channel 1
|
244 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH2 86 // TPU A channel 2
|
245 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH3 87 // TPU A channel 3
|
246 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH4 88 // TPU A channel 4
|
247 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH5 89 // TPU A channel 5
|
248 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH6 90 // TPU A channel 6
|
249 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH7 91 // TPU A channel 7
|
250 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH8 92 // TPU A channel 8
|
251 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH9 93 // TPU A channel 9
|
252 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH10 94 // TPU A channel 10
|
253 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH11 95 // TPU A channel 11
|
254 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH12 96 // TPU A channel 12
|
255 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH13 97 // TPU A channel 13
|
256 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH14 98 // TPU A channel 14
|
257 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH15 99 // TPU A channel 15
|
258 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0 100 // TPU B channel 0
|
259 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH1 101 // TPU B channel 1
|
260 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH2 102 // TPU B channel 2
|
261 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH3 103 // TPU B channel 3
|
262 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH4 104 // TPU B channel 4
|
263 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH5 105 // TPU B channel 5
|
264 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH6 106 // TPU B channel 6
|
265 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH7 107 // TPU B channel 7
|
266 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH8 108 // TPU B channel 8
|
267 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH9 109 // TPU B channel 9
|
268 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH10 110 // TPU B channel 10
|
269 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH11 111 // TPU B channel 11
|
270 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH12 112 // TPU B channel 12
|
271 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH13 113 // TPU B channel 13
|
272 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH14 114 // TPU B channel 14
|
273 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH15 115 // TPU B channel 15
|
274 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM0 116 // MIOS PWM0
|
275 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM1 117 // MIOS PWM1
|
276 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM2 118 // MIOS PWM2
|
277 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM3 119 // MIOS PWM3
|
278 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM6 120 // MIOS MCSM6
|
279 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM11 121 // MIOS MDASM11
|
280 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM12 122 // MIOS MDASM12
|
281 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM13 123 // MIOS MDASM13
|
282 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM14 124 // MIOS MDASM14
|
283 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM15 125 // MIOS MDASM15
|
284 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM16 126 // MIOS PWM16
|
285 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM17 127 // MIOS PWM17
|
286 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM18 128 // MIOS PWM18
|
287 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM19 129 // MIOS PWM19
|
288 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM22 130 // MIOS MCSM22
|
289 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM27 131 // MIOS MDASM27
|
290 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM28 132 // MIOS MDASM28
|
291 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM29 133 // MIOS MDASM29
|
292 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM30 134 // MIOS MDASM30
|
293 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31 135 // MIOS MDASM31
|
294 |
|
|
|
295 |
|
|
#define CYGNUM_HAL_ISR_MIN CYGNUM_HAL_INTERRUPT_DECREMENTER
|
296 |
|
|
#define CYGNUM_HAL_ISR_MAX CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31
|
297 |
|
|
|
298 |
|
|
//--------------------------------------------------------------------------
|
299 |
|
|
// Interrupt controller access
|
300 |
|
|
static __inline__ void
|
301 |
|
|
cyg_hal_interrupt_mask ( cyg_uint32 vector )
|
302 |
|
|
{
|
303 |
|
|
switch (vector) {
|
304 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ0 ... CYGNUM_HAL_INTERRUPT_SIU_LVL7:
|
305 |
|
|
{
|
306 |
|
|
// SIU interrupt vectors
|
307 |
|
|
cyg_uint32 simask;
|
308 |
|
|
|
309 |
|
|
HAL_READ_UINT32 (CYGARC_REG_IMM_SIMASK, simask);
|
310 |
|
|
simask &= ~(((cyg_uint32) CYGARC_REG_IMM_SIMASK_IRM0)
|
311 |
|
|
>> (vector - CYGNUM_HAL_INTERRUPT_SIU_IRQ0));
|
312 |
|
|
HAL_WRITE_UINT32 (CYGARC_REG_IMM_SIMASK, simask);
|
313 |
|
|
break;
|
314 |
|
|
}
|
315 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_A :
|
316 |
|
|
{
|
317 |
|
|
// TimeBase A interrupt
|
318 |
|
|
cyg_uint16 tbscr;
|
319 |
|
|
|
320 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
321 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFAE);
|
322 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFA); // Prevent from clearing interrupt flags
|
323 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFB); // accidently. Just do what is asked.
|
324 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
325 |
|
|
break;
|
326 |
|
|
}
|
327 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_B :
|
328 |
|
|
{
|
329 |
|
|
// TimeBase B interrupt
|
330 |
|
|
cyg_uint16 tbscr;
|
331 |
|
|
|
332 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
333 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFBE);
|
334 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFA); // Prevent from clearing interrupt flags
|
335 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFB); // accidently. Just do what is asked.
|
336 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
337 |
|
|
break;
|
338 |
|
|
}
|
339 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_PIT:
|
340 |
|
|
{
|
341 |
|
|
// Periodic Interrupt
|
342 |
|
|
cyg_uint16 piscr;
|
343 |
|
|
|
344 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
345 |
|
|
piscr &= ~(CYGARC_REG_IMM_PISCR_PIE);
|
346 |
|
|
piscr &= ~(CYGARC_REG_IMM_PISCR_PS); // Prevent from clearing interrupt flag.
|
347 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
348 |
|
|
break;
|
349 |
|
|
}
|
350 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_SEC:
|
351 |
|
|
{
|
352 |
|
|
// Real Time Clock Second
|
353 |
|
|
cyg_uint16 rtcsc;
|
354 |
|
|
|
355 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
356 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SIE);
|
357 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SEC); // Prevent from clearing interrupt flags
|
358 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALR); // Accidently. Just do what is asked.
|
359 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
360 |
|
|
break;
|
361 |
|
|
}
|
362 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_ALR:
|
363 |
|
|
{
|
364 |
|
|
// Real Time Clock Alarm
|
365 |
|
|
cyg_uint16 rtcsc;
|
366 |
|
|
|
367 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
368 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALE);
|
369 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SEC); // Prevent from clearing interrupt flags
|
370 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALR); // accidently. Just do what is asked.
|
371 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
372 |
|
|
break;
|
373 |
|
|
}
|
374 |
|
|
|
375 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_COL:
|
376 |
|
|
{
|
377 |
|
|
// PLL change of lock
|
378 |
|
|
cyg_uint16 colir;
|
379 |
|
|
|
380 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_COLIR, colir);
|
381 |
|
|
colir &= ~(CYGARC_REG_IMM_COLIR_COLIE);
|
382 |
|
|
colir &= ~(CYGARC_REG_IMM_COLIR_COLIS); // Prevent from clearing interrupt flag accidently.
|
383 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_COLIR, colir);
|
384 |
|
|
break;
|
385 |
|
|
}
|
386 |
|
|
|
387 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1:
|
388 |
|
|
{
|
389 |
|
|
cyg_uint16 quacr1;
|
390 |
|
|
|
391 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
392 |
|
|
quacr1 &= ~(CYGARC_REG_IMM_QUACR1_CIE1);
|
393 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
394 |
|
|
break;
|
395 |
|
|
}
|
396 |
|
|
|
397 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI1:
|
398 |
|
|
{
|
399 |
|
|
cyg_uint16 quacr1;
|
400 |
|
|
|
401 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
402 |
|
|
quacr1 &= ~(CYGARC_REG_IMM_QUACR1_PIE1);
|
403 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
404 |
|
|
break;
|
405 |
|
|
}
|
406 |
|
|
|
407 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI2:
|
408 |
|
|
{
|
409 |
|
|
cyg_uint16 quacr2;
|
410 |
|
|
|
411 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
412 |
|
|
quacr2 &= ~(CYGARC_REG_IMM_QUACR2_CIE2);
|
413 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
414 |
|
|
break;
|
415 |
|
|
}
|
416 |
|
|
|
417 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI2:
|
418 |
|
|
{
|
419 |
|
|
cyg_uint16 quacr2;
|
420 |
|
|
|
421 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
422 |
|
|
quacr2 &= ~(CYGARC_REG_IMM_QUACR2_PIE2);
|
423 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
424 |
|
|
break;
|
425 |
|
|
}
|
426 |
|
|
|
427 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI1:
|
428 |
|
|
{
|
429 |
|
|
cyg_uint16 quacr1;
|
430 |
|
|
|
431 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
432 |
|
|
quacr1 &= ~(CYGARC_REG_IMM_QUACR1_CIE1);
|
433 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
434 |
|
|
break;
|
435 |
|
|
}
|
436 |
|
|
|
437 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI1:
|
438 |
|
|
{
|
439 |
|
|
cyg_uint16 quacr1;
|
440 |
|
|
|
441 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
442 |
|
|
quacr1 &= ~(CYGARC_REG_IMM_QUACR1_PIE1);
|
443 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
444 |
|
|
break;
|
445 |
|
|
}
|
446 |
|
|
|
447 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI2:
|
448 |
|
|
{
|
449 |
|
|
cyg_uint16 quacr2;
|
450 |
|
|
|
451 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
452 |
|
|
quacr2 &= ~(CYGARC_REG_IMM_QUACR2_CIE2);
|
453 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
454 |
|
|
break;
|
455 |
|
|
}
|
456 |
|
|
|
457 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI2:
|
458 |
|
|
{
|
459 |
|
|
cyg_uint16 quacr2;
|
460 |
|
|
|
461 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
462 |
|
|
quacr2 &= ~(CYGARC_REG_IMM_QUACR2_PIE2);
|
463 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
464 |
|
|
break;
|
465 |
|
|
}
|
466 |
|
|
|
467 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TX:
|
468 |
|
|
{
|
469 |
|
|
cyg_uint16 sccxr1;
|
470 |
|
|
|
471 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
472 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_TIE);
|
473 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
474 |
|
|
break;
|
475 |
|
|
}
|
476 |
|
|
|
477 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TXC:
|
478 |
|
|
{
|
479 |
|
|
cyg_uint16 sccxr1;
|
480 |
|
|
|
481 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
482 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_TCIE);
|
483 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
484 |
|
|
break;
|
485 |
|
|
}
|
486 |
|
|
|
487 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_RX:
|
488 |
|
|
{
|
489 |
|
|
cyg_uint16 sccxr1;
|
490 |
|
|
|
491 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
492 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_RIE);
|
493 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
494 |
|
|
break;
|
495 |
|
|
}
|
496 |
|
|
|
497 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_IDLE:
|
498 |
|
|
{
|
499 |
|
|
cyg_uint16 sccxr1;
|
500 |
|
|
|
501 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
502 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_ILIE);
|
503 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
504 |
|
|
break;
|
505 |
|
|
}
|
506 |
|
|
|
507 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TX:
|
508 |
|
|
{
|
509 |
|
|
cyg_uint16 sccxr1;
|
510 |
|
|
|
511 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
512 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_TIE);
|
513 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
514 |
|
|
break;
|
515 |
|
|
}
|
516 |
|
|
|
517 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXC:
|
518 |
|
|
{
|
519 |
|
|
cyg_uint16 sccxr1;
|
520 |
|
|
|
521 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
522 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_TCIE);
|
523 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
524 |
|
|
break;
|
525 |
|
|
}
|
526 |
|
|
|
527 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RX:
|
528 |
|
|
{
|
529 |
|
|
cyg_uint16 sccxr1;
|
530 |
|
|
|
531 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
532 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_RIE);
|
533 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
534 |
|
|
break;
|
535 |
|
|
}
|
536 |
|
|
|
537 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_IDLE:
|
538 |
|
|
{
|
539 |
|
|
cyg_uint16 sccxr1;
|
540 |
|
|
|
541 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
542 |
|
|
sccxr1 &= ~(CYGARC_REG_IMM_SCCxR1_ILIE);
|
543 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
544 |
|
|
break;
|
545 |
|
|
}
|
546 |
|
|
|
547 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQTHF:
|
548 |
|
|
{
|
549 |
|
|
cyg_uint16 qsci1cr;
|
550 |
|
|
|
551 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
552 |
|
|
qsci1cr &= ~(CYGARC_REG_IMM_QSCI1CR_QTHFI);
|
553 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
554 |
|
|
break;
|
555 |
|
|
}
|
556 |
|
|
|
557 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQBHF:
|
558 |
|
|
{
|
559 |
|
|
cyg_uint16 qsci1cr;
|
560 |
|
|
|
561 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
562 |
|
|
qsci1cr &= ~(CYGARC_REG_IMM_QSCI1CR_QBHFI);
|
563 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
564 |
|
|
break;
|
565 |
|
|
}
|
566 |
|
|
|
567 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQTHE:
|
568 |
|
|
{
|
569 |
|
|
cyg_uint16 qsci1cr;
|
570 |
|
|
|
571 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
572 |
|
|
qsci1cr &= ~(CYGARC_REG_IMM_QSCI1CR_QTHEI);
|
573 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
574 |
|
|
break;
|
575 |
|
|
}
|
576 |
|
|
|
577 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQBHE:
|
578 |
|
|
{
|
579 |
|
|
cyg_uint16 qsci1cr;
|
580 |
|
|
|
581 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
582 |
|
|
qsci1cr &= ~(CYGARC_REG_IMM_QSCI1CR_QBHEI);
|
583 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
584 |
|
|
break;
|
585 |
|
|
}
|
586 |
|
|
|
587 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_FI:
|
588 |
|
|
{
|
589 |
|
|
cyg_uint16 spcr2;
|
590 |
|
|
|
591 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPCR2, spcr2);
|
592 |
|
|
spcr2 &= ~(CYGARC_REG_IMM_SPCR2_SPIFIE);
|
593 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPCR2, spcr2);
|
594 |
|
|
break;
|
595 |
|
|
}
|
596 |
|
|
|
597 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_MODF:
|
598 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_HALTA:
|
599 |
|
|
{
|
600 |
|
|
cyg_uint16 spcr3;
|
601 |
|
|
|
602 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPCR3, spcr3);
|
603 |
|
|
spcr3 &= ~(CYGARC_REG_IMM_SPCR3_HMIE);
|
604 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPCR3, spcr3);
|
605 |
|
|
break;
|
606 |
|
|
}
|
607 |
|
|
|
608 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_BOFF:
|
609 |
|
|
{
|
610 |
|
|
cyg_uint16 canctrl0;
|
611 |
|
|
|
612 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
613 |
|
|
canctrl0 &= ~(CYGARC_REG_IMM_CANCTRL0_BOFFMSK);
|
614 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
615 |
|
|
break;
|
616 |
|
|
}
|
617 |
|
|
|
618 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_ERR:
|
619 |
|
|
{
|
620 |
|
|
cyg_uint16 canctrl0;
|
621 |
|
|
|
622 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
623 |
|
|
canctrl0 &= ~(CYGARC_REG_IMM_CANCTRL0_ERRMSK);
|
624 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
625 |
|
|
break;
|
626 |
|
|
}
|
627 |
|
|
|
628 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_WU:
|
629 |
|
|
{
|
630 |
|
|
cyg_uint16 tcnmcr;
|
631 |
|
|
|
632 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_TCNMCR_A, tcnmcr);
|
633 |
|
|
tcnmcr &= ~(CYGARC_REG_IMM_TCNMCR_WAKEMSK);
|
634 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_TCNMCR_A, tcnmcr);
|
635 |
|
|
break;
|
636 |
|
|
}
|
637 |
|
|
|
638 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0:
|
639 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B1:
|
640 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B2:
|
641 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B3:
|
642 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B4:
|
643 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B5:
|
644 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B6:
|
645 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B7:
|
646 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B8:
|
647 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B9:
|
648 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B10:
|
649 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B11:
|
650 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B12:
|
651 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B13:
|
652 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B14:
|
653 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B15:
|
654 |
|
|
{
|
655 |
|
|
cyg_uint16 imask;
|
656 |
|
|
|
657 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_IMASK_A, imask);
|
658 |
|
|
imask &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0));
|
659 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_IMASK_A, imask);
|
660 |
|
|
break;
|
661 |
|
|
}
|
662 |
|
|
|
663 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_BOFF:
|
664 |
|
|
{
|
665 |
|
|
cyg_uint16 canctrl0;
|
666 |
|
|
|
667 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
668 |
|
|
canctrl0 &= ~(CYGARC_REG_IMM_CANCTRL0_BOFFMSK);
|
669 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
670 |
|
|
break;
|
671 |
|
|
}
|
672 |
|
|
|
673 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_ERR:
|
674 |
|
|
{
|
675 |
|
|
cyg_uint16 canctrl0;
|
676 |
|
|
|
677 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
678 |
|
|
canctrl0 &= ~(CYGARC_REG_IMM_CANCTRL0_ERRMSK);
|
679 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
680 |
|
|
break;
|
681 |
|
|
}
|
682 |
|
|
|
683 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_WU:
|
684 |
|
|
{
|
685 |
|
|
cyg_uint16 tcnmcr;
|
686 |
|
|
|
687 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_TCNMCR_B, tcnmcr);
|
688 |
|
|
tcnmcr &= ~(CYGARC_REG_IMM_TCNMCR_WAKEMSK);
|
689 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_TCNMCR_B, tcnmcr);
|
690 |
|
|
break;
|
691 |
|
|
}
|
692 |
|
|
|
693 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0:
|
694 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B1:
|
695 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B2:
|
696 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B3:
|
697 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B4:
|
698 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B5:
|
699 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B6:
|
700 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B7:
|
701 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B8:
|
702 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B9:
|
703 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B10:
|
704 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B11:
|
705 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B12:
|
706 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B13:
|
707 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B14:
|
708 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B15:
|
709 |
|
|
{
|
710 |
|
|
cyg_uint16 imask;
|
711 |
|
|
|
712 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_IMASK_B, imask);
|
713 |
|
|
imask &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0));
|
714 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_IMASK_B, imask);
|
715 |
|
|
break;
|
716 |
|
|
}
|
717 |
|
|
|
718 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0:
|
719 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH1:
|
720 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH2:
|
721 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH3:
|
722 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH4:
|
723 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH5:
|
724 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH6:
|
725 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH7:
|
726 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH8:
|
727 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH9:
|
728 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH10:
|
729 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH11:
|
730 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH12:
|
731 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH13:
|
732 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH14:
|
733 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH15:
|
734 |
|
|
{
|
735 |
|
|
cyg_uint16 cier;
|
736 |
|
|
|
737 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CIER_A, cier);
|
738 |
|
|
cier &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0));
|
739 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CIER_A, cier);
|
740 |
|
|
break;
|
741 |
|
|
}
|
742 |
|
|
|
743 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0:
|
744 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH1:
|
745 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH2:
|
746 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH3:
|
747 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH4:
|
748 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH5:
|
749 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH6:
|
750 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH7:
|
751 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH8:
|
752 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH9:
|
753 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH10:
|
754 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH11:
|
755 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH12:
|
756 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH13:
|
757 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH14:
|
758 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH15:
|
759 |
|
|
{
|
760 |
|
|
cyg_uint16 cier;
|
761 |
|
|
|
762 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CIER_B, cier);
|
763 |
|
|
cier &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0));
|
764 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CIER_B, cier);
|
765 |
|
|
break;
|
766 |
|
|
}
|
767 |
|
|
|
768 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM0:
|
769 |
|
|
{
|
770 |
|
|
cyg_uint16 mios1er0;
|
771 |
|
|
|
772 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
773 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN0);
|
774 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
775 |
|
|
break;
|
776 |
|
|
}
|
777 |
|
|
|
778 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM1:
|
779 |
|
|
{
|
780 |
|
|
cyg_uint16 mios1er0;
|
781 |
|
|
|
782 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
783 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN1);
|
784 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
785 |
|
|
break;
|
786 |
|
|
}
|
787 |
|
|
|
788 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM2:
|
789 |
|
|
{
|
790 |
|
|
cyg_uint16 mios1er0;
|
791 |
|
|
|
792 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
793 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN2);
|
794 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
795 |
|
|
break;
|
796 |
|
|
}
|
797 |
|
|
|
798 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM3:
|
799 |
|
|
{
|
800 |
|
|
cyg_uint16 mios1er0;
|
801 |
|
|
|
802 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
803 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN3);
|
804 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
805 |
|
|
break;
|
806 |
|
|
}
|
807 |
|
|
|
808 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM6:
|
809 |
|
|
{
|
810 |
|
|
cyg_uint16 mios1er0;
|
811 |
|
|
|
812 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
813 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN6);
|
814 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
815 |
|
|
break;
|
816 |
|
|
}
|
817 |
|
|
|
818 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM11:
|
819 |
|
|
{
|
820 |
|
|
cyg_uint16 mios1er0;
|
821 |
|
|
|
822 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
823 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN11);
|
824 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
825 |
|
|
break;
|
826 |
|
|
}
|
827 |
|
|
|
828 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM12:
|
829 |
|
|
{
|
830 |
|
|
cyg_uint16 mios1er0;
|
831 |
|
|
|
832 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
833 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN12);
|
834 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
835 |
|
|
break;
|
836 |
|
|
}
|
837 |
|
|
|
838 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM13:
|
839 |
|
|
{
|
840 |
|
|
cyg_uint16 mios1er0;
|
841 |
|
|
|
842 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
843 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN13);
|
844 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
845 |
|
|
break;
|
846 |
|
|
}
|
847 |
|
|
|
848 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM14:
|
849 |
|
|
{
|
850 |
|
|
cyg_uint16 mios1er0;
|
851 |
|
|
|
852 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
853 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN14);
|
854 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
855 |
|
|
break;
|
856 |
|
|
}
|
857 |
|
|
|
858 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM15:
|
859 |
|
|
{
|
860 |
|
|
cyg_uint16 mios1er0;
|
861 |
|
|
|
862 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
863 |
|
|
mios1er0 &= ~(CYGARC_REG_IMM_MIOS1ER0_EN15);
|
864 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
865 |
|
|
break;
|
866 |
|
|
}
|
867 |
|
|
|
868 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM16:
|
869 |
|
|
{
|
870 |
|
|
cyg_uint16 mios1er1;
|
871 |
|
|
|
872 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
873 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN16);
|
874 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
875 |
|
|
break;
|
876 |
|
|
}
|
877 |
|
|
|
878 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM17:
|
879 |
|
|
{
|
880 |
|
|
cyg_uint16 mios1er1;
|
881 |
|
|
|
882 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
883 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN17);
|
884 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
885 |
|
|
break;
|
886 |
|
|
}
|
887 |
|
|
|
888 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM18:
|
889 |
|
|
{
|
890 |
|
|
cyg_uint16 mios1er1;
|
891 |
|
|
|
892 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
893 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN18);
|
894 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
895 |
|
|
break;
|
896 |
|
|
}
|
897 |
|
|
|
898 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM19:
|
899 |
|
|
{
|
900 |
|
|
cyg_uint16 mios1er1;
|
901 |
|
|
|
902 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
903 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN19);
|
904 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
905 |
|
|
break;
|
906 |
|
|
}
|
907 |
|
|
|
908 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM22:
|
909 |
|
|
{
|
910 |
|
|
cyg_uint16 mios1er1;
|
911 |
|
|
|
912 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
913 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN22);
|
914 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
915 |
|
|
break;
|
916 |
|
|
}
|
917 |
|
|
|
918 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM27:
|
919 |
|
|
{
|
920 |
|
|
cyg_uint16 mios1er1;
|
921 |
|
|
|
922 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
923 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN27);
|
924 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
925 |
|
|
break;
|
926 |
|
|
}
|
927 |
|
|
|
928 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM28:
|
929 |
|
|
{
|
930 |
|
|
cyg_uint16 mios1er1;
|
931 |
|
|
|
932 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
933 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN28);
|
934 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
935 |
|
|
break;
|
936 |
|
|
}
|
937 |
|
|
|
938 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM29:
|
939 |
|
|
{
|
940 |
|
|
cyg_uint16 mios1er1;
|
941 |
|
|
|
942 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
943 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN29);
|
944 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
945 |
|
|
break;
|
946 |
|
|
}
|
947 |
|
|
|
948 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM30:
|
949 |
|
|
{
|
950 |
|
|
cyg_uint16 mios1er1;
|
951 |
|
|
|
952 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
953 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN30);
|
954 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
955 |
|
|
break;
|
956 |
|
|
}
|
957 |
|
|
|
958 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31:
|
959 |
|
|
{
|
960 |
|
|
cyg_uint16 mios1er1;
|
961 |
|
|
|
962 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
963 |
|
|
mios1er1 &= ~(CYGARC_REG_IMM_MIOS1ER1_EN31);
|
964 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
965 |
|
|
break;
|
966 |
|
|
}
|
967 |
|
|
|
968 |
|
|
default:
|
969 |
|
|
CYG_FAIL("Unknown Interrupt!!!");
|
970 |
|
|
break;
|
971 |
|
|
}
|
972 |
|
|
}
|
973 |
|
|
|
974 |
|
|
static __inline__ void
|
975 |
|
|
cyg_hal_interrupt_unmask ( cyg_uint32 vector )
|
976 |
|
|
{
|
977 |
|
|
switch (vector) {
|
978 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ0 ... CYGNUM_HAL_INTERRUPT_SIU_LVL7:
|
979 |
|
|
{
|
980 |
|
|
// SIU interrupt vectors
|
981 |
|
|
cyg_uint32 simask;
|
982 |
|
|
|
983 |
|
|
HAL_READ_UINT32 (CYGARC_REG_IMM_SIMASK, simask);
|
984 |
|
|
simask |= (((cyg_uint32) CYGARC_REG_IMM_SIMASK_IRM0)
|
985 |
|
|
>> (vector - CYGNUM_HAL_INTERRUPT_SIU_IRQ0));
|
986 |
|
|
HAL_WRITE_UINT32 (CYGARC_REG_IMM_SIMASK, simask);
|
987 |
|
|
break;
|
988 |
|
|
}
|
989 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_A :
|
990 |
|
|
{
|
991 |
|
|
// TimeBase A interrupt
|
992 |
|
|
cyg_uint16 tbscr;
|
993 |
|
|
|
994 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
995 |
|
|
tbscr |= (CYGARC_REG_IMM_TBSCR_REFAE);
|
996 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFA); // Prevent from clearing interrupt flags
|
997 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFB); // accidently. Just do what is asked.
|
998 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
999 |
|
|
break;
|
1000 |
|
|
}
|
1001 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_B :
|
1002 |
|
|
{
|
1003 |
|
|
// TimeBase B interrupt
|
1004 |
|
|
cyg_uint16 tbscr;
|
1005 |
|
|
|
1006 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
1007 |
|
|
tbscr |= (CYGARC_REG_IMM_TBSCR_REFBE);
|
1008 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFA); // Prevent from clearing interrupt flags
|
1009 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFB); // accidently. Just do what is asked.
|
1010 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
1011 |
|
|
break;
|
1012 |
|
|
}
|
1013 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_PIT:
|
1014 |
|
|
{
|
1015 |
|
|
// Periodic Interrupt
|
1016 |
|
|
cyg_uint16 piscr;
|
1017 |
|
|
|
1018 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
1019 |
|
|
piscr |= (CYGARC_REG_IMM_PISCR_PIE);
|
1020 |
|
|
piscr &= ~(CYGARC_REG_IMM_PISCR_PS); // Prevent from clearing interrupt flag.
|
1021 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
1022 |
|
|
break;
|
1023 |
|
|
}
|
1024 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_SEC:
|
1025 |
|
|
{
|
1026 |
|
|
// Real Time Clock Second
|
1027 |
|
|
cyg_uint16 rtcsc;
|
1028 |
|
|
|
1029 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1030 |
|
|
rtcsc |= (CYGARC_REG_IMM_RTCSC_SIE);
|
1031 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SEC); // Prevent from clearing interrupt flags
|
1032 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALR); // accidently. Just do what is asdked.
|
1033 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1034 |
|
|
break;
|
1035 |
|
|
}
|
1036 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_ALR:
|
1037 |
|
|
{
|
1038 |
|
|
// Real Time Clock Alarm
|
1039 |
|
|
cyg_uint16 rtcsc;
|
1040 |
|
|
|
1041 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1042 |
|
|
rtcsc |= (CYGARC_REG_IMM_RTCSC_ALE);
|
1043 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SEC); // Prevent from clearing interrupt flags
|
1044 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALR); // accidently. Just do what is asdked.
|
1045 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1046 |
|
|
break;
|
1047 |
|
|
}
|
1048 |
|
|
|
1049 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_COL:
|
1050 |
|
|
{
|
1051 |
|
|
// PLL change of lock
|
1052 |
|
|
cyg_uint16 colir;
|
1053 |
|
|
|
1054 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_COLIR, colir);
|
1055 |
|
|
colir |= (CYGARC_REG_IMM_COLIR_COLIE);
|
1056 |
|
|
colir &= ~(CYGARC_REG_IMM_COLIR_COLIS); // Prevent from clearing interrupt flag accidently.
|
1057 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_COLIR, colir);
|
1058 |
|
|
break;
|
1059 |
|
|
}
|
1060 |
|
|
|
1061 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1:
|
1062 |
|
|
{
|
1063 |
|
|
cyg_uint16 quacr1;
|
1064 |
|
|
|
1065 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
1066 |
|
|
quacr1 |= (CYGARC_REG_IMM_QUACR1_CIE1);
|
1067 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
1068 |
|
|
break;
|
1069 |
|
|
}
|
1070 |
|
|
|
1071 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI1:
|
1072 |
|
|
{
|
1073 |
|
|
cyg_uint16 quacr1;
|
1074 |
|
|
|
1075 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
1076 |
|
|
quacr1 |= (CYGARC_REG_IMM_QUACR1_PIE1);
|
1077 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_A, quacr1);
|
1078 |
|
|
break;
|
1079 |
|
|
}
|
1080 |
|
|
|
1081 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI2:
|
1082 |
|
|
{
|
1083 |
|
|
cyg_uint16 quacr2;
|
1084 |
|
|
|
1085 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
1086 |
|
|
quacr2 |= (CYGARC_REG_IMM_QUACR2_CIE2);
|
1087 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
1088 |
|
|
break;
|
1089 |
|
|
}
|
1090 |
|
|
|
1091 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI2:
|
1092 |
|
|
{
|
1093 |
|
|
cyg_uint16 quacr2;
|
1094 |
|
|
|
1095 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
1096 |
|
|
quacr2 |= (CYGARC_REG_IMM_QUACR2_PIE2);
|
1097 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_A, quacr2);
|
1098 |
|
|
break;
|
1099 |
|
|
}
|
1100 |
|
|
|
1101 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI1:
|
1102 |
|
|
{
|
1103 |
|
|
cyg_uint16 quacr1;
|
1104 |
|
|
|
1105 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
1106 |
|
|
quacr1 |= (CYGARC_REG_IMM_QUACR1_CIE1);
|
1107 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
1108 |
|
|
break;
|
1109 |
|
|
}
|
1110 |
|
|
|
1111 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI1:
|
1112 |
|
|
{
|
1113 |
|
|
cyg_uint16 quacr1;
|
1114 |
|
|
|
1115 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
1116 |
|
|
quacr1 |= (CYGARC_REG_IMM_QUACR1_PIE1);
|
1117 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR1_B, quacr1);
|
1118 |
|
|
break;
|
1119 |
|
|
}
|
1120 |
|
|
|
1121 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI2:
|
1122 |
|
|
{
|
1123 |
|
|
cyg_uint16 quacr2;
|
1124 |
|
|
|
1125 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
1126 |
|
|
quacr2 |= (CYGARC_REG_IMM_QUACR2_CIE2);
|
1127 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
1128 |
|
|
break;
|
1129 |
|
|
}
|
1130 |
|
|
|
1131 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI2:
|
1132 |
|
|
{
|
1133 |
|
|
cyg_uint16 quacr2;
|
1134 |
|
|
|
1135 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
1136 |
|
|
quacr2 |= (CYGARC_REG_IMM_QUACR2_PIE2);
|
1137 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUACR2_B, quacr2);
|
1138 |
|
|
break;
|
1139 |
|
|
}
|
1140 |
|
|
|
1141 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TX:
|
1142 |
|
|
{
|
1143 |
|
|
cyg_uint16 sccxr1;
|
1144 |
|
|
|
1145 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1146 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_TIE);
|
1147 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1148 |
|
|
break;
|
1149 |
|
|
}
|
1150 |
|
|
|
1151 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TXC:
|
1152 |
|
|
{
|
1153 |
|
|
cyg_uint16 sccxr1;
|
1154 |
|
|
|
1155 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1156 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_TCIE);
|
1157 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1158 |
|
|
break;
|
1159 |
|
|
}
|
1160 |
|
|
|
1161 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_RX:
|
1162 |
|
|
{
|
1163 |
|
|
cyg_uint16 sccxr1;
|
1164 |
|
|
|
1165 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1166 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_RIE);
|
1167 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1168 |
|
|
break;
|
1169 |
|
|
}
|
1170 |
|
|
|
1171 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_IDLE:
|
1172 |
|
|
{
|
1173 |
|
|
cyg_uint16 sccxr1;
|
1174 |
|
|
|
1175 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1176 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_ILIE);
|
1177 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC1R1, sccxr1);
|
1178 |
|
|
break;
|
1179 |
|
|
}
|
1180 |
|
|
|
1181 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TX:
|
1182 |
|
|
{
|
1183 |
|
|
cyg_uint16 sccxr1;
|
1184 |
|
|
|
1185 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1186 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_TIE);
|
1187 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1188 |
|
|
break;
|
1189 |
|
|
}
|
1190 |
|
|
|
1191 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXC:
|
1192 |
|
|
{
|
1193 |
|
|
cyg_uint16 sccxr1;
|
1194 |
|
|
|
1195 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1196 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_TCIE);
|
1197 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1198 |
|
|
break;
|
1199 |
|
|
}
|
1200 |
|
|
|
1201 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RX:
|
1202 |
|
|
{
|
1203 |
|
|
cyg_uint16 sccxr1;
|
1204 |
|
|
|
1205 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1206 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_RIE);
|
1207 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1208 |
|
|
break;
|
1209 |
|
|
}
|
1210 |
|
|
|
1211 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_IDLE:
|
1212 |
|
|
{
|
1213 |
|
|
cyg_uint16 sccxr1;
|
1214 |
|
|
|
1215 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1216 |
|
|
sccxr1 |= (CYGARC_REG_IMM_SCCxR1_ILIE);
|
1217 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SCC2R1, sccxr1);
|
1218 |
|
|
break;
|
1219 |
|
|
}
|
1220 |
|
|
|
1221 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQTHF:
|
1222 |
|
|
{
|
1223 |
|
|
cyg_uint16 qsci1cr;
|
1224 |
|
|
|
1225 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1226 |
|
|
qsci1cr |= (CYGARC_REG_IMM_QSCI1CR_QTHFI);
|
1227 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1228 |
|
|
break;
|
1229 |
|
|
}
|
1230 |
|
|
|
1231 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQBHF:
|
1232 |
|
|
{
|
1233 |
|
|
cyg_uint16 qsci1cr;
|
1234 |
|
|
|
1235 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1236 |
|
|
qsci1cr |= (CYGARC_REG_IMM_QSCI1CR_QBHFI);
|
1237 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1238 |
|
|
break;
|
1239 |
|
|
}
|
1240 |
|
|
|
1241 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQTHE:
|
1242 |
|
|
{
|
1243 |
|
|
cyg_uint16 qsci1cr;
|
1244 |
|
|
|
1245 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1246 |
|
|
qsci1cr |= (CYGARC_REG_IMM_QSCI1CR_QTHEI);
|
1247 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1248 |
|
|
break;
|
1249 |
|
|
}
|
1250 |
|
|
|
1251 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQBHE:
|
1252 |
|
|
{
|
1253 |
|
|
cyg_uint16 qsci1cr;
|
1254 |
|
|
|
1255 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1256 |
|
|
qsci1cr |= (CYGARC_REG_IMM_QSCI1CR_QBHEI);
|
1257 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1CR, qsci1cr);
|
1258 |
|
|
break;
|
1259 |
|
|
}
|
1260 |
|
|
|
1261 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_FI:
|
1262 |
|
|
{
|
1263 |
|
|
cyg_uint16 spcr2;
|
1264 |
|
|
|
1265 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPCR2, spcr2);
|
1266 |
|
|
spcr2 |= (CYGARC_REG_IMM_SPCR2_SPIFIE);
|
1267 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPCR2, spcr2);
|
1268 |
|
|
break;
|
1269 |
|
|
}
|
1270 |
|
|
|
1271 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_MODF:
|
1272 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_HALTA:
|
1273 |
|
|
{
|
1274 |
|
|
cyg_uint16 spcr3;
|
1275 |
|
|
|
1276 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPCR3, spcr3);
|
1277 |
|
|
spcr3 |= (CYGARC_REG_IMM_SPCR3_HMIE);
|
1278 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPCR3, spcr3);
|
1279 |
|
|
break;
|
1280 |
|
|
}
|
1281 |
|
|
|
1282 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_BOFF:
|
1283 |
|
|
{
|
1284 |
|
|
cyg_uint16 canctrl0;
|
1285 |
|
|
|
1286 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
1287 |
|
|
canctrl0 |= (CYGARC_REG_IMM_CANCTRL0_BOFFMSK);
|
1288 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
1289 |
|
|
break;
|
1290 |
|
|
}
|
1291 |
|
|
|
1292 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_ERR:
|
1293 |
|
|
{
|
1294 |
|
|
cyg_uint16 canctrl0;
|
1295 |
|
|
|
1296 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
1297 |
|
|
canctrl0 |= (CYGARC_REG_IMM_CANCTRL0_ERRMSK);
|
1298 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_A_CANCTRL1_A, canctrl0);
|
1299 |
|
|
break;
|
1300 |
|
|
}
|
1301 |
|
|
|
1302 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_WU:
|
1303 |
|
|
{
|
1304 |
|
|
cyg_uint16 tcnmcr;
|
1305 |
|
|
|
1306 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_TCNMCR_A, tcnmcr);
|
1307 |
|
|
tcnmcr |= (CYGARC_REG_IMM_TCNMCR_WAKEMSK);
|
1308 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_TCNMCR_A, tcnmcr);
|
1309 |
|
|
break;
|
1310 |
|
|
}
|
1311 |
|
|
|
1312 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0:
|
1313 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B1:
|
1314 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B2:
|
1315 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B3:
|
1316 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B4:
|
1317 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B5:
|
1318 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B6:
|
1319 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B7:
|
1320 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B8:
|
1321 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B9:
|
1322 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B10:
|
1323 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B11:
|
1324 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B12:
|
1325 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B13:
|
1326 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B14:
|
1327 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B15:
|
1328 |
|
|
{
|
1329 |
|
|
cyg_uint16 imask;
|
1330 |
|
|
|
1331 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_IMASK_A, imask);
|
1332 |
|
|
imask |= (((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0));
|
1333 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_IMASK_A, imask);
|
1334 |
|
|
break;
|
1335 |
|
|
}
|
1336 |
|
|
|
1337 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_BOFF:
|
1338 |
|
|
{
|
1339 |
|
|
cyg_uint16 canctrl0;
|
1340 |
|
|
|
1341 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
1342 |
|
|
canctrl0 |= (CYGARC_REG_IMM_CANCTRL0_BOFFMSK);
|
1343 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
1344 |
|
|
break;
|
1345 |
|
|
}
|
1346 |
|
|
|
1347 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_ERR:
|
1348 |
|
|
{
|
1349 |
|
|
cyg_uint16 canctrl0;
|
1350 |
|
|
|
1351 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
1352 |
|
|
canctrl0 |= (CYGARC_REG_IMM_CANCTRL0_ERRMSK);
|
1353 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANCTRL0_B_CANCTRL1_B, canctrl0);
|
1354 |
|
|
break;
|
1355 |
|
|
}
|
1356 |
|
|
|
1357 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_WU:
|
1358 |
|
|
{
|
1359 |
|
|
cyg_uint16 tcnmcr;
|
1360 |
|
|
|
1361 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_TCNMCR_B, tcnmcr);
|
1362 |
|
|
tcnmcr |= (CYGARC_REG_IMM_TCNMCR_WAKEMSK);
|
1363 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_TCNMCR_B, tcnmcr);
|
1364 |
|
|
break;
|
1365 |
|
|
}
|
1366 |
|
|
|
1367 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0:
|
1368 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B1:
|
1369 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B2:
|
1370 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B3:
|
1371 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B4:
|
1372 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B5:
|
1373 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B6:
|
1374 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B7:
|
1375 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B8:
|
1376 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B9:
|
1377 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B10:
|
1378 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B11:
|
1379 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B12:
|
1380 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B13:
|
1381 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B14:
|
1382 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B15:
|
1383 |
|
|
{
|
1384 |
|
|
cyg_uint16 imask;
|
1385 |
|
|
|
1386 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_IMASK_B, imask);
|
1387 |
|
|
imask |= (((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0));
|
1388 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_IMASK_B, imask);
|
1389 |
|
|
break;
|
1390 |
|
|
}
|
1391 |
|
|
|
1392 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0:
|
1393 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH1:
|
1394 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH2:
|
1395 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH3:
|
1396 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH4:
|
1397 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH5:
|
1398 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH6:
|
1399 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH7:
|
1400 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH8:
|
1401 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH9:
|
1402 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH10:
|
1403 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH11:
|
1404 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH12:
|
1405 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH13:
|
1406 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH14:
|
1407 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH15:
|
1408 |
|
|
{
|
1409 |
|
|
cyg_uint16 cier;
|
1410 |
|
|
|
1411 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CIER_A, cier);
|
1412 |
|
|
cier |= (((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0));
|
1413 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CIER_A, cier);
|
1414 |
|
|
break;
|
1415 |
|
|
}
|
1416 |
|
|
|
1417 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0:
|
1418 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH1:
|
1419 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH2:
|
1420 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH3:
|
1421 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH4:
|
1422 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH5:
|
1423 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH6:
|
1424 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH7:
|
1425 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH8:
|
1426 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH9:
|
1427 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH10:
|
1428 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH11:
|
1429 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH12:
|
1430 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH13:
|
1431 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH14:
|
1432 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH15:
|
1433 |
|
|
{
|
1434 |
|
|
cyg_uint16 cier;
|
1435 |
|
|
|
1436 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CIER_B, cier);
|
1437 |
|
|
cier |= (((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0));
|
1438 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CIER_B, cier);
|
1439 |
|
|
break;
|
1440 |
|
|
}
|
1441 |
|
|
|
1442 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM0:
|
1443 |
|
|
{
|
1444 |
|
|
cyg_uint16 mios1er0;
|
1445 |
|
|
|
1446 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1447 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN0);
|
1448 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1449 |
|
|
break;
|
1450 |
|
|
}
|
1451 |
|
|
|
1452 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM1:
|
1453 |
|
|
{
|
1454 |
|
|
cyg_uint16 mios1er0;
|
1455 |
|
|
|
1456 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1457 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN1);
|
1458 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1459 |
|
|
break;
|
1460 |
|
|
}
|
1461 |
|
|
|
1462 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM2:
|
1463 |
|
|
{
|
1464 |
|
|
cyg_uint16 mios1er0;
|
1465 |
|
|
|
1466 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1467 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN2);
|
1468 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1469 |
|
|
break;
|
1470 |
|
|
}
|
1471 |
|
|
|
1472 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM3:
|
1473 |
|
|
{
|
1474 |
|
|
cyg_uint16 mios1er0;
|
1475 |
|
|
|
1476 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1477 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN3);
|
1478 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1479 |
|
|
break;
|
1480 |
|
|
}
|
1481 |
|
|
|
1482 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM6:
|
1483 |
|
|
{
|
1484 |
|
|
cyg_uint16 mios1er0;
|
1485 |
|
|
|
1486 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1487 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN6);
|
1488 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1489 |
|
|
break;
|
1490 |
|
|
}
|
1491 |
|
|
|
1492 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM11:
|
1493 |
|
|
{
|
1494 |
|
|
cyg_uint16 mios1er0;
|
1495 |
|
|
|
1496 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1497 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN11);
|
1498 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1499 |
|
|
break;
|
1500 |
|
|
}
|
1501 |
|
|
|
1502 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM12:
|
1503 |
|
|
{
|
1504 |
|
|
cyg_uint16 mios1er0;
|
1505 |
|
|
|
1506 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1507 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN12);
|
1508 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1509 |
|
|
break;
|
1510 |
|
|
}
|
1511 |
|
|
|
1512 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM13:
|
1513 |
|
|
{
|
1514 |
|
|
cyg_uint16 mios1er0;
|
1515 |
|
|
|
1516 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1517 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN13);
|
1518 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1519 |
|
|
break;
|
1520 |
|
|
}
|
1521 |
|
|
|
1522 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM14:
|
1523 |
|
|
{
|
1524 |
|
|
cyg_uint16 mios1er0;
|
1525 |
|
|
|
1526 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1527 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN14);
|
1528 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1529 |
|
|
break;
|
1530 |
|
|
}
|
1531 |
|
|
|
1532 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM15:
|
1533 |
|
|
{
|
1534 |
|
|
cyg_uint16 mios1er0;
|
1535 |
|
|
|
1536 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1537 |
|
|
mios1er0 |= (CYGARC_REG_IMM_MIOS1ER0_EN15);
|
1538 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER0, mios1er0);
|
1539 |
|
|
break;
|
1540 |
|
|
}
|
1541 |
|
|
|
1542 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM16:
|
1543 |
|
|
{
|
1544 |
|
|
cyg_uint16 mios1er1;
|
1545 |
|
|
|
1546 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1547 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN16);
|
1548 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1549 |
|
|
break;
|
1550 |
|
|
}
|
1551 |
|
|
|
1552 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM17:
|
1553 |
|
|
{
|
1554 |
|
|
cyg_uint16 mios1er1;
|
1555 |
|
|
|
1556 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1557 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN17);
|
1558 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1559 |
|
|
break;
|
1560 |
|
|
}
|
1561 |
|
|
|
1562 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM18:
|
1563 |
|
|
{
|
1564 |
|
|
cyg_uint16 mios1er1;
|
1565 |
|
|
|
1566 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1567 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN18);
|
1568 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1569 |
|
|
break;
|
1570 |
|
|
}
|
1571 |
|
|
|
1572 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM19:
|
1573 |
|
|
{
|
1574 |
|
|
cyg_uint16 mios1er1;
|
1575 |
|
|
|
1576 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1577 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN19);
|
1578 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1579 |
|
|
break;
|
1580 |
|
|
}
|
1581 |
|
|
|
1582 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM22:
|
1583 |
|
|
{
|
1584 |
|
|
cyg_uint16 mios1er1;
|
1585 |
|
|
|
1586 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1587 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN22);
|
1588 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1589 |
|
|
break;
|
1590 |
|
|
}
|
1591 |
|
|
|
1592 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM27:
|
1593 |
|
|
{
|
1594 |
|
|
cyg_uint16 mios1er1;
|
1595 |
|
|
|
1596 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1597 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN27);
|
1598 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1599 |
|
|
break;
|
1600 |
|
|
}
|
1601 |
|
|
|
1602 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM28:
|
1603 |
|
|
{
|
1604 |
|
|
cyg_uint16 mios1er1;
|
1605 |
|
|
|
1606 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1607 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN28);
|
1608 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1609 |
|
|
break;
|
1610 |
|
|
}
|
1611 |
|
|
|
1612 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM29:
|
1613 |
|
|
{
|
1614 |
|
|
cyg_uint16 mios1er1;
|
1615 |
|
|
|
1616 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1617 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN29);
|
1618 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1619 |
|
|
break;
|
1620 |
|
|
}
|
1621 |
|
|
|
1622 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM30:
|
1623 |
|
|
{
|
1624 |
|
|
cyg_uint16 mios1er1;
|
1625 |
|
|
|
1626 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1627 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN30);
|
1628 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1629 |
|
|
break;
|
1630 |
|
|
}
|
1631 |
|
|
|
1632 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31:
|
1633 |
|
|
{
|
1634 |
|
|
cyg_uint16 mios1er1;
|
1635 |
|
|
|
1636 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1637 |
|
|
mios1er1 |= (CYGARC_REG_IMM_MIOS1ER1_EN31);
|
1638 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1ER1, mios1er1);
|
1639 |
|
|
break;
|
1640 |
|
|
}
|
1641 |
|
|
|
1642 |
|
|
default:
|
1643 |
|
|
CYG_FAIL("Unknown Interrupt!!!");
|
1644 |
|
|
break;
|
1645 |
|
|
}
|
1646 |
|
|
}
|
1647 |
|
|
|
1648 |
|
|
static __inline__ void
|
1649 |
|
|
cyg_hal_interrupt_acknowledge ( cyg_uint32 vector )
|
1650 |
|
|
{
|
1651 |
|
|
switch (vector) {
|
1652 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ0 ... CYGNUM_HAL_INTERRUPT_SIU_LVL7:
|
1653 |
|
|
{
|
1654 |
|
|
// SIU interrupt vectors
|
1655 |
|
|
cyg_uint32 sipend;
|
1656 |
|
|
|
1657 |
|
|
// When IRQx is configured as an edge interrupt it needs to be
|
1658 |
|
|
// cleared. Write to INTx and IRQ/level bits are ignore so
|
1659 |
|
|
// it's safe to do always.
|
1660 |
|
|
HAL_READ_UINT32 (CYGARC_REG_IMM_SIPEND, sipend);
|
1661 |
|
|
sipend |= (((cyg_uint32) CYGARC_REG_IMM_SIPEND_IRQ0)
|
1662 |
|
|
>> (vector - CYGNUM_HAL_INTERRUPT_SIU_IRQ0));
|
1663 |
|
|
HAL_WRITE_UINT32 (CYGARC_REG_IMM_SIPEND, sipend);
|
1664 |
|
|
break;
|
1665 |
|
|
}
|
1666 |
|
|
|
1667 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_A:
|
1668 |
|
|
{
|
1669 |
|
|
// TimeBase A interrupt
|
1670 |
|
|
cyg_uint16 tbscr;
|
1671 |
|
|
|
1672 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
1673 |
|
|
tbscr |= CYGARC_REG_IMM_TBSCR_REFA;
|
1674 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFB); // Only acknowledge the requested one
|
1675 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
1676 |
|
|
break;
|
1677 |
|
|
}
|
1678 |
|
|
|
1679 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_B:
|
1680 |
|
|
{
|
1681 |
|
|
// TimeBase B interrupt
|
1682 |
|
|
cyg_uint16 tbscr;
|
1683 |
|
|
|
1684 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
1685 |
|
|
tbscr |= CYGARC_REG_IMM_TBSCR_REFB;
|
1686 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFA); // Only acknowledge the requested one.
|
1687 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
1688 |
|
|
break;
|
1689 |
|
|
}
|
1690 |
|
|
|
1691 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_PIT:
|
1692 |
|
|
{
|
1693 |
|
|
// Periodic Interrupt
|
1694 |
|
|
cyg_uint16 piscr;
|
1695 |
|
|
|
1696 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
1697 |
|
|
piscr |= CYGARC_REG_IMM_PISCR_PS;
|
1698 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
1699 |
|
|
break;
|
1700 |
|
|
}
|
1701 |
|
|
|
1702 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_SEC:
|
1703 |
|
|
{
|
1704 |
|
|
// Real Time Clock Second
|
1705 |
|
|
cyg_uint16 rtcsc;
|
1706 |
|
|
|
1707 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1708 |
|
|
rtcsc |= CYGARC_REG_IMM_RTCSC_SEC;
|
1709 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALR); // Only acknowledge the requested one
|
1710 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1711 |
|
|
break;
|
1712 |
|
|
}
|
1713 |
|
|
|
1714 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_ALR:
|
1715 |
|
|
{
|
1716 |
|
|
// Real Time Clock Alarm
|
1717 |
|
|
cyg_uint16 rtcsc;
|
1718 |
|
|
|
1719 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1720 |
|
|
rtcsc |= CYGARC_REG_IMM_RTCSC_ALR;
|
1721 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SEC); // Only acknowledge the requested one
|
1722 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
1723 |
|
|
break;
|
1724 |
|
|
}
|
1725 |
|
|
|
1726 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_COL:
|
1727 |
|
|
{
|
1728 |
|
|
cyg_uint16 colir;
|
1729 |
|
|
|
1730 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_COLIR, colir);
|
1731 |
|
|
colir |= CYGARC_REG_IMM_COLIR_COLIS;
|
1732 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_COLIR, colir);
|
1733 |
|
|
break;
|
1734 |
|
|
}
|
1735 |
|
|
|
1736 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1:
|
1737 |
|
|
{
|
1738 |
|
|
cyg_uint16 quasr0;
|
1739 |
|
|
|
1740 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1741 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_CF1);
|
1742 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1743 |
|
|
break;
|
1744 |
|
|
}
|
1745 |
|
|
|
1746 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI1:
|
1747 |
|
|
{
|
1748 |
|
|
cyg_uint16 quasr0;
|
1749 |
|
|
|
1750 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1751 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_PF1);
|
1752 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1753 |
|
|
break;
|
1754 |
|
|
}
|
1755 |
|
|
|
1756 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI2:
|
1757 |
|
|
{
|
1758 |
|
|
cyg_uint16 quasr0;
|
1759 |
|
|
|
1760 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1761 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_CF2);
|
1762 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1763 |
|
|
break;
|
1764 |
|
|
}
|
1765 |
|
|
|
1766 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI2:
|
1767 |
|
|
{
|
1768 |
|
|
cyg_uint16 quasr0;
|
1769 |
|
|
|
1770 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1771 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_PF2);
|
1772 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_A, quasr0);
|
1773 |
|
|
break;
|
1774 |
|
|
}
|
1775 |
|
|
|
1776 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI1:
|
1777 |
|
|
{
|
1778 |
|
|
cyg_uint16 quasr0;
|
1779 |
|
|
|
1780 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1781 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_CF1);
|
1782 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1783 |
|
|
break;
|
1784 |
|
|
}
|
1785 |
|
|
|
1786 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI1:
|
1787 |
|
|
{
|
1788 |
|
|
cyg_uint16 quasr0;
|
1789 |
|
|
|
1790 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1791 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_PF1);
|
1792 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1793 |
|
|
break;
|
1794 |
|
|
}
|
1795 |
|
|
|
1796 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI2:
|
1797 |
|
|
{
|
1798 |
|
|
cyg_uint16 quasr0;
|
1799 |
|
|
|
1800 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1801 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_CF2);
|
1802 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1803 |
|
|
break;
|
1804 |
|
|
}
|
1805 |
|
|
|
1806 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI2:
|
1807 |
|
|
{
|
1808 |
|
|
cyg_uint16 quasr0;
|
1809 |
|
|
|
1810 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1811 |
|
|
quasr0 &= ~(CYGARC_REG_IMM_QUASR0_PF2);
|
1812 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUASR0_B, quasr0);
|
1813 |
|
|
break;
|
1814 |
|
|
}
|
1815 |
|
|
|
1816 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TX:
|
1817 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TXC:
|
1818 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_RX:
|
1819 |
|
|
// Nothing needs to be done here
|
1820 |
|
|
break;
|
1821 |
|
|
|
1822 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_IDLE:
|
1823 |
|
|
{
|
1824 |
|
|
cyg_uint16 scxsr;
|
1825 |
|
|
|
1826 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SC1SR, scxsr);
|
1827 |
|
|
scxsr &= ~(CYGARC_REG_IMM_SCxSR_IDLE);
|
1828 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SC1SR, scxsr);
|
1829 |
|
|
break;
|
1830 |
|
|
}
|
1831 |
|
|
|
1832 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TX:
|
1833 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXC:
|
1834 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RX:
|
1835 |
|
|
// nothing needs to be done here
|
1836 |
|
|
break;
|
1837 |
|
|
|
1838 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_IDLE:
|
1839 |
|
|
{
|
1840 |
|
|
cyg_uint16 scxsr;
|
1841 |
|
|
|
1842 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SC2SR, scxsr);
|
1843 |
|
|
scxsr &= ~(CYGARC_REG_IMM_SCxSR_IDLE);
|
1844 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SC2SR, scxsr);
|
1845 |
|
|
break;
|
1846 |
|
|
}
|
1847 |
|
|
|
1848 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQTHF:
|
1849 |
|
|
{
|
1850 |
|
|
cyg_uint16 qsci1sr;
|
1851 |
|
|
|
1852 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1853 |
|
|
qsci1sr &= ~(CYGARC_REG_IMM_QSCI1SR_QTHF);
|
1854 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1855 |
|
|
break;
|
1856 |
|
|
}
|
1857 |
|
|
|
1858 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQBHF:
|
1859 |
|
|
{
|
1860 |
|
|
cyg_uint16 qsci1sr;
|
1861 |
|
|
|
1862 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1863 |
|
|
qsci1sr &= ~(CYGARC_REG_IMM_QSCI1SR_QBHF);
|
1864 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1865 |
|
|
break;
|
1866 |
|
|
}
|
1867 |
|
|
|
1868 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQTHE:
|
1869 |
|
|
{
|
1870 |
|
|
cyg_uint16 qsci1sr;
|
1871 |
|
|
|
1872 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1873 |
|
|
qsci1sr &= ~(CYGARC_REG_IMM_QSCI1SR_QTHE);
|
1874 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1875 |
|
|
break;
|
1876 |
|
|
}
|
1877 |
|
|
|
1878 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQBHE:
|
1879 |
|
|
{
|
1880 |
|
|
cyg_uint16 qsci1sr;
|
1881 |
|
|
|
1882 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1883 |
|
|
qsci1sr &= ~(CYGARC_REG_IMM_QSCI1SR_QBHE);
|
1884 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSCI1SR, qsci1sr);
|
1885 |
|
|
break;
|
1886 |
|
|
}
|
1887 |
|
|
|
1888 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_FI:
|
1889 |
|
|
{
|
1890 |
|
|
cyg_uint16 spsr;
|
1891 |
|
|
|
1892 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPSR, spsr);
|
1893 |
|
|
spsr &= ~(CYGARC_REG_IMM_SPSR_SPIF);
|
1894 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPSR, spsr);
|
1895 |
|
|
break;
|
1896 |
|
|
}
|
1897 |
|
|
|
1898 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_MODF:
|
1899 |
|
|
{
|
1900 |
|
|
cyg_uint16 spsr;
|
1901 |
|
|
|
1902 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPSR, spsr);
|
1903 |
|
|
spsr &= ~(CYGARC_REG_IMM_SPSR_MODF);
|
1904 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPSR, spsr);
|
1905 |
|
|
break;
|
1906 |
|
|
}
|
1907 |
|
|
|
1908 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_HALTA:
|
1909 |
|
|
{
|
1910 |
|
|
cyg_uint16 spsr;
|
1911 |
|
|
|
1912 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_SPSR, spsr);
|
1913 |
|
|
spsr &= ~(CYGARC_REG_IMM_SPSR_HALTA);
|
1914 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_SPSR, spsr);
|
1915 |
|
|
break;
|
1916 |
|
|
}
|
1917 |
|
|
|
1918 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_BOFF:
|
1919 |
|
|
{
|
1920 |
|
|
cyg_uint16 estat;
|
1921 |
|
|
|
1922 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_ESTAT_A, estat); // Read the flag as a one
|
1923 |
|
|
estat &= ~(CYGARC_REG_IMM_ESTAT_BOFFINT);
|
1924 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_ESTAT_A, estat); // And write it as a zero
|
1925 |
|
|
break;
|
1926 |
|
|
}
|
1927 |
|
|
|
1928 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_ERR:
|
1929 |
|
|
{
|
1930 |
|
|
cyg_uint16 estat;
|
1931 |
|
|
|
1932 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_ESTAT_A, estat); // Read the flag as a one
|
1933 |
|
|
estat &= ~(CYGARC_REG_IMM_ESTAT_ERRINT);
|
1934 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_ESTAT_A, estat); // And write it as a zero
|
1935 |
|
|
break;
|
1936 |
|
|
}
|
1937 |
|
|
|
1938 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_WU:
|
1939 |
|
|
{
|
1940 |
|
|
cyg_uint16 estat;
|
1941 |
|
|
|
1942 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_ESTAT_A, estat); // Read tthe flag as a one
|
1943 |
|
|
estat &= ~(CYGARC_REG_IMM_ESTAT_WAKEINT);
|
1944 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_ESTAT_A, estat); // And write it as a zero
|
1945 |
|
|
break;
|
1946 |
|
|
}
|
1947 |
|
|
|
1948 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0:
|
1949 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B1:
|
1950 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B2:
|
1951 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B3:
|
1952 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B4:
|
1953 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B5:
|
1954 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B6:
|
1955 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B7:
|
1956 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B8:
|
1957 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B9:
|
1958 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B10:
|
1959 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B11:
|
1960 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B12:
|
1961 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B13:
|
1962 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B14:
|
1963 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B15:
|
1964 |
|
|
{
|
1965 |
|
|
cyg_uint16 iflag;
|
1966 |
|
|
|
1967 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_IFLAG_A, iflag); // Read the flag as a one
|
1968 |
|
|
iflag &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0));
|
1969 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_IFLAG_A, iflag); // And write it as a zero
|
1970 |
|
|
break;
|
1971 |
|
|
}
|
1972 |
|
|
|
1973 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_BOFF:
|
1974 |
|
|
{
|
1975 |
|
|
cyg_uint16 estat;
|
1976 |
|
|
|
1977 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_ESTAT_B, estat); // Read the flag as a one
|
1978 |
|
|
estat &= ~(CYGARC_REG_IMM_ESTAT_BOFFINT);
|
1979 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_ESTAT_B, estat); // And write it as a zero
|
1980 |
|
|
break;
|
1981 |
|
|
}
|
1982 |
|
|
|
1983 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_ERR:
|
1984 |
|
|
{
|
1985 |
|
|
cyg_uint16 estat;
|
1986 |
|
|
|
1987 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_ESTAT_B, estat); // Read the flag as a one
|
1988 |
|
|
estat &= ~(CYGARC_REG_IMM_ESTAT_ERRINT);
|
1989 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_ESTAT_B, estat); // And write it as a zero
|
1990 |
|
|
break;
|
1991 |
|
|
}
|
1992 |
|
|
|
1993 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_WU:
|
1994 |
|
|
{
|
1995 |
|
|
cyg_uint16 estat;
|
1996 |
|
|
|
1997 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_ESTAT_B, estat); // Read the flag as a one
|
1998 |
|
|
estat &= ~(CYGARC_REG_IMM_ESTAT_WAKEINT);
|
1999 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_ESTAT_B, estat); // And write it as a zero
|
2000 |
|
|
break;
|
2001 |
|
|
}
|
2002 |
|
|
|
2003 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0:
|
2004 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B1:
|
2005 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B2:
|
2006 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B3:
|
2007 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B4:
|
2008 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B5:
|
2009 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B6:
|
2010 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B7:
|
2011 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B8:
|
2012 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B9:
|
2013 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B10:
|
2014 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B11:
|
2015 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B12:
|
2016 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B13:
|
2017 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B14:
|
2018 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B15:
|
2019 |
|
|
{
|
2020 |
|
|
cyg_uint16 iflag;
|
2021 |
|
|
|
2022 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_IFLAG_B, iflag); // Read the flag as a one
|
2023 |
|
|
iflag &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0));
|
2024 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_IFLAG_B, iflag); // And write it as a zero
|
2025 |
|
|
break;
|
2026 |
|
|
}
|
2027 |
|
|
|
2028 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0:
|
2029 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH1:
|
2030 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH2:
|
2031 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH3:
|
2032 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH4:
|
2033 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH5:
|
2034 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH6:
|
2035 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH7:
|
2036 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH8:
|
2037 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH9:
|
2038 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH10:
|
2039 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH11:
|
2040 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH12:
|
2041 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH13:
|
2042 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH14:
|
2043 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH15:
|
2044 |
|
|
{
|
2045 |
|
|
cyg_uint16 cisr;
|
2046 |
|
|
|
2047 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CISR_A, cisr);
|
2048 |
|
|
cisr &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0));
|
2049 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CISR_A, cisr);
|
2050 |
|
|
break;
|
2051 |
|
|
}
|
2052 |
|
|
|
2053 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0:
|
2054 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH1:
|
2055 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH2:
|
2056 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH3:
|
2057 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH4:
|
2058 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH5:
|
2059 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH6:
|
2060 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH7:
|
2061 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH8:
|
2062 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH9:
|
2063 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH10:
|
2064 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH11:
|
2065 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH12:
|
2066 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH13:
|
2067 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH14:
|
2068 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH15:
|
2069 |
|
|
{
|
2070 |
|
|
cyg_uint16 cisr;
|
2071 |
|
|
|
2072 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CISR_B, cisr);
|
2073 |
|
|
cisr &= ~(((cyg_uint16)0x0001) << (vector - CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0));
|
2074 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CISR_B, cisr);
|
2075 |
|
|
break;
|
2076 |
|
|
}
|
2077 |
|
|
|
2078 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM0:
|
2079 |
|
|
{
|
2080 |
|
|
cyg_uint16 mios1sr0;
|
2081 |
|
|
|
2082 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2083 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL0);
|
2084 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2085 |
|
|
break;
|
2086 |
|
|
}
|
2087 |
|
|
|
2088 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM1:
|
2089 |
|
|
{
|
2090 |
|
|
cyg_uint16 mios1sr0;
|
2091 |
|
|
|
2092 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2093 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL1);
|
2094 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2095 |
|
|
break;
|
2096 |
|
|
}
|
2097 |
|
|
|
2098 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM2:
|
2099 |
|
|
{
|
2100 |
|
|
cyg_uint16 mios1sr0;
|
2101 |
|
|
|
2102 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2103 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL2);
|
2104 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2105 |
|
|
break;
|
2106 |
|
|
}
|
2107 |
|
|
|
2108 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM3:
|
2109 |
|
|
{
|
2110 |
|
|
cyg_uint16 mios1sr0;
|
2111 |
|
|
|
2112 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2113 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL3);
|
2114 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2115 |
|
|
break;
|
2116 |
|
|
}
|
2117 |
|
|
|
2118 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM6:
|
2119 |
|
|
{
|
2120 |
|
|
cyg_uint16 mios1sr0;
|
2121 |
|
|
|
2122 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2123 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL6);
|
2124 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2125 |
|
|
break;
|
2126 |
|
|
}
|
2127 |
|
|
|
2128 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM11:
|
2129 |
|
|
{
|
2130 |
|
|
cyg_uint16 mios1sr0;
|
2131 |
|
|
|
2132 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2133 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL11);
|
2134 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2135 |
|
|
break;
|
2136 |
|
|
}
|
2137 |
|
|
|
2138 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM12:
|
2139 |
|
|
{
|
2140 |
|
|
cyg_uint16 mios1sr0;
|
2141 |
|
|
|
2142 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2143 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL12);
|
2144 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2145 |
|
|
break;
|
2146 |
|
|
}
|
2147 |
|
|
|
2148 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM13:
|
2149 |
|
|
{
|
2150 |
|
|
cyg_uint16 mios1sr0;
|
2151 |
|
|
|
2152 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2153 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL13);
|
2154 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2155 |
|
|
break;
|
2156 |
|
|
}
|
2157 |
|
|
|
2158 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM14:
|
2159 |
|
|
{
|
2160 |
|
|
cyg_uint16 mios1sr0;
|
2161 |
|
|
|
2162 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2163 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL14);
|
2164 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2165 |
|
|
break;
|
2166 |
|
|
}
|
2167 |
|
|
|
2168 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM15:
|
2169 |
|
|
{
|
2170 |
|
|
cyg_uint16 mios1sr0;
|
2171 |
|
|
|
2172 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2173 |
|
|
mios1sr0 &= ~(CYGARC_REG_IMM_MIOS1SR0_FL15);
|
2174 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR0, mios1sr0);
|
2175 |
|
|
break;
|
2176 |
|
|
}
|
2177 |
|
|
|
2178 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM16:
|
2179 |
|
|
{
|
2180 |
|
|
cyg_uint16 mios1sr1;
|
2181 |
|
|
|
2182 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2183 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL16);
|
2184 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2185 |
|
|
break;
|
2186 |
|
|
}
|
2187 |
|
|
|
2188 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM17:
|
2189 |
|
|
{
|
2190 |
|
|
cyg_uint16 mios1sr1;
|
2191 |
|
|
|
2192 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2193 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL17);
|
2194 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2195 |
|
|
break;
|
2196 |
|
|
}
|
2197 |
|
|
|
2198 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM18:
|
2199 |
|
|
{
|
2200 |
|
|
cyg_uint16 mios1sr1;
|
2201 |
|
|
|
2202 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2203 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL18);
|
2204 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2205 |
|
|
break;
|
2206 |
|
|
}
|
2207 |
|
|
|
2208 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM19:
|
2209 |
|
|
{
|
2210 |
|
|
cyg_uint16 mios1sr1;
|
2211 |
|
|
|
2212 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2213 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL19);
|
2214 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2215 |
|
|
break;
|
2216 |
|
|
}
|
2217 |
|
|
|
2218 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM22:
|
2219 |
|
|
{
|
2220 |
|
|
cyg_uint16 mios1sr1;
|
2221 |
|
|
|
2222 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2223 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL22);
|
2224 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2225 |
|
|
break;
|
2226 |
|
|
}
|
2227 |
|
|
|
2228 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM27:
|
2229 |
|
|
{
|
2230 |
|
|
cyg_uint16 mios1sr1;
|
2231 |
|
|
|
2232 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2233 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL27);
|
2234 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2235 |
|
|
break;
|
2236 |
|
|
}
|
2237 |
|
|
|
2238 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM28:
|
2239 |
|
|
{
|
2240 |
|
|
cyg_uint16 mios1sr1;
|
2241 |
|
|
|
2242 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2243 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL28);
|
2244 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2245 |
|
|
break;
|
2246 |
|
|
}
|
2247 |
|
|
|
2248 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM29:
|
2249 |
|
|
{
|
2250 |
|
|
cyg_uint16 mios1sr1;
|
2251 |
|
|
|
2252 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2253 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL29);
|
2254 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2255 |
|
|
break;
|
2256 |
|
|
}
|
2257 |
|
|
|
2258 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM30:
|
2259 |
|
|
{
|
2260 |
|
|
cyg_uint16 mios1sr1;
|
2261 |
|
|
|
2262 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2263 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL30);
|
2264 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2265 |
|
|
break;
|
2266 |
|
|
}
|
2267 |
|
|
|
2268 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31:
|
2269 |
|
|
{
|
2270 |
|
|
cyg_uint16 mios1sr1;
|
2271 |
|
|
|
2272 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2273 |
|
|
mios1sr1 &= ~(CYGARC_REG_IMM_MIOS1SR1_FL31);
|
2274 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1SR1, mios1sr1);
|
2275 |
|
|
break;
|
2276 |
|
|
}
|
2277 |
|
|
|
2278 |
|
|
|
2279 |
|
|
default:
|
2280 |
|
|
CYG_FAIL("Unknown Interrupt!!!");
|
2281 |
|
|
break;
|
2282 |
|
|
}
|
2283 |
|
|
}
|
2284 |
|
|
|
2285 |
|
|
static __inline__ void
|
2286 |
|
|
cyg_hal_interrupt_configure ( cyg_uint32 vector,
|
2287 |
|
|
cyg_bool level,
|
2288 |
|
|
cyg_bool up )
|
2289 |
|
|
{
|
2290 |
|
|
switch (vector) {
|
2291 |
|
|
// Only external interrupts can be fully configured in the true meaning of the word
|
2292 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ0:
|
2293 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ1:
|
2294 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ2:
|
2295 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ3:
|
2296 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ4:
|
2297 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ5:
|
2298 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ6:
|
2299 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ7:
|
2300 |
|
|
{
|
2301 |
|
|
// External interrupts
|
2302 |
|
|
cyg_uint32 siel, bit;
|
2303 |
|
|
|
2304 |
|
|
CYG_ASSERT( level || !up, "Only falling edge is supported");
|
2305 |
|
|
|
2306 |
|
|
bit = (((cyg_uint32) CYGARC_REG_IMM_SIEL_ED0)
|
2307 |
|
|
>> (vector - CYGNUM_HAL_INTERRUPT_SIU_IRQ0));
|
2308 |
|
|
|
2309 |
|
|
HAL_READ_UINT32 (CYGARC_REG_IMM_SIEL, siel);
|
2310 |
|
|
siel &= ~bit;
|
2311 |
|
|
if (!level) {
|
2312 |
|
|
// Set edge detect bit.
|
2313 |
|
|
siel |= bit;
|
2314 |
|
|
}
|
2315 |
|
|
HAL_WRITE_UINT32 (CYGARC_REG_IMM_SIEL, siel);
|
2316 |
|
|
break;
|
2317 |
|
|
}
|
2318 |
|
|
|
2319 |
|
|
// Attempts to configure all other interrupt sources should fail
|
2320 |
|
|
default:
|
2321 |
|
|
CYG_FAIL("Unknown Interrupt!!!");
|
2322 |
|
|
break;
|
2323 |
|
|
}
|
2324 |
|
|
}
|
2325 |
|
|
|
2326 |
|
|
static __inline__ void
|
2327 |
|
|
cyg_hal_interrupt_set_level ( cyg_uint32 vector, cyg_uint32 level )
|
2328 |
|
|
{
|
2329 |
|
|
if(vector < CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1)
|
2330 |
|
|
{
|
2331 |
|
|
// Note: highest priority has the lowest numerical value.
|
2332 |
|
|
CYG_ASSERT( level >= CYGARC_SIU_PRIORITY_HIGH, "Invalid priority");
|
2333 |
|
|
CYG_ASSERT( level <= CYGARC_SIU_PRIORITY_LOW, "Invalid priority");
|
2334 |
|
|
}
|
2335 |
|
|
else
|
2336 |
|
|
{
|
2337 |
|
|
CYG_ASSERT( level >= CYGARC_IMB3_PRIORITY_HIGH, "Invalid priority");
|
2338 |
|
|
CYG_ASSERT( level <= CYGARC_IMB3_PRIORITY_LOW, "Invalid priority");
|
2339 |
|
|
}
|
2340 |
|
|
|
2341 |
|
|
switch (vector) {
|
2342 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_IRQ0 ... CYGNUM_HAL_INTERRUPT_SIU_LVL7:
|
2343 |
|
|
// These cannot be configured.
|
2344 |
|
|
break;
|
2345 |
|
|
|
2346 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_A:
|
2347 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_TB_B:
|
2348 |
|
|
{
|
2349 |
|
|
// TimeBase A+B interrupt
|
2350 |
|
|
cyg_uint16 tbscr;
|
2351 |
|
|
|
2352 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
2353 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_IRQMASK);
|
2354 |
|
|
tbscr |= CYGARC_REG_IMM_TBSCR_IRQ0 >> level;
|
2355 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFA); // Prevent fom clearing interrupt flags
|
2356 |
|
|
tbscr &= ~(CYGARC_REG_IMM_TBSCR_REFB); // accidently. Just do what is asked.
|
2357 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_TBSCR, tbscr);
|
2358 |
|
|
break;
|
2359 |
|
|
}
|
2360 |
|
|
|
2361 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_PIT:
|
2362 |
|
|
{
|
2363 |
|
|
// Periodic Interrupt
|
2364 |
|
|
cyg_uint16 piscr;
|
2365 |
|
|
|
2366 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
2367 |
|
|
piscr &= ~(CYGARC_REG_IMM_PISCR_IRQMASK);
|
2368 |
|
|
piscr |= CYGARC_REG_IMM_PISCR_IRQ0 >> level;
|
2369 |
|
|
piscr &= ~(CYGARC_REG_IMM_PISCR_PS); // Prevent from clearing interrupt flag.
|
2370 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_PISCR, piscr);
|
2371 |
|
|
break;
|
2372 |
|
|
}
|
2373 |
|
|
|
2374 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_SEC:
|
2375 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_RTC_ALR:
|
2376 |
|
|
{
|
2377 |
|
|
// Real Time Clock Second & Real Time Clock Alarm
|
2378 |
|
|
cyg_uint16 rtcsc;
|
2379 |
|
|
|
2380 |
|
|
HAL_READ_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
2381 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_IRQMASK);
|
2382 |
|
|
rtcsc |= CYGARC_REG_IMM_RTCSC_IRQ0 >> level;
|
2383 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_SEC); // Prevent from clearing interrupt flags
|
2384 |
|
|
rtcsc &= ~(CYGARC_REG_IMM_RTCSC_ALR); // accidently. Just do wahat is asked.
|
2385 |
|
|
HAL_WRITE_UINT16 (CYGARC_REG_IMM_RTCSC, rtcsc);
|
2386 |
|
|
break;
|
2387 |
|
|
}
|
2388 |
|
|
|
2389 |
|
|
case CYGNUM_HAL_INTERRUPT_SIU_COL:
|
2390 |
|
|
{
|
2391 |
|
|
cyg_uint16 colir;
|
2392 |
|
|
|
2393 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_COLIR, colir);
|
2394 |
|
|
colir &= ~(CYGARC_REG_IMM_COLIR_COLIRQ); // mask out the level
|
2395 |
|
|
colir |= CYGARC_REG_IMM_COLIR_IRQ0 >> level; // and set the new level
|
2396 |
|
|
colir &= ~(CYGARC_REG_IMM_COLIR_COLIS); // Prevent from clearing interrupt flag accidently.
|
2397 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_COLIR, colir);
|
2398 |
|
|
break;
|
2399 |
|
|
}
|
2400 |
|
|
|
2401 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1:
|
2402 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI1:
|
2403 |
|
|
{
|
2404 |
|
|
cyg_uint16 quadc64int;
|
2405 |
|
|
cyg_uint16 the_level = level << CYGARC_REG_IMM_QUADC64INT_IRL1_SHIFT;
|
2406 |
|
|
|
2407 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUADC64INT_A, quadc64int);
|
2408 |
|
|
quadc64int &= ~(CYGARC_REG_IMM_QUADC64INT_IRL1);
|
2409 |
|
|
quadc64int |= the_level;
|
2410 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUADC64INT_A, quadc64int);
|
2411 |
|
|
break;
|
2412 |
|
|
}
|
2413 |
|
|
|
2414 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI2:
|
2415 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI2:
|
2416 |
|
|
{
|
2417 |
|
|
cyg_uint16 quadc64int;
|
2418 |
|
|
cyg_uint16 the_level = level << CYGARC_REG_IMM_QUADC64INT_IRL2_SHIFT;
|
2419 |
|
|
|
2420 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUADC64INT_A, quadc64int);
|
2421 |
|
|
quadc64int &= ~(CYGARC_REG_IMM_QUADC64INT_IRL2);
|
2422 |
|
|
quadc64int |= the_level;
|
2423 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUADC64INT_A, quadc64int);
|
2424 |
|
|
break;
|
2425 |
|
|
}
|
2426 |
|
|
|
2427 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI1:
|
2428 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI1:
|
2429 |
|
|
{
|
2430 |
|
|
cyg_uint16 quadc64int;
|
2431 |
|
|
cyg_uint16 the_level = level << CYGARC_REG_IMM_QUADC64INT_IRL1_SHIFT;
|
2432 |
|
|
|
2433 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUADC64INT_B, quadc64int);
|
2434 |
|
|
quadc64int &= ~(CYGARC_REG_IMM_QUADC64INT_IRL1);
|
2435 |
|
|
quadc64int |= the_level;
|
2436 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUADC64INT_B, quadc64int);
|
2437 |
|
|
break;
|
2438 |
|
|
}
|
2439 |
|
|
|
2440 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI2:
|
2441 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI2:
|
2442 |
|
|
{
|
2443 |
|
|
cyg_uint16 quadc64int;
|
2444 |
|
|
cyg_uint16 the_level = level << CYGARC_REG_IMM_QUADC64INT_IRL2_SHIFT;
|
2445 |
|
|
|
2446 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QUADC64INT_B, quadc64int);
|
2447 |
|
|
quadc64int &= ~(CYGARC_REG_IMM_QUADC64INT_IRL2);
|
2448 |
|
|
quadc64int |= the_level;
|
2449 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QUADC64INT_B, quadc64int);
|
2450 |
|
|
break;
|
2451 |
|
|
}
|
2452 |
|
|
|
2453 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TX:
|
2454 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TXC:
|
2455 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_RX:
|
2456 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI0_IDLE:
|
2457 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TX:
|
2458 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXC:
|
2459 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RX:
|
2460 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_IDLE:
|
2461 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQTHF:
|
2462 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQBHF:
|
2463 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQTHE:
|
2464 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQBHE:
|
2465 |
|
|
{
|
2466 |
|
|
cyg_uint16 qdsci_il;
|
2467 |
|
|
cyg_uint16 the_level = level << CYGARC_REG_IMM_QDSCI_IL_ILDSCI_SHIFT;
|
2468 |
|
|
|
2469 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QDSCI_IL, qdsci_il);
|
2470 |
|
|
qdsci_il &= ~(CYGARC_REG_IMM_QDSCI_IL_ILDSCI);
|
2471 |
|
|
qdsci_il |= the_level;
|
2472 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QDSCI_IL, qdsci_il);
|
2473 |
|
|
break;
|
2474 |
|
|
}
|
2475 |
|
|
|
2476 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_FI:
|
2477 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_MODF:
|
2478 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_SPI_HALTA:
|
2479 |
|
|
{
|
2480 |
|
|
cyg_uint16 qspi_il;
|
2481 |
|
|
cyg_uint16 the_level = level << CYGARC_REG_IMM_QSPI_IL_ILQSPI_SHIFT;
|
2482 |
|
|
|
2483 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_QSPI_IL, qspi_il);
|
2484 |
|
|
qspi_il &= ~(CYGARC_REG_IMM_QSPI_IL_ILQSPI);
|
2485 |
|
|
qspi_il |= the_level;
|
2486 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_QSPI_IL, qspi_il);
|
2487 |
|
|
break;
|
2488 |
|
|
}
|
2489 |
|
|
|
2490 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_BOFF:
|
2491 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_ERR:
|
2492 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_WU:
|
2493 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0:
|
2494 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B1:
|
2495 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B2:
|
2496 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B3:
|
2497 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B4:
|
2498 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B5:
|
2499 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B6:
|
2500 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B7:
|
2501 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B8:
|
2502 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B9:
|
2503 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B10:
|
2504 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B11:
|
2505 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B12:
|
2506 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B13:
|
2507 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B14:
|
2508 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B15:
|
2509 |
|
|
{
|
2510 |
|
|
cyg_uint16 irl = (level % 8) << CYGARC_REG_IMM_CANICR_IRL_SHIFT;
|
2511 |
|
|
cyg_uint16 ilsb = (level / 8) << CYGARC_REG_IMM_CANICR_ILBS_SHIFT;
|
2512 |
|
|
cyg_uint16 canicr;
|
2513 |
|
|
|
2514 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANICR_A, canicr);
|
2515 |
|
|
canicr &= ~(CYGARC_REG_IMM_CANICR_IRL);
|
2516 |
|
|
canicr &= ~(CYGARC_REG_IMM_CANICR_ILBS);
|
2517 |
|
|
canicr |= irl;
|
2518 |
|
|
canicr |= ilsb;
|
2519 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANICR_A, canicr);
|
2520 |
|
|
break;
|
2521 |
|
|
}
|
2522 |
|
|
|
2523 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_BOFF:
|
2524 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_ERR:
|
2525 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_WU:
|
2526 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0:
|
2527 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B1:
|
2528 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B2:
|
2529 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B3:
|
2530 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B4:
|
2531 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B5:
|
2532 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B6:
|
2533 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B7:
|
2534 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B8:
|
2535 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B9:
|
2536 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B10:
|
2537 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B11:
|
2538 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B12:
|
2539 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B13:
|
2540 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B14:
|
2541 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B15:
|
2542 |
|
|
{
|
2543 |
|
|
cyg_uint16 irl = (level % 8) << CYGARC_REG_IMM_CANICR_IRL_SHIFT;
|
2544 |
|
|
cyg_uint16 ilsb = (level / 8) << CYGARC_REG_IMM_CANICR_ILBS_SHIFT;
|
2545 |
|
|
cyg_uint16 canicr;
|
2546 |
|
|
|
2547 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_CANICR_B, canicr);
|
2548 |
|
|
canicr &= ~(CYGARC_REG_IMM_CANICR_IRL);
|
2549 |
|
|
canicr &= ~(CYGARC_REG_IMM_CANICR_ILBS);
|
2550 |
|
|
canicr |= irl;
|
2551 |
|
|
canicr |= ilsb;
|
2552 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_CANICR_B, canicr);
|
2553 |
|
|
break;
|
2554 |
|
|
}
|
2555 |
|
|
|
2556 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0:
|
2557 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH1:
|
2558 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH2:
|
2559 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH3:
|
2560 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH4:
|
2561 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH5:
|
2562 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH6:
|
2563 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH7:
|
2564 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH8:
|
2565 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH9:
|
2566 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH10:
|
2567 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH11:
|
2568 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH12:
|
2569 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH13:
|
2570 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH14:
|
2571 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH15:
|
2572 |
|
|
{
|
2573 |
|
|
cyg_uint16 cirl = (level % 8) << CYGARC_REG_IMM_TICR_CIRL_SHIFT;
|
2574 |
|
|
cyg_uint16 ilsb = (level / 8) << CYGARC_REG_IMM_TICR_ILBS_SHIFT;
|
2575 |
|
|
cyg_uint16 ticr;
|
2576 |
|
|
|
2577 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_TICR_A, ticr);
|
2578 |
|
|
ticr &= ~(CYGARC_REG_IMM_TICR_CIRL);
|
2579 |
|
|
ticr &= ~(CYGARC_REG_IMM_TICR_ILBS);
|
2580 |
|
|
ticr |= cirl;
|
2581 |
|
|
ticr |= ilsb;
|
2582 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_TICR_A, ticr);
|
2583 |
|
|
break;
|
2584 |
|
|
}
|
2585 |
|
|
|
2586 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0:
|
2587 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH1:
|
2588 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH2:
|
2589 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH3:
|
2590 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH4:
|
2591 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH5:
|
2592 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH6:
|
2593 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH7:
|
2594 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH8:
|
2595 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH9:
|
2596 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH10:
|
2597 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH11:
|
2598 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH12:
|
2599 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH13:
|
2600 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH14:
|
2601 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH15:
|
2602 |
|
|
{
|
2603 |
|
|
cyg_uint16 cirl = (level % 8) << CYGARC_REG_IMM_TICR_CIRL_SHIFT;
|
2604 |
|
|
cyg_uint16 ilsb = (level / 8) << CYGARC_REG_IMM_TICR_ILBS_SHIFT;
|
2605 |
|
|
cyg_uint16 ticr;
|
2606 |
|
|
|
2607 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_TICR_B, ticr);
|
2608 |
|
|
ticr &= ~(CYGARC_REG_IMM_TICR_CIRL);
|
2609 |
|
|
ticr &= ~(CYGARC_REG_IMM_TICR_ILBS);
|
2610 |
|
|
ticr |= cirl;
|
2611 |
|
|
ticr |= ilsb;
|
2612 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_TICR_B, ticr);
|
2613 |
|
|
break;
|
2614 |
|
|
}
|
2615 |
|
|
|
2616 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM0:
|
2617 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM1:
|
2618 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM2:
|
2619 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM3:
|
2620 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM6:
|
2621 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM11:
|
2622 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM12:
|
2623 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM13:
|
2624 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM14:
|
2625 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM15:
|
2626 |
|
|
{
|
2627 |
|
|
cyg_uint16 lvl = (level % 8) << CYGARC_REG_IMM_MIOS1LVL_LVL_SHIFT;
|
2628 |
|
|
cyg_uint16 tm = (level / 8) << CYGARC_REG_IMM_MIOS1LVL_TM_SHIFT;
|
2629 |
|
|
cyg_uint16 mios1lvl;
|
2630 |
|
|
|
2631 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1LVL0, mios1lvl);
|
2632 |
|
|
mios1lvl &= ~(CYGARC_REG_IMM_MIOS1LVL_LVL);
|
2633 |
|
|
mios1lvl &= ~(CYGARC_REG_IMM_MIOS1LVL_TM);
|
2634 |
|
|
mios1lvl |= lvl;
|
2635 |
|
|
mios1lvl |= tm;
|
2636 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1LVL0, mios1lvl);
|
2637 |
|
|
break;
|
2638 |
|
|
}
|
2639 |
|
|
|
2640 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM16:
|
2641 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM17:
|
2642 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM18:
|
2643 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM19:
|
2644 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM22:
|
2645 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM27:
|
2646 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM28:
|
2647 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM29:
|
2648 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM30:
|
2649 |
|
|
case CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31:
|
2650 |
|
|
{
|
2651 |
|
|
cyg_uint16 lvl = (level % 8) << CYGARC_REG_IMM_MIOS1LVL_LVL_SHIFT;
|
2652 |
|
|
cyg_uint16 tm = (level / 8) << CYGARC_REG_IMM_MIOS1LVL_TM_SHIFT;
|
2653 |
|
|
cyg_uint16 mios1lvl;
|
2654 |
|
|
|
2655 |
|
|
HAL_READ_UINT16(CYGARC_REG_IMM_MIOS1LVL1, mios1lvl);
|
2656 |
|
|
mios1lvl &= ~(CYGARC_REG_IMM_MIOS1LVL_LVL);
|
2657 |
|
|
mios1lvl &= ~(CYGARC_REG_IMM_MIOS1LVL_TM);
|
2658 |
|
|
mios1lvl |= lvl;
|
2659 |
|
|
mios1lvl |= tm;
|
2660 |
|
|
HAL_WRITE_UINT16(CYGARC_REG_IMM_MIOS1LVL1, mios1lvl);
|
2661 |
|
|
break;
|
2662 |
|
|
}
|
2663 |
|
|
|
2664 |
|
|
default:
|
2665 |
|
|
CYG_FAIL("Unknown Interrupt!!!");
|
2666 |
|
|
break;
|
2667 |
|
|
}
|
2668 |
|
|
}
|
2669 |
|
|
|
2670 |
|
|
// The decrementer interrupt cannnot be masked, configured or acknowledged.
|
2671 |
|
|
|
2672 |
|
|
#define HAL_INTERRUPT_MASK( _vector_ ) \
|
2673 |
|
|
CYG_MACRO_START \
|
2674 |
|
|
if (CYGNUM_HAL_INTERRUPT_DECREMENTER != (_vector_)) \
|
2675 |
|
|
cyg_hal_interrupt_mask ( (_vector_) ); \
|
2676 |
|
|
CYG_MACRO_END
|
2677 |
|
|
|
2678 |
|
|
#define HAL_INTERRUPT_UNMASK( _vector_ ) \
|
2679 |
|
|
CYG_MACRO_START \
|
2680 |
|
|
if (CYGNUM_HAL_INTERRUPT_DECREMENTER != (_vector_)) \
|
2681 |
|
|
cyg_hal_interrupt_unmask ( (_vector_) ); \
|
2682 |
|
|
CYG_MACRO_END
|
2683 |
|
|
|
2684 |
|
|
#define HAL_INTERRUPT_ACKNOWLEDGE( _vector_ ) \
|
2685 |
|
|
CYG_MACRO_START \
|
2686 |
|
|
if (CYGNUM_HAL_INTERRUPT_DECREMENTER != (_vector_)) \
|
2687 |
|
|
cyg_hal_interrupt_acknowledge ( (_vector_) ); \
|
2688 |
|
|
CYG_MACRO_END
|
2689 |
|
|
|
2690 |
|
|
#define HAL_INTERRUPT_CONFIGURE( _vector_, _level_, _up_ ) \
|
2691 |
|
|
CYG_MACRO_START \
|
2692 |
|
|
if (CYGNUM_HAL_INTERRUPT_DECREMENTER != (_vector_)) \
|
2693 |
|
|
cyg_hal_interrupt_configure ( (_vector_), (_level_), (_up_) ); \
|
2694 |
|
|
CYG_MACRO_END
|
2695 |
|
|
|
2696 |
|
|
#define HAL_INTERRUPT_SET_LEVEL( _vector_, _level_ ) \
|
2697 |
|
|
CYG_MACRO_START \
|
2698 |
|
|
if (CYGNUM_HAL_INTERRUPT_DECREMENTER != (_vector_)) \
|
2699 |
|
|
cyg_hal_interrupt_set_level ( (_vector_) , (_level_) ); \
|
2700 |
|
|
CYG_MACRO_END
|
2701 |
|
|
|
2702 |
|
|
#define CYGHWR_HAL_INTERRUPT_CONTROLLER_ACCESS_DEFINED
|
2703 |
|
|
|
2704 |
|
|
//--------------------------------------------------------------------------
|
2705 |
|
|
// Interrupt arbiters
|
2706 |
|
|
externC cyg_uint32 hal_arbitration_isr_tb (CYG_ADDRWORD vector,
|
2707 |
|
|
CYG_ADDRWORD data);
|
2708 |
|
|
externC cyg_uint32 hal_arbitration_isr_pit (CYG_ADDRWORD vector,
|
2709 |
|
|
CYG_ADDRWORD data);
|
2710 |
|
|
externC cyg_uint32 hal_arbitration_isr_rtc (CYG_ADDRWORD vector,
|
2711 |
|
|
CYG_ADDRWORD data);
|
2712 |
|
|
|
2713 |
|
|
//-----------------------------------------------------------------------------
|
2714 |
|
|
// Symbols used by assembly code
|
2715 |
|
|
#define CYGARC_VARIANT_DEFS \
|
2716 |
|
|
DEFINE(CYGNUM_HAL_VECTOR_NMI, CYGNUM_HAL_VECTOR_NMI);
|
2717 |
|
|
|
2718 |
|
|
//-----------------------------------------------------------------------------
|
2719 |
|
|
// Interrupt source priorities
|
2720 |
|
|
// Maybe this is not the best way to do this. Fact remains that these priorities
|
2721 |
|
|
// are not hard wired by the board layout, but are all software configurable. Not
|
2722 |
|
|
// so easy to combine flexibility with generality
|
2723 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_TB_A_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TB
|
2724 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_TB_B_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TB
|
2725 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_PIT_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_PIT
|
2726 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_RTC_SEC_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_RTC
|
2727 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_RTC_ALR_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_RTC
|
2728 |
|
|
#define CYGNUM_HAL_INTERRUPT_SIU_COL_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_PLL
|
2729 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_A_QUEUE1
|
2730 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_A_QUEUE1
|
2731 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_CI2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_A_QUEUE2
|
2732 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCA_PI2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_A_QUEUE2
|
2733 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_B_QUEUE1
|
2734 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_B_QUEUE1
|
2735 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_CI2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_B_QUEUE2
|
2736 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_QUADCB_PI2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QUADC_B_QUEUE2
|
2737 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TX_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2738 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_TXC_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2739 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_RX_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2740 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI0_IDLE_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2741 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TX_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2742 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXC_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2743 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RX_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2744 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_IDLE_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2745 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQTHF_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2746 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_RXQBHF_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2747 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQTHE_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2748 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SCI1_TXQBHE_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSCI
|
2749 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SPI_FI_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSPI
|
2750 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SPI_MODF_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSPI
|
2751 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_SPI_HALTA_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_QSPI
|
2752 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_BOFF_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2753 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_ERR_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2754 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_WU_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2755 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B0_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2756 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2757 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2758 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B3_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2759 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B4_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2760 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B5_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2761 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B6_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2762 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B7_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2763 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B8_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2764 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B9_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2765 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B10_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2766 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B11_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2767 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B12_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2768 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B13_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2769 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B14_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2770 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANA_B15_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_A
|
2771 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_BOFF_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2772 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_ERR_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2773 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_WU_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2774 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B0_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2775 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2776 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2777 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B3_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2778 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B4_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2779 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B5_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2780 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B6_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2781 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B7_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2782 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B8_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2783 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B9_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2784 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B10_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2785 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B11_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2786 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B12_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2787 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B13_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2788 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B14_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2789 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TOUCANB_B15_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TOUCAN_B
|
2790 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH0_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2791 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2792 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2793 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH3_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2794 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH4_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2795 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH5_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2796 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH6_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2797 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH7_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2798 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH8_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2799 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH9_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2800 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH10_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2801 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH11_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2802 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH12_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2803 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH13_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2804 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH14_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2805 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUA_CH15_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_A
|
2806 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH0_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2807 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2808 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2809 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH3_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2810 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH4_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2811 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH5_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2812 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH6_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2813 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH7_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2814 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH8_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2815 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH9_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2816 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH10_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2817 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH11_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2818 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH12_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2819 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH13_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2820 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH14_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2821 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_TPUB_CH15_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_TPU_B
|
2822 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM0_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2823 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM1_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2824 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM2_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2825 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM3_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2826 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM6_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2827 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM11_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2828 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM12_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2829 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM13_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2830 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM14_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2831 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM15_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_A
|
2832 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM16_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2833 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM17_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2834 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM18_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2835 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MPWM19_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2836 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MMCSM22_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2837 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM27_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2838 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM28_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2839 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM29_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2840 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM30_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2841 |
|
|
#define CYGNUM_HAL_INTERRUPT_IMB3_MIOS_MDASM31_PRIORITY CYGNUM_HAL_ISR_SOURCE_PRIORITY_MIOS_B
|
2842 |
|
|
|
2843 |
|
|
//-----------------------------------------------------------------------------
|
2844 |
|
|
#endif // ifndef CYGONCE_VAR_INTR_H
|
2845 |
|
|
// End of var_intr.h
|