Contiki 2.5
at86rf230_registermap.h
Go to the documentation of this file.
1 /**
2  * @file
3  * @brief This file contains the register definitions for the AT86RF230.
4  * $Id: at86rf230_registermap.h,v 1.2 2010/03/02 16:29:59 dak664 Exp $
5  */
6 /* Copyright (c) 2008, Swedish Institute of Computer Science
7  All rights reserved.
8 
9  Additional fixes for AVR contributed by:
10 
11  Colin O'Flynn coflynn@newae.com
12  Eric Gnoske egnoske@gmail.com
13  Blake Leverett bleverett@gmail.com
14  Mike Vidales mavida404@gmail.com
15  Kevin Brown kbrown3@uccs.edu
16  Nate Bohlmann nate@elfwerks.com
17 
18  All rights reserved.
19 
20  Redistribution and use in source and binary forms, with or without
21  modification, are permitted provided that the following conditions are met:
22 
23  * Redistributions of source code must retain the above copyright
24  notice, this list of conditions and the following disclaimer.
25  * Redistributions in binary form must reproduce the above copyright
26  notice, this list of conditions and the following disclaimer in
27  the documentation and/or other materials provided with the
28  distribution.
29  * Neither the name of the copyright holders nor the names of
30  contributors may be used to endorse or promote products derived
31  from this software without specific prior written permission.
32 
33  THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
34  AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
35  IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
36  ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE
37  LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
38  CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
39  SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
40  INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
41  CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
42  ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
43  POSSIBILITY OF SUCH DAMAGE.
44 */
45 
46 #ifndef PHY230_REGISTERMAP_EXTERNAL_H
47 #define PHY230_REGISTERMAP_EXTERNAL_H
48 
49 #define HAVE_REGISTER_MAP (1)
50 /** Offset for register TRX_STATUS */
51 #define RG_TRX_STATUS (0x01)
52 /** Access parameters for sub-register CCA_DONE in register @ref RG_TRX_STATUS */
53 #define SR_CCA_DONE 0x01, 0x80, 7
54 /** Access parameters for sub-register CCA_STATUS in register @ref RG_TRX_STATUS */
55 #define SR_CCA_STATUS 0x01, 0x40, 6
56 #define SR_reserved_01_3 0x01, 0x20, 5
57 /** Access parameters for sub-register TRX_STATUS in register @ref RG_TRX_STATUS */
58 #define SR_TRX_STATUS 0x01, 0x1f, 0
59 /** Constant P_ON for sub-register @ref SR_TRX_STATUS */
60 #define P_ON (0)
61 /** Constant BUSY_RX for sub-register @ref SR_TRX_STATUS */
62 #define BUSY_RX (1)
63 /** Constant BUSY_TX for sub-register @ref SR_TRX_STATUS */
64 #define BUSY_TX (2)
65 /** Constant RX_ON for sub-register @ref SR_TRX_STATUS */
66 #define RX_ON (6)
67 /** Constant TRX_OFF for sub-register @ref SR_TRX_STATUS */
68 #define TRX_OFF (8)
69 /** Constant PLL_ON for sub-register @ref SR_TRX_STATUS */
70 #define PLL_ON (9)
71 /** Constant SLEEP for sub-register @ref SR_TRX_STATUS */
72 #define SLEEP (15)
73 /** Constant BUSY_RX_AACK for sub-register @ref SR_TRX_STATUS */
74 #define BUSY_RX_AACK (17)
75 /** Constant BUSY_TX_ARET for sub-register @ref SR_TRX_STATUS */
76 #define BUSY_TX_ARET (18)
77 /** Constant RX_AACK_ON for sub-register @ref SR_TRX_STATUS */
78 #define RX_AACK_ON (22)
79 /** Constant TX_ARET_ON for sub-register @ref SR_TRX_STATUS */
80 #define TX_ARET_ON (25)
81 /** Constant RX_ON_NOCLK for sub-register @ref SR_TRX_STATUS */
82 #define RX_ON_NOCLK (28)
83 /** Constant RX_AACK_ON_NOCLK for sub-register @ref SR_TRX_STATUS */
84 #define RX_AACK_ON_NOCLK (29)
85 /** Constant BUSY_RX_AACK_NOCLK for sub-register @ref SR_TRX_STATUS */
86 #define BUSY_RX_AACK_NOCLK (30)
87 /** Constant STATE_TRANSITION for sub-register @ref SR_TRX_STATUS */
88 #define STATE_TRANSITION (31)
89 /** Offset for register TRX_STATE */
90 #define RG_TRX_STATE (0x02)
91 /** Access parameters for sub-register TRAC_STATUS in register @ref RG_TRX_STATE */
92 #define SR_TRAC_STATUS 0x02, 0xe0, 5
93 /** Access parameters for sub-register TRX_CMD in register @ref RG_TRX_STATE */
94 #define SR_TRX_CMD 0x02, 0x1f, 0
95 /** Constant CMD_NOP for sub-register @ref SR_TRX_CMD */
96 #define CMD_NOP (0)
97 /** Constant CMD_TX_START for sub-register @ref SR_TRX_CMD */
98 #define CMD_TX_START (2)
99 /** Constant CMD_FORCE_TRX_OFF for sub-register @ref SR_TRX_CMD */
100 #define CMD_FORCE_TRX_OFF (3)
101 /** Constant CMD_RX_ON for sub-register @ref SR_TRX_CMD */
102 #define CMD_RX_ON (6)
103 /** Constant CMD_TRX_OFF for sub-register @ref SR_TRX_CMD */
104 #define CMD_TRX_OFF (8)
105 /** Constant CMD_PLL_ON for sub-register @ref SR_TRX_CMD */
106 #define CMD_PLL_ON (9)
107 /** Constant CMD_RX_AACK_ON for sub-register @ref SR_TRX_CMD */
108 #define CMD_RX_AACK_ON (22)
109 /** Constant CMD_TX_ARET_ON for sub-register @ref SR_TRX_CMD */
110 #define CMD_TX_ARET_ON (25)
111 /** Offset for register TRX_CTRL_0 */
112 #define RG_TRX_CTRL_0 (0x03)
113 /** Offset for register TRX_CTRL_1 */
114 #define RG_TRX_CTRL_1 (0x04)
115 /** Access parameters for sub-register PAD_IO in register @ref RG_TRX_CTRL_0 */
116 #define SR_PAD_IO 0x03, 0xc0, 6
117 /** Access parameters for sub-register PAD_IO_CLKM in register @ref RG_TRX_CTRL_0 */
118 #define SR_PAD_IO_CLKM 0x03, 0x30, 4
119 /** Constant CLKM_2mA for sub-register @ref SR_PAD_IO_CLKM */
120 #define CLKM_2mA (0)
121 /** Constant CLKM_4mA for sub-register @ref SR_PAD_IO_CLKM */
122 #define CLKM_4mA (1)
123 /** Constant CLKM_6mA for sub-register @ref SR_PAD_IO_CLKM */
124 #define CLKM_6mA (2)
125 /** Constant CLKM_8mA for sub-register @ref SR_PAD_IO_CLKM */
126 #define CLKM_8mA (3)
127 /** Access parameters for sub-register CLKM_SHA_SEL in register @ref RG_TRX_CTRL_0 */
128 #define SR_CLKM_SHA_SEL 0x03, 0x08, 3
129 /** Access parameters for sub-register CLKM_CTRL in register @ref RG_TRX_CTRL_0 */
130 #define SR_CLKM_CTRL 0x03, 0x07, 0
131 /** Constant CLKM_no_clock for sub-register @ref SR_CLKM_CTRL */
132 #define CLKM_no_clock (0)
133 /** Constant CLKM_1MHz for sub-register @ref SR_CLKM_CTRL */
134 #define CLKM_1MHz (1)
135 /** Constant CLKM_2MHz for sub-register @ref SR_CLKM_CTRL */
136 #define CLKM_2MHz (2)
137 /** Constant CLKM_4MHz for sub-register @ref SR_CLKM_CTRL */
138 #define CLKM_4MHz (3)
139 /** Constant CLKM_8MHz for sub-register @ref SR_CLKM_CTRL */
140 #define CLKM_8MHz (4)
141 /** Constant CLKM_16MHz for sub-register @ref SR_CLKM_CTRL */
142 #define CLKM_16MHz (5)
143 /** Offset for register PHY_TX_PWR */
144 #define RG_PHY_TX_PWR (0x05)
145 /** Access parameters for sub-register TX_AUTO_CRC_ON in register @ref RG_PHY_TX_PWR */
146 #define SR_TX_AUTO_CRC_ON 0x05, 0x80, 7
147 #define SR_reserved_05_2 0x05, 0x70, 4
148 /** Access parameters for sub-register TX_PWR in register @ref RG_PHY_TX_PWR */
149 #define SR_TX_PWR 0x05, 0x0f, 0
150 /** Offset for register PHY_RSSI */
151 #define RG_PHY_RSSI (0x06)
152 #define SR_reserved_06_1 0x06, 0xe0, 5
153 /** Access parameters for sub-register RSSI in register @ref RG_PHY_RSSI */
154 #define SR_RSSI 0x06, 0x1f, 0
155 /** Offset for register PHY_ED_LEVEL */
156 #define RG_PHY_ED_LEVEL (0x07)
157 /** Access parameters for sub-register ED_LEVEL in register @ref RG_PHY_ED_LEVEL */
158 #define SR_ED_LEVEL 0x07, 0xff, 0
159 /** Offset for register PHY_CC_CCA */
160 #define RG_PHY_CC_CCA (0x08)
161 /** Access parameters for sub-register CCA_REQUEST in register @ref RG_PHY_CC_CCA */
162 #define SR_CCA_REQUEST 0x08, 0x80, 7
163 /** Access parameters for sub-register CCA_MODE in register @ref RG_PHY_CC_CCA */
164 #define SR_CCA_MODE 0x08, 0x60, 5
165 /** Access parameters for sub-register CHANNEL in register @ref RG_PHY_CC_CCA */
166 #define SR_CHANNEL 0x08, 0x1f, 0
167 /** Offset for register CCA_THRES */
168 #define RG_CCA_THRES (0x09)
169 /** Access parameters for sub-register CCA_CS_THRES in register @ref RG_CCA_THRES */
170 #define SR_CCA_CS_THRES 0x09, 0xf0, 4
171 /** Access parameters for sub-register CCA_ED_THRES in register @ref RG_CCA_THRES */
172 #define SR_CCA_ED_THRES 0x09, 0x0f, 0
173 /** Offset for register IRQ_MASK */
174 #define RG_IRQ_MASK (0x0e)
175 /** Access parameters for sub-register IRQ_MASK in register @ref RG_IRQ_MASK */
176 #define SR_IRQ_MASK 0x0e, 0xff, 0
177 /** Offset for register IRQ_STATUS */
178 #define RG_IRQ_STATUS (0x0f)
179 /** Access parameters for sub-register IRQ_7_BAT_LOW in register @ref RG_IRQ_STATUS */
180 #define SR_IRQ_7_BAT_LOW 0x0f, 0x80, 7
181 /** Access parameters for sub-register IRQ_6_TRX_UR in register @ref RG_IRQ_STATUS */
182 #define SR_IRQ_6_TRX_UR 0x0f, 0x40, 6
183 /** Access parameters for sub-register IRQ_5 in register @ref RG_IRQ_STATUS */
184 #define SR_IRQ_5 0x0f, 0x20, 5
185 /** Access parameters for sub-register IRQ_4 in register @ref RG_IRQ_STATUS */
186 #define SR_IRQ_4 0x0f, 0x10, 4
187 /** Access parameters for sub-register IRQ_3_TRX_END in register @ref RG_IRQ_STATUS */
188 #define SR_IRQ_3_TRX_END 0x0f, 0x08, 3
189 /** Access parameters for sub-register IRQ_2_RX_START in register @ref RG_IRQ_STATUS */
190 #define SR_IRQ_2_RX_START 0x0f, 0x04, 2
191 /** Access parameters for sub-register IRQ_1_PLL_UNLOCK in register @ref RG_IRQ_STATUS */
192 #define SR_IRQ_1_PLL_UNLOCK 0x0f, 0x02, 1
193 /** Access parameters for sub-register IRQ_0_PLL_LOCK in register @ref RG_IRQ_STATUS */
194 #define SR_IRQ_0_PLL_LOCK 0x0f, 0x01, 0
195 /** Offset for register VREG_CTRL */
196 #define RG_VREG_CTRL (0x10)
197 /** Access parameters for sub-register AVREG_EXT in register @ref RG_VREG_CTRL */
198 #define SR_AVREG_EXT 0x10, 0x80, 7
199 /** Access parameters for sub-register AVDD_OK in register @ref RG_VREG_CTRL */
200 #define SR_AVDD_OK 0x10, 0x40, 6
201 /** Access parameters for sub-register AVREG_TRIM in register @ref RG_VREG_CTRL */
202 #define SR_AVREG_TRIM 0x10, 0x30, 4
203 /** Constant AVREG_1_80V for sub-register @ref SR_AVREG_TRIM */
204 #define AVREG_1_80V (0)
205 /** Constant AVREG_1_75V for sub-register @ref SR_AVREG_TRIM */
206 #define AVREG_1_75V (1)
207 /** Constant AVREG_1_84V for sub-register @ref SR_AVREG_TRIM */
208 #define AVREG_1_84V (2)
209 /** Constant AVREG_1_88V for sub-register @ref SR_AVREG_TRIM */
210 #define AVREG_1_88V (3)
211 /** Access parameters for sub-register DVREG_EXT in register @ref RG_VREG_CTRL */
212 #define SR_DVREG_EXT 0x10, 0x08, 3
213 /** Access parameters for sub-register DVDD_OK in register @ref RG_VREG_CTRL */
214 #define SR_DVDD_OK 0x10, 0x04, 2
215 /** Access parameters for sub-register DVREG_TRIM in register @ref RG_VREG_CTRL */
216 #define SR_DVREG_TRIM 0x10, 0x03, 0
217 /** Constant DVREG_1_80V for sub-register @ref SR_DVREG_TRIM */
218 #define DVREG_1_80V (0)
219 /** Constant DVREG_1_75V for sub-register @ref SR_DVREG_TRIM */
220 #define DVREG_1_75V (1)
221 /** Constant DVREG_1_84V for sub-register @ref SR_DVREG_TRIM */
222 #define DVREG_1_84V (2)
223 /** Constant DVREG_1_88V for sub-register @ref SR_DVREG_TRIM */
224 #define DVREG_1_88V (3)
225 /** Offset for register BATMON */
226 #define RG_BATMON (0x11)
227 #define SR_reserved_11_1 0x11, 0xc0, 6
228 /** Access parameters for sub-register BATMON_OK in register @ref RG_BATMON */
229 #define SR_BATMON_OK 0x11, 0x20, 5
230 /** Access parameters for sub-register BATMON_HR in register @ref RG_BATMON */
231 #define SR_BATMON_HR 0x11, 0x10, 4
232 /** Access parameters for sub-register BATMON_VTH in register @ref RG_BATMON */
233 #define SR_BATMON_VTH 0x11, 0x0f, 0
234 /** Offset for register XOSC_CTRL */
235 #define RG_XOSC_CTRL (0x12)
236 /** Offset for register RX_SYN */
237 #define RG_RX_SYN 0x15
238 /** Offset for register XAH_CTRL_1 */
239 #define RG_XAH_CTRL_1 0x17
240 /** Access parameters for sub-register XTAL_MODE in register @ref RG_XOSC_CTRL */
241 #define SR_XTAL_MODE 0x12, 0xf0, 4
242 /** Access parameters for sub-register XTAL_TRIM in register @ref RG_XOSC_CTRL */
243 #define SR_XTAL_TRIM 0x12, 0x0f, 0
244 /** Offset for register FTN_CTRL */
245 #define RG_FTN_CTRL (0x18)
246 /** Access parameters for sub-register FTN_START in register @ref RG_FTN_CTRL */
247 #define SR_FTN_START 0x18, 0x80, 7
248 #define SR_reserved_18_2 0x18, 0x40, 6
249 /** Access parameters for sub-register FTNV in register @ref RG_FTN_CTRL */
250 #define SR_FTNV 0x18, 0x3f, 0
251 /** Offset for register PLL_CF */
252 #define RG_PLL_CF (0x1a)
253 /** Access parameters for sub-register PLL_CF_START in register @ref RG_PLL_CF */
254 #define SR_PLL_CF_START 0x1a, 0x80, 7
255 #define SR_reserved_1a_2 0x1a, 0x70, 4
256 /** Access parameters for sub-register PLL_CF in register @ref RG_PLL_CF */
257 #define SR_PLL_CF 0x1a, 0x0f, 0
258 /** Offset for register PLL_DCU */
259 #define RG_PLL_DCU (0x1b)
260 /** Access parameters for sub-register PLL_DCU_START in register @ref RG_PLL_DCU */
261 #define SR_PLL_DCU_START 0x1b, 0x80, 7
262 #define SR_reserved_1b_2 0x1b, 0x40, 6
263 /** Access parameters for sub-register PLL_DCUW in register @ref RG_PLL_DCU */
264 #define SR_PLL_DCUW 0x1b, 0x3f, 0
265 /** Offset for register PART_NUM */
266 #define RG_PART_NUM (0x1c)
267 /** Access parameters for sub-register PART_NUM in register @ref RG_PART_NUM */
268 #define SR_PART_NUM 0x1c, 0xff, 0
269 /** Constant RF230 for sub-register @ref SR_PART_NUM */
270 #define RF230 (2)
271 /** Offset for register VERSION_NUM */
272 #define RG_VERSION_NUM (0x1d)
273 /** Access parameters for sub-register VERSION_NUM in register @ref RG_VERSION_NUM */
274 #define SR_VERSION_NUM 0x1d, 0xff, 0
275 /** Offset for register MAN_ID_0 */
276 #define RG_MAN_ID_0 (0x1e)
277 /** Access parameters for sub-register MAN_ID_0 in register @ref RG_MAN_ID_0 */
278 #define SR_MAN_ID_0 0x1e, 0xff, 0
279 /** Offset for register MAN_ID_1 */
280 #define RG_MAN_ID_1 (0x1f)
281 /** Access parameters for sub-register MAN_ID_1 in register @ref RG_MAN_ID_1 */
282 #define SR_MAN_ID_1 0x1f, 0xff, 0
283 /** Offset for register SHORT_ADDR_0 */
284 #define RG_SHORT_ADDR_0 (0x20)
285 /** Access parameters for sub-register SHORT_ADDR_0 in register @ref RG_SHORT_ADDR_0 */
286 #define SR_SHORT_ADDR_0 0x20, 0xff, 0
287 /** Offset for register SHORT_ADDR_1 */
288 #define RG_SHORT_ADDR_1 (0x21)
289 /** Access parameters for sub-register SHORT_ADDR_1 in register @ref RG_SHORT_ADDR_1 */
290 #define SR_SHORT_ADDR_1 0x21, 0xff, 0
291 /** Offset for register PAN_ID_0 */
292 #define RG_PAN_ID_0 (0x22)
293 /** Access parameters for sub-register PAN_ID_0 in register @ref RG_PAN_ID_0 */
294 #define SR_PAN_ID_0 0x22, 0xff, 0
295 /** Offset for register PAN_ID_1 */
296 #define RG_PAN_ID_1 (0x23)
297 /** Access parameters for sub-register PAN_ID_1 in register @ref RG_PAN_ID_1 */
298 #define SR_PAN_ID_1 0x23, 0xff, 0
299 /** Offset for register IEEE_ADDR_0 */
300 #define RG_IEEE_ADDR_0 (0x24)
301 /** Access parameters for sub-register IEEE_ADDR_0 in register @ref RG_IEEE_ADDR_0 */
302 #define SR_IEEE_ADDR_0 0x24, 0xff, 0
303 /** Offset for register IEEE_ADDR_1 */
304 #define RG_IEEE_ADDR_1 (0x25)
305 /** Access parameters for sub-register IEEE_ADDR_1 in register @ref RG_IEEE_ADDR_1 */
306 #define SR_IEEE_ADDR_1 0x25, 0xff, 0
307 /** Offset for register IEEE_ADDR_2 */
308 #define RG_IEEE_ADDR_2 (0x26)
309 /** Access parameters for sub-register IEEE_ADDR_2 in register @ref RG_IEEE_ADDR_2 */
310 #define SR_IEEE_ADDR_2 0x26, 0xff, 0
311 /** Offset for register IEEE_ADDR_3 */
312 #define RG_IEEE_ADDR_3 (0x27)
313 /** Access parameters for sub-register IEEE_ADDR_3 in register @ref RG_IEEE_ADDR_3 */
314 #define SR_IEEE_ADDR_3 0x27, 0xff, 0
315 /** Offset for register IEEE_ADDR_4 */
316 #define RG_IEEE_ADDR_4 (0x28)
317 /** Access parameters for sub-register IEEE_ADDR_4 in register @ref RG_IEEE_ADDR_4 */
318 #define SR_IEEE_ADDR_4 0x28, 0xff, 0
319 /** Offset for register IEEE_ADDR_5 */
320 #define RG_IEEE_ADDR_5 (0x29)
321 /** Access parameters for sub-register IEEE_ADDR_5 in register @ref RG_IEEE_ADDR_5 */
322 #define SR_IEEE_ADDR_5 0x29, 0xff, 0
323 /** Offset for register IEEE_ADDR_6 */
324 #define RG_IEEE_ADDR_6 (0x2a)
325 /** Access parameters for sub-register IEEE_ADDR_6 in register @ref RG_IEEE_ADDR_6 */
326 #define SR_IEEE_ADDR_6 0x2a, 0xff, 0
327 /** Offset for register IEEE_ADDR_7 */
328 #define RG_IEEE_ADDR_7 (0x2b)
329 /** Access parameters for sub-register IEEE_ADDR_7 in register @ref RG_IEEE_ADDR_7 */
330 #define SR_IEEE_ADDR_7 0x2b, 0xff, 0
331 /** Offset for register XAH_CTRL */
332 #define RG_XAH_CTRL_0 (0x2c)
333 /** Access parameters for sub-register MAX_FRAME_RETRIES in register @ref RG_XAH_CTRL_0 */
334 #define SR_MAX_FRAME_RETRIES 0x2c, 0xf0, 4
335 /** Access parameters for sub-register MAX_CSMA_RETRIES in register @ref RG_XAH_CTRL_0 */
336 #define SR_MAX_CSMA_RETRIES 0x2c, 0x0e, 1
337 #define SR_reserved_2c_3 0x2c, 0x01, 0
338 /** Offset for register CSMA_SEED_0 */
339 #define RG_CSMA_SEED_0 (0x2d)
340 /** Access parameters for sub-register CSMA_SEED_0 in register @ref RG_CSMA_SEED_0 */
341 #define SR_CSMA_SEED_0 0x2d, 0xff, 0
342 /** Offset for register CSMA_SEED_1 */
343 #define RG_CSMA_SEED_1 (0x2e)
344 /** Offset for register CSMA_BE */
345 #define RG_CSMA_BE 0x2f
346 /** Access parameters for sub-register MIN_BE in register @ref RG_CSMA_SEED_1 */
347 #define SR_MIN_BE 0x2e, 0xc0, 6
348 #define SR_reserved_2e_2 0x2e, 0x30, 4
349 /** Access parameters for sub-register I_AM_COORD in register @ref RG_CSMA_SEED_1 */
350 #define SR_I_AM_COORD 0x2e, 0x08, 3
351 /** Access parameters for sub-register CSMA_SEED_1 in register @ref RG_CSMA_SEED_1 */
352 #define SR_CSMA_SEED_1 0x2e, 0x07, 0
353 #endif /* PHY230_REGISTERMAP_EXTERNAL_H */