1 |
9 |
jlechner |
/* Register-to-memory mappings for SCARTS (16-bit).
|
2 |
|
|
* Copyright (C) 2010, 2011 Embedded Computing Systems Group,
|
3 |
|
|
* Department of Computer Engineering, Vienna University of Technology.
|
4 |
|
|
* Contributed by Martin Walter <mwalter@opencores.org>
|
5 |
|
|
*
|
6 |
|
|
* The authors hereby grant permission to use, copy, modify, distribute,
|
7 |
|
|
* and license this software and its documentation for any purpose, provided
|
8 |
|
|
* that existing copyright notices are retained in all copies and that this
|
9 |
|
|
* notice is included verbatim in any distributions. No written agreement,
|
10 |
|
|
* license, or royalty fee is required for any of the authorized uses.
|
11 |
|
|
* Modifications to this software may be copyrighted by their authors
|
12 |
|
|
* and need not follow the licensing terms described here, provided that
|
13 |
|
|
* the new terms are clearly indicated on the first page of each file where
|
14 |
|
|
* they apply.
|
15 |
|
|
*/
|
16 |
|
|
|
17 |
|
|
#ifndef __SCARTS_16_MODULES_H__
|
18 |
|
|
#define __SCARTS_16_MODULES_H__
|
19 |
|
|
|
20 |
|
|
#include <stdint.h>
|
21 |
|
|
|
22 |
|
|
/* Processor Control Module register definitions */
|
23 |
|
|
#define PROC_CTRL_SIZE 25
|
24 |
|
|
#define PROC_CTRL_BADDR ((uint16_t)-32)
|
25 |
|
|
|
26 |
|
|
#define PROC_CTRL_STATUS_BOFF 0
|
27 |
|
|
#define PROC_CTRL_STATUS_BADDR PROC_CTRL_BADDR + PROC_CTRL_STATUS_BOFF
|
28 |
|
|
#define PROC_CTRL_STATUS (*(volatile uint8_t *const) (PROC_CTRL_STATUS_BADDR))
|
29 |
|
|
#define PROC_CTRL_STATUS_LOOR 0x7
|
30 |
|
|
#define PROC_CTRL_STATUS_FSS 0x4
|
31 |
|
|
#define PROC_CTRL_STATUS_BUSY 0x3
|
32 |
|
|
#define PROC_CTRL_STATUS_ERR 0x2
|
33 |
|
|
#define PROC_CTRL_STATUS_RDY 0x1
|
34 |
|
|
#define PROC_CTRL_STATUS_INT 0x0
|
35 |
|
|
|
36 |
|
|
#define PROC_CTRL_STATUS_C_BOFF 1
|
37 |
|
|
#define PROC_CTRL_STATUS_C_BADDR PROC_CTRL_BADDR + PROC_CTRL_STATUS_C_BOFF
|
38 |
|
|
#define PROC_CTRL_STATUS_C (*(volatile uint8_t *const) (PROC_CTRL_STATUS_C_BADDR))
|
39 |
|
|
#define PROC_CTRL_STATUS_C_COND 0x4
|
40 |
|
|
#define PROC_CTRL_STATUS_C_ZERO 0x3
|
41 |
|
|
#define PROC_CTRL_STATUS_C_NEG 0x2
|
42 |
|
|
#define PROC_CTRL_STATUS_C_CARRY 0x1
|
43 |
|
|
#define PROC_CTRL_STATUS_C_OVER 0x0
|
44 |
|
|
|
45 |
|
|
#define PROC_CTRL_CONFIG_BOFF 2
|
46 |
|
|
#define PROC_CTRL_CONFIG_BADDR PROC_CTRL_BADDR + PROC_CTRL_CONFIG_BOFF
|
47 |
|
|
#define PROC_CTRL_CONFIG (*(volatile uint8_t *const) (PROC_CTRL_CONFIG_BADDR))
|
48 |
|
|
#define PROC_CTRL_CONFIG_LOOW 0x7
|
49 |
|
|
#define PROC_CTRL_CONFIG_EFSS 0x4
|
50 |
|
|
#define PROC_CTRL_CONFIG_OUTD 0x3
|
51 |
|
|
#define PROC_CTRL_CONFIG_SRES 0x2
|
52 |
|
|
#define PROC_CTRL_CONFIG_ID 0x1
|
53 |
|
|
#define PROC_CTRL_CONFIG_INTA 0x0
|
54 |
|
|
|
55 |
|
|
#define PROC_CTRL_CONFIG_C_BOFF 3
|
56 |
|
|
#define PROC_CTRL_CONFIG_C_BADDR PROC_CTRL_BADDR + PROC_CTRL_CONFIG_C_BOFF
|
57 |
|
|
#define PROC_CTRL_CONFIG_C (*(volatile uint8_t *const) (PROC_CTRL_CONFIG_C_BADDR))
|
58 |
|
|
#define PROC_CTRL_CONFIG_C_GIE 0x7
|
59 |
|
|
#define PROC_CTRL_CONFIG_C_SLEEP 0x6
|
60 |
|
|
|
61 |
|
|
#define PROC_CTRL_INTPROT_BOFF 4
|
62 |
|
|
#define PROC_CTRL_INTPROT_BADDR PROC_CTRL_BADDR + PROC_CTRL_INTPROT_BOFF
|
63 |
|
|
#define PROC_CTRL_INTPROT (*(volatile uint16_t *const) (PROC_CTRL_INTPROT_BADDR))
|
64 |
|
|
|
65 |
|
|
#define PROC_CTRL_INTMASK_BOFF 6
|
66 |
|
|
#define PROC_CTRL_INTMASK_BADDR PROC_CTRL_BADDR + PROC_CTRL_INTMASK_BOFF
|
67 |
|
|
#define PROC_CTRL_INTMASK (*(volatile uint16_t *const) (PROC_CTRL_INTMASK_BADDR))
|
68 |
|
|
|
69 |
|
|
#define PROC_CTRL_FPW_BOFF 8
|
70 |
|
|
#define PROC_CTRL_FPW_BADDR PROC_CTRL_BADDR + PROC_CTRL_FPW_BOFF
|
71 |
|
|
#define PROC_CTRL_FPW (*(volatile uint16_t *const) (PROC_CTRL_FPW_BADDR))
|
72 |
|
|
#define FPW PROC_CTRL_FPW
|
73 |
|
|
|
74 |
|
|
#define PROC_CTRL_FPX_BOFF 12
|
75 |
|
|
#define PROC_CTRL_FPX_BADDR PROC_CTRL_BADDR + PROC_CTRL_FPX_BOFF
|
76 |
|
|
#define PROC_CTRL_FPX (*(volatile uint16_t *const) (PROC_CTRL_FPX_BADDR))
|
77 |
|
|
#define FPX PROC_CTRL_FPX
|
78 |
|
|
|
79 |
|
|
#define PROC_CTRL_FPY_BOFF 16
|
80 |
|
|
#define PROC_CTRL_FPY_BADDR PROC_CTRL_BADDR + PROC_CTRL_FPY_BOFF
|
81 |
|
|
#define PROC_CTRL_FPY (*(volatile uint16_t *const) (PROC_CTRL_FPY_BADDR))
|
82 |
|
|
#define FPY PROC_CTRL_FPY
|
83 |
|
|
|
84 |
|
|
#define PROC_CTRL_FPZ_BOFF 20
|
85 |
|
|
#define PROC_CTRL_FPZ_BADDR PROC_CTRL_BADDR + PROC_CTRL_FPZ_BOFF
|
86 |
|
|
#define PROC_CTRL_FPZ (*(volatile uint16_t *const) (PROC_CTRL_FPZ_BADDR))
|
87 |
|
|
#define FPZ PROC_CTRL_FPZ
|
88 |
|
|
|
89 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_BOFF 24
|
90 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_BADDR PROC_CTRL_BADDR + PROC_CTRL_SAVE_STATUS_C_BOFF
|
91 |
|
|
#define PROC_CTRL_SAVE_STATUS_C (*(volatile uint8_t *const) (PROC_CTRL_SAVE_STATUS_C_BADDR))
|
92 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_COND 0x5
|
93 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_ZERO 0x4
|
94 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_NEG 0x3
|
95 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_CARRY 0x2
|
96 |
|
|
#define PROC_CTRL_SAVE_STATUS_C_OVER 0x1
|
97 |
|
|
|
98 |
|
|
/* Programmer Module register definitions */
|
99 |
|
|
#define PROGRAMMER_SIZE 10
|
100 |
|
|
#define PROGRAMMER_BADDR ((uint16_t)-64)
|
101 |
|
|
|
102 |
|
|
#define PROGRAMMER_STATUS_BOFF 0
|
103 |
|
|
#define PROGRAMMER_STATUS_BADDR PROGRAMMER_BADDR + PROGRAMMER_STATUS_BOFF
|
104 |
|
|
#define PROGRAMMER_STATUS (*(volatile uint8_t *const) (PROGRAMMER_STATUS_BADDR))
|
105 |
|
|
#define PROGRAMMER_STATUS_LOOR 0x7
|
106 |
|
|
#define PROGRAMMER_STATUS_FSS 0x4
|
107 |
|
|
#define PROGRAMMER_STATUS_BUSY 0x3
|
108 |
|
|
#define PROGRAMMER_STATUS_ERR 0x2
|
109 |
|
|
#define PROGRAMMER_STATUS_RDY 0x1
|
110 |
|
|
#define PROGRAMMER_STATUS_INT 0x0
|
111 |
|
|
|
112 |
|
|
#define PROGRAMMER_CONFIG_BOFF 2
|
113 |
|
|
#define PROGRAMMER_CONFIG_BADDR PROGRAMMER_BADDR + PROGRAMMER_CONFIG_BOFF
|
114 |
|
|
#define PROGRAMMER_CONFIG (*(volatile uint8_t *const) (PROGRAMMER_CONFIG_BADDR))
|
115 |
|
|
#define PROGRAMMER_CONFIG_LOOW 0x7
|
116 |
|
|
#define PROGRAMMER_CONFIG_EFSS 0x4
|
117 |
|
|
#define PROGRAMMER_CONFIG_OUTD 0x3
|
118 |
|
|
#define PROGRAMMER_CONFIG_SRES 0x2
|
119 |
|
|
#define PROGRAMMER_CONFIG_ID 0x1
|
120 |
|
|
#define PROGRAMMER_CONFIG_INTA 0x0
|
121 |
|
|
|
122 |
|
|
#define PROGRAMMER_CONFIG_C_BOFF 3
|
123 |
|
|
#define PROGRAMMER_CONFIG_C_BADDR PROGRAMMER_BADDR + PROGRAMMER_CONFIG_C_BOFF
|
124 |
|
|
#define PROGRAMMER_CONFIG_C (*(volatile uint8_t *const) (PROGRAMMER_CONFIG_C_BADDR))
|
125 |
|
|
#define PROGRAMMER_CONFIG_C_PREXE 0x7
|
126 |
|
|
#define PROGRAMMER_CONFIG_C_MEM 0x6
|
127 |
|
|
#define PROGRAMMER_CONFIG_C_CLR 0x1
|
128 |
|
|
#define PROGRAMMER_CONFIG_C_SRC 0x0
|
129 |
|
|
|
130 |
|
|
#define PROGRAMMER_ADDRESS_BOFF 4
|
131 |
|
|
#define PROGRAMMER_ADDRESS_BADDR PROGRAMMER_BADDR + PROGRAMMER_ADDRESS_BOFF
|
132 |
|
|
#define PROGRAMMER_ADDRESS (*(volatile uint16_t *const) (PROGRAMMER_ADDRESS_BADDR))
|
133 |
|
|
|
134 |
|
|
#define PROGRAMMER_DATA_BOFF 8
|
135 |
|
|
#define PROGRAMMER_DATA_BADDR PROGRAMMER_BADDR + PROGRAMMER_DATA_BOFF
|
136 |
|
|
#define PROGRAMMER_DATA (*(volatile uint16_t *const) (PROGRAMMER_DATA_BADDR))
|
137 |
|
|
|
138 |
|
|
/* miniUART Module register definitions */
|
139 |
|
|
#define MINI_UART_SIZE 10
|
140 |
|
|
#define MINI_UART_BADDR ((uint16_t)-128)
|
141 |
|
|
|
142 |
|
|
#define MINI_UART_STATUS_BOFF 0
|
143 |
|
|
#define MINI_UART_STATUS_BADDR MINI_UART_BADDR + MINI_UART_STATUS_BOFF
|
144 |
|
|
#define MINI_UART_STATUS (*(volatile uint8_t *const) (MINI_UART_STATUS_BADDR))
|
145 |
|
|
#define MINI_UART_STATUS_LOOR 0x7
|
146 |
|
|
#define MINI_UART_STATUS_FSS 0x4
|
147 |
|
|
#define MINI_UART_STATUS_BUSY 0x3
|
148 |
|
|
#define MINI_UART_STATUS_ERR 0x2
|
149 |
|
|
#define MINI_UART_STATUS_RDY 0x1
|
150 |
|
|
#define MINI_UART_STATUS_INT 0x0
|
151 |
|
|
|
152 |
|
|
#define MINI_UART_STATUS_C_BOFF 1
|
153 |
|
|
#define MINI_UART_STATUS_C_BADDR MINI_UART_BADDR + MINI_UART_STATUS_C_BOFF
|
154 |
|
|
#define MINI_UART_STATUS_C (*(volatile uint8_t *const) (MINI_UART_STATUS_C_BADDR))
|
155 |
|
|
#define MINI_UART_STATUS_C_FE 0x6
|
156 |
|
|
#define MINI_UART_STATUS_C_PE 0x5
|
157 |
|
|
#define MINI_UART_STATUS_C_EF 0x4
|
158 |
|
|
#define MINI_UART_STATUS_C_OV 0x3
|
159 |
|
|
#define MINI_UART_STATUS_C_RBR 0x2
|
160 |
|
|
#define MINI_UART_STATUS_C_TBR 0x1
|
161 |
|
|
|
162 |
|
|
#define MINI_UART_CONFIG_BOFF 2
|
163 |
|
|
#define MINI_UART_CONFIG_BADDR MINI_UART_BADDR + MINI_UART_CONFIG_BOFF
|
164 |
|
|
#define MINI_UART_CONFIG (*(volatile uint8_t *const) (MINI_UART_CONFIG_BADDR))
|
165 |
|
|
#define MINI_UART_CONFIG_LOOW 0x7
|
166 |
|
|
#define MINI_UART_CONFIG_EFSS 0x4
|
167 |
|
|
#define MINI_UART_CONFIG_OUTD 0x3
|
168 |
|
|
#define MINI_UART_CONFIG_SRES 0x2
|
169 |
|
|
#define MINI_UART_CONFIG_ID 0x1
|
170 |
|
|
#define MINI_UART_CONFIG_INTA 0x0
|
171 |
|
|
|
172 |
|
|
#define MINI_UART_CFG_BOFF 3
|
173 |
|
|
#define MINI_UART_CFG_BADDR MINI_UART_BADDR + MINI_UART_CFG_BOFF
|
174 |
|
|
#define MINI_UART_CFG (*(volatile uint8_t *const) (MINI_UART_CFG_BADDR))
|
175 |
|
|
#define MINI_UART_CFG_PARENA 0x7
|
176 |
|
|
#define MINI_UART_CFG_ODD 0x6
|
177 |
|
|
#define MINI_UART_CFG_STOP 0x5
|
178 |
|
|
#define MINI_UART_CFG_TRCTRL 0x4
|
179 |
|
|
#define MINI_UART_CFG_MSGLEN_3 0x3
|
180 |
|
|
#define MINI_UART_CFG_MSGLEN_2 0x2
|
181 |
|
|
#define MINI_UART_CFG_MSGLEN_1 0x1
|
182 |
|
|
#define MINI_UART_CFG_MSGLEN_0 0x0
|
183 |
|
|
|
184 |
|
|
#define MINI_UART_CMD_BOFF 8
|
185 |
|
|
#define MINI_UART_CMD_BADDR MINI_UART_BADDR + MINI_UART_CMD_BOFF
|
186 |
|
|
#define MINI_UART_CMD (*(volatile uint8_t *const) (MINI_UART_CMD_BADDR))
|
187 |
|
|
#define MINI_UART_CMD_ERRI 0x7
|
188 |
|
|
#define MINI_UART_CMD_EI 0x6
|
189 |
|
|
#define MINI_UART_CMD_AA_2 0x5
|
190 |
|
|
#define MINI_UART_CMD_AA_1 0x4
|
191 |
|
|
#define MINI_UART_CMD_AA_0 0x3
|
192 |
|
|
#define MINI_UART_CMD_ES_1 0x2
|
193 |
|
|
#define MINI_UART_CMD_ES_0 0x1
|
194 |
|
|
|
195 |
|
|
#define MINI_UART_MSG_BOFF 6
|
196 |
|
|
#define MINI_UART_MSG_BADDR MINI_UART_BADDR + MINI_UART_MSG_BOFF
|
197 |
|
|
#define MINI_UART_MSG (*(volatile uint16_t *const) (MINI_UART_MSG_BADDR))
|
198 |
|
|
|
199 |
|
|
#define MINI_UART_UBRS_L_BOFF 4
|
200 |
|
|
#define MINI_UART_UBRS_L_BADDR MINI_UART_BADDR + MINI_UART_UBRS_L_BOFF
|
201 |
|
|
#define MINI_UART_UBRS_L (*(volatile uint8_t *const) (MINI_UART_UBRS_L_BADDR))
|
202 |
|
|
|
203 |
|
|
#define MINI_UART_UBRS_H_BOFF 5
|
204 |
|
|
#define MINI_UART_UBRS_H_BADDR MINI_UART_BADDR + MINI_UART_UBRS_H_BOFF
|
205 |
|
|
#define MINI_UART_UBRS_H (*(volatile uint8_t *const) (MINI_UART_UBRS_H_BADDR))
|
206 |
|
|
|
207 |
|
|
/* Breakpoint Module register definitions */
|
208 |
|
|
#define BREAKPOINT_SIZE 32
|
209 |
|
|
#define BREAKPOINT_BADDR ((uint16_t)-160)
|
210 |
|
|
|
211 |
|
|
#define BREAKPOINT_STATUS_BOFF 0
|
212 |
|
|
#define BREAKPOINT_STATUS_BADDR BREAKPOINT_BADDR + BREAKPOINT_STATUS_BOFF
|
213 |
|
|
#define BREAKPOINT_STATUS (*(volatile uint8_t *const) (BREAKPOINT_STATUS_BADDR))
|
214 |
|
|
#define BREAKPOINT_STATUS_LOOR 0x7
|
215 |
|
|
#define BREAKPOINT_STATUS_FSS 0x4
|
216 |
|
|
#define BREAKPOINT_STATUS_BUSY 0x3
|
217 |
|
|
#define BREAKPOINT_STATUS_ERR 0x2
|
218 |
|
|
#define BREAKPOINT_STATUS_RDY 0x1
|
219 |
|
|
#define BREAKPOINT_STATUS_INT 0x0
|
220 |
|
|
|
221 |
|
|
#define BREAKPOINT_STATUS_C_BOFF 1
|
222 |
|
|
#define BREAKPOINT_STATUS_C_BADDR BREAKPOINT_BADDR + BREAKPOINT_STATUS_C_BOFF
|
223 |
|
|
#define BREAKPOINT_STATUS_C (*(volatile uint8_t *const) (BREAKPOINT_STATUS_C_BADDR))
|
224 |
|
|
#define BREAKPOINT_STATUS_C_FE 0x6
|
225 |
|
|
#define BREAKPOINT_STATUS_C_PE 0x5
|
226 |
|
|
#define BREAKPOINT_STATUS_C_EF 0x4
|
227 |
|
|
#define BREAKPOINT_STATUS_C_OV 0x3
|
228 |
|
|
#define BREAKPOINT_STATUS_C_RBR 0x2
|
229 |
|
|
#define BREAKPOINT_STATUS_C_TBR 0x1
|
230 |
|
|
|
231 |
|
|
#define BREAKPOINT_CONFIG_BOFF 2
|
232 |
|
|
#define BREAKPOINT_CONFIG_BADDR BREAKPOINT_BADDR + BREAKPOINT_CONFIG_BOFF
|
233 |
|
|
#define BREAKPOINT_CONFIG (*(volatile uint8_t *const) (BREAKPOINT_CONFIG_BADDR))
|
234 |
|
|
#define BREAKPOINT_CONFIG_LOOW 0x7
|
235 |
|
|
#define BREAKPOINT_CONFIG_EFSS 0x4
|
236 |
|
|
#define BREAKPOINT_CONFIG_OUTD 0x3
|
237 |
|
|
#define BREAKPOINT_CONFIG_SRES 0x2
|
238 |
|
|
#define BREAKPOINT_CONFIG_ID 0x1
|
239 |
|
|
#define BREAKPOINT_CONFIG_INTA 0x0
|
240 |
|
|
|
241 |
|
|
#define BREAKPOINT_CONFIG_C_BOFF 3
|
242 |
|
|
#define BREAKPOINT_CONFIG_C_BADDR BREAKPOINT_BADDR + BREAKPOINT_CONFIG_C_BOFF
|
243 |
|
|
#define BREAKPOINT_CONFIG_C (*(volatile uint8_t *const) (BREAKPOINT_CONFIG_C_BADDR))
|
244 |
|
|
#define BREAKPOINT_CONFIG_C_EN 0x7
|
245 |
|
|
#define BREAKPOINT_CONFIG_C_STEP_CNT_3 0x6
|
246 |
|
|
#define BREAKPOINT_CONFIG_C_STEP_CNT_2 0x5
|
247 |
|
|
#define BREAKPOINT_CONFIG_C_STEP_CNT_1 0x4
|
248 |
|
|
#define BREAKPOINT_CONFIG_C_STEP_CNT_0 0x3
|
249 |
|
|
#define BREAKPOINT_CONFIG_C_BP_CNT_2 0x2
|
250 |
|
|
#define BREAKPOINT_CONFIG_C_BP_CNT_1 0x1
|
251 |
|
|
#define BREAKPOINT_CONFIG_C_BP_CNT_0 0x0
|
252 |
|
|
|
253 |
|
|
#define BREAKPOINT_BP0_BOFF 4
|
254 |
|
|
#define BREAKPOINT_BP0_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP0_BOFF
|
255 |
|
|
#define BREAKPOINT_BP0 (*(volatile uint16_t *const) (BREAKPOINT_BP0_BADDR))
|
256 |
|
|
|
257 |
|
|
#define BREAKPOINT_BP1_BOFF 8
|
258 |
|
|
#define BREAKPOINT_BP1_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP1_BOFF
|
259 |
|
|
#define BREAKPOINT_BP1 (*(volatile uint16_t *const) (BREAKPOINT_BP1_BADDR))
|
260 |
|
|
|
261 |
|
|
#define BREAKPOINT_BP2_BOFF 12
|
262 |
|
|
#define BREAKPOINT_BP2_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP2_BOFF
|
263 |
|
|
#define BREAKPOINT_BP2 (*(volatile uint16_t *const) (BREAKPOINT_BP2_BADDR))
|
264 |
|
|
|
265 |
|
|
#define BREAKPOINT_BP3_BOFF 16
|
266 |
|
|
#define BREAKPOINT_BP3_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP3_BOFF
|
267 |
|
|
#define BREAKPOINT_BP3 (*(volatile uint16_t *const) (BREAKPOINT_BP3_BADDR))
|
268 |
|
|
|
269 |
|
|
#define BREAKPOINT_BP4_BOFF 20
|
270 |
|
|
#define BREAKPOINT_BP4_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP4_BOFF
|
271 |
|
|
#define BREAKPOINT_BP4 (*(volatile uint16_t *const) (BREAKPOINT_BP4_BADDR))
|
272 |
|
|
|
273 |
|
|
#define BREAKPOINT_BP5_BOFF 24
|
274 |
|
|
#define BREAKPOINT_BP5_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP5_BOFF
|
275 |
|
|
#define BREAKPOINT_BP5 (*(volatile uint16_t *const) (BREAKPOINT_BP5_BADDR))
|
276 |
|
|
|
277 |
|
|
#define BREAKPOINT_BP6_BOFF 28
|
278 |
|
|
#define BREAKPOINT_BP6_BADDR BREAKPOINT_BADDR + BREAKPOINT_BP6_BOFF
|
279 |
|
|
#define BREAKPOINT_BP6 (*(volatile uint16_t *const) (BREAKPOINT_BP6_BADDR))
|
280 |
|
|
|
281 |
|
|
/* Watchpoint Module register definitions */
|
282 |
|
|
#define WATCHPOINT_SIZE 32
|
283 |
|
|
#define WATCHPOINT_BADDR ((uint16_t)-192)
|
284 |
|
|
|
285 |
|
|
#define WATCHPOINT_STATUS_BOFF 0
|
286 |
|
|
#define WATCHPOINT_STATUS_BADDR WATCHPOINT_BADDR + WATCHPOINT_STATUS_BOFF
|
287 |
|
|
#define WATCHPOINT_STATUS (*(volatile uint8_t *const) (WATCHPOINT_STATUS_BADDR))
|
288 |
|
|
#define WATCHPOINT_STATUS_LOOR 0x7
|
289 |
|
|
#define WATCHPOINT_STATUS_FSS 0x4
|
290 |
|
|
#define WATCHPOINT_STATUS_BUSY 0x3
|
291 |
|
|
#define WATCHPOINT_STATUS_ERR 0x2
|
292 |
|
|
#define WATCHPOINT_STATUS_RDY 0x1
|
293 |
|
|
#define WATCHPOINT_STATUS_INT 0x0
|
294 |
|
|
|
295 |
|
|
#define WATCHPOINT_STATUS_C_BOFF 1
|
296 |
|
|
#define WATCHPOINT_STATUS_C_BADDR WATCHPOINT_BADDR + WATCHPOINT_STATUS_C_BOFF
|
297 |
|
|
#define WATCHPOINT_STATUS_C (*(volatile uint8_t *const) (WATCHPOINT_STATUS_C_BADDR))
|
298 |
|
|
#define WATCHPOINT_STATUS_C_FE 0x6
|
299 |
|
|
#define WATCHPOINT_STATUS_C_PE 0x5
|
300 |
|
|
#define WATCHPOINT_STATUS_C_EF 0x4
|
301 |
|
|
#define WATCHPOINT_STATUS_C_OV 0x3
|
302 |
|
|
#define WATCHPOINT_STATUS_C_RBR 0x2
|
303 |
|
|
#define WATCHPOINT_STATUS_C_TBR 0x1
|
304 |
|
|
|
305 |
|
|
#define WATCHPOINT_CONFIG_BOFF 2
|
306 |
|
|
#define WATCHPOINT_CONFIG_BADDR WATCHPOINT_BADDR + WATCHPOINT_CONFIG_BOFF
|
307 |
|
|
#define WATCHPOINT_CONFIG (*(volatile uint8_t *const) (WATCHPOINT_CONFIG_BADDR))
|
308 |
|
|
#define WATCHPOINT_CONFIG_LOOW 0x7
|
309 |
|
|
#define WATCHPOINT_CONFIG_EFSS 0x4
|
310 |
|
|
#define WATCHPOINT_CONFIG_OUTD 0x3
|
311 |
|
|
#define WATCHPOINT_CONFIG_SRES 0x2
|
312 |
|
|
#define WATCHPOINT_CONFIG_ID 0x1
|
313 |
|
|
#define WATCHPOINT_CONFIG_INTA 0x0
|
314 |
|
|
|
315 |
|
|
#define WATCHPOINT_CONFIG_C_BOFF 3
|
316 |
|
|
#define WATCHPOINT_CONFIG_C_BADDR WATCHPOINT_BADDR + WATCHPOINT_CONFIG_C_BOFF
|
317 |
|
|
#define WATCHPOINT_CONFIG_C (*(volatile uint8_t *const) (WATCHPOINT_CONFIG_C_BADDR))
|
318 |
|
|
#define WATCHPOINT_CONFIG_C_WRITE_2 0x5
|
319 |
|
|
#define WATCHPOINT_CONFIG_C_READ_2 0x4
|
320 |
|
|
#define WATCHPOINT_CONFIG_C_WRITE_1 0x3
|
321 |
|
|
#define WATCHPOINT_CONFIG_C_READ_1 0x2
|
322 |
|
|
#define WATCHPOINT_CONFIG_C_WRITE_0 0x1
|
323 |
|
|
#define WATCHPOINT_CONFIG_C_READ_0 0x0
|
324 |
|
|
|
325 |
|
|
#define WATCHPOINT_ACCESS_ADDR_BOFF 4
|
326 |
|
|
#define WATCHPOINT_ACCESS_ADDR_BADDR WATCHPOINT_BADDR + WATCHPOINT_ACCESS_ADDR_BOFF
|
327 |
|
|
#define WATCHPOINT_ACCESS_ADDR (*(volatile uint16_t *const) (WATCHPOINT_ACCESS_ADDR_BADDR))
|
328 |
|
|
|
329 |
|
|
#define WATCHPOINT_ADDR0_BOFF 8
|
330 |
|
|
#define WATCHPOINT_ADDR0_BADDR WATCHPOINT_BADDR + WATCHPOINT_ADDR0_BOFF
|
331 |
|
|
#define WATCHPOINT_ADDR0 (*(volatile uint16_t *const) (WATCHPOINT_ADDR0_BADDR))
|
332 |
|
|
|
333 |
|
|
#define WATCHPOINT_MASK0_BOFF 12
|
334 |
|
|
#define WATCHPOINT_MASK0_BADDR WATCHPOINT_BADDR + WATCHPOINT_MASK0_BOFF
|
335 |
|
|
#define WATCHPOINT_MASK0 (*(volatile uint16_t *const) (WATCHPOINT_MASK0_BADDR))
|
336 |
|
|
|
337 |
|
|
#define WATCHPOINT_ADDR1_BOFF 16
|
338 |
|
|
#define WATCHPOINT_ADDR1_BADDR WATCHPOINT_BADDR + WATCHPOINT_ADDR1_BOFF
|
339 |
|
|
#define WATCHPOINT_ADDR1 (*(volatile uint16_t *const) (WATCHPOINT_ADDR1_BADDR))
|
340 |
|
|
|
341 |
|
|
#define WATCHPOINT_MASK1_BOFF 20
|
342 |
|
|
#define WATCHPOINT_MASK1_BADDR WATCHPOINT_BADDR + WATCHPOINT_MASK1_BOFF
|
343 |
|
|
#define WATCHPOINT_MASK1 (*(volatile uint16_t *const) (WATCHPOINT_MASK1_BADDR))
|
344 |
|
|
|
345 |
|
|
#define WATCHPOINT_ADDR2_BOFF 24
|
346 |
|
|
#define WATCHPOINT_ADDR2_BADDR WATCHPOINT_BADDR + WATCHPOINT_ADDR2_BOFF
|
347 |
|
|
#define WATCHPOINT_ADDR2 (*(volatile uint16_t *const) (WATCHPOINT_ADDR2_BADDR))
|
348 |
|
|
|
349 |
|
|
#define WATCHPOINT_MASK2_BOFF 28
|
350 |
|
|
#define WATCHPOINT_MASK2_BADDR WATCHPOINT_BADDR + WATCHPOINT_MASK2_BOFF
|
351 |
|
|
#define WATCHPOINT_MASK2 (*(volatile uint16_t *const) (WATCHPOINT_MASK2_BADDR))
|
352 |
|
|
|
353 |
|
|
/* 7-segment Display Module register definitions */
|
354 |
|
|
#define DISP7SEG_SIZE 8
|
355 |
|
|
#define DISP7SEG_BADDR ((uint16_t)-288)
|
356 |
|
|
|
357 |
|
|
#define DISP7SEG_STATUS_BOFF 0
|
358 |
|
|
#define DISP7SEG_STATUS_BADDR DISP7SEG_BADDR + DISP7SEG_STATUS_BOFF
|
359 |
|
|
#define DISP7SEG_STATUS (*(volatile uint8_t *const) (DISP7SEG_STATUS_BADDR))
|
360 |
|
|
#define DISP7SEG_STATUS_LOOR 0x7
|
361 |
|
|
#define DISP7SEG_STATUS_FSS 0x4
|
362 |
|
|
#define DISP7SEG_STATUS_BUSY 0x3
|
363 |
|
|
#define DISP7SEG_STATUS_ERR 0x2
|
364 |
|
|
#define DISP7SEG_STATUS_RDY 0x1
|
365 |
|
|
#define DISP7SEG_STATUS_INT 0x0
|
366 |
|
|
|
367 |
|
|
#define DISP7SEG_CONFIG_BOFF 2
|
368 |
|
|
#define DISP7SEG_CONFIG_BADDR DISP7SEG_BADDR + DISP7SEG_CONFIG_BOFF
|
369 |
|
|
#define DISP7SEG_CONFIG (*(volatile uint8_t *const) (DISP7SEG_CONFIG_BADDR))
|
370 |
|
|
#define DISP7SEG_CONFIG_LOOW 0x7
|
371 |
|
|
#define DISP7SEG_CONFIG_EFSS 0x4
|
372 |
|
|
#define DISP7SEG_CONFIG_OUTD 0x3
|
373 |
|
|
#define DISP7SEG_CONFIG_SRES 0x2
|
374 |
|
|
#define DISP7SEG_CONFIG_ID 0x1
|
375 |
|
|
#define DISP7SEG_CONFIG_INTA 0x0
|
376 |
|
|
|
377 |
|
|
#define DISP7SEG_PRESC_L_BOFF 4
|
378 |
|
|
#define DISP7SEG_PRESC_L_BADDR DISP7SEG_BADDR + DISP7SEG_PRESC_L_BOFF
|
379 |
|
|
#define DISP7SEG_PRESC_L (*(volatile uint8_t *const) (DISP7SEG_PRESC_L_BADDR))
|
380 |
|
|
|
381 |
|
|
#define DISP7SEG_PRESC_H_BOFF 5
|
382 |
|
|
#define DISP7SEG_PRESC_H_BADDR DISP7SEG_BADDR + DISP7SEG_PRESC_H_BOFF
|
383 |
|
|
#define DISP7SEG_PRESC_H (*(volatile uint8_t *const) (DISP7SEG_PRESC_H_BADDR))
|
384 |
|
|
|
385 |
|
|
#define DISP7SEG_DISPLAY_BOFF 6
|
386 |
|
|
#define DISP7SEG_DISPLAY_BADDR DISP7SEG_BADDR + DISP7SEG_DISPLAY_BOFF
|
387 |
|
|
#define DISP7SEG_DISPLAY (*(volatile uint8_t *const) (DISP7SEG_DISPLAY_BADDR))
|
388 |
|
|
|
389 |
|
|
#define DISP7SEG_LED_BOFF 7
|
390 |
|
|
#define DISP7SEG_LED_BADDR DISP7SEG_BADDR + DISP7SEG_LED_BOFF
|
391 |
|
|
#define DISP7SEG_LED (*(volatile uint8_t *const) (DISP7SEG_LED_BADDR))
|
392 |
|
|
|
393 |
|
|
#endif
|
394 |
|
|
|