Loading...
Searching...
No Matches
cc2420_registers.h
Go to the documentation of this file.
1/*
2 * Copyright (C) 2015 Freie Universität Berlin
3 * 2016 Inria
4 *
5 * This file is subject to the terms and conditions of the GNU Lesser
6 * General Public License v2.1. See the file LICENSE in the top level
7 * directory for more details.
8 */
9
21#ifndef CC2420_REGISTERS_H
22#define CC2420_REGISTERS_H
23
24#ifdef __cplusplus
25extern "C" {
26#endif
27
32#define CC2420_OPT_AUTOACK (0x0001)
33#define CC2420_OPT_CSMA (0x0002)
34#define CC2420_OPT_PROMISCUOUS (0x0004)
35#define CC2420_OPT_PRELOADING (0x0008)
42enum {
48};
55enum {
61};
68#define CC2420_REG_WRITE (0x00)
69#define CC2420_REG_READ (0x40)
70#define CC2420_RAM (0x80)
71#define CC2420_RAM_WRITE (0x00)
72#define CC2420_RAM_READ (0x20)
73#define CC2420_FIFO_READ (CC2420_REG_RXFIFO | CC2420_REG_READ)
74#define CC2420_FIFO_WRITE (CC2420_REG_TXFIFO | CC2420_REG_WRITE)
82#define CC2420_STROBE_NOP (0x00)
83#define CC2420_STROBE_XOSCON (0x01)
84#define CC2420_STROBE_TXCAL (0x02)
85#define CC2420_STROBE_RXON (0x03)
86#define CC2420_STROBE_TXON (0x04)
87#define CC2420_STROBE_TXONCCA (0x05)
88#define CC2420_STROBE_RFOFF (0x06)
89#define CC2420_STROBE_XOSCOFF (0x07)
90#define CC2420_STROBE_FLUSHRX (0x08)
91#define CC2420_STROBE_FLUSHTX (0x09)
92#define CC2420_STROBE_ACK (0x0A)
93#define CC2420_STROBE_ACKPEND (0x0B)
94#define CC2420_STROBE_RXDEC (0x0C)
95#define CC2420_STROBE_TXENC (0x0D)
96#define CC2420_STROBE_AES (0x0E)
104#define CC2420_REG_MAIN (0x10)
105#define CC2420_REG_MDMCTRL0 (0x11)
106#define CC2420_REG_MDMCTRL1 (0x12)
107#define CC2420_REG_RSSI (0x13)
108#define CC2420_REG_SYNCWORD (0x14)
109#define CC2420_REG_TXCTRL (0x15)
110#define CC2420_REG_RXCTRL0 (0x16)
111#define CC2420_REG_RXCTRL1 (0x17)
112#define CC2420_REG_FSCTRL (0x18)
113#define CC2420_REG_SECCTRL0 (0x19)
114#define CC2420_REG_SECCTRL1 (0x1A)
115#define CC2420_REG_BATTMON (0x1B)
116#define CC2420_REG_IOCFG0 (0x1C)
117#define CC2420_REG_IOCFG1 (0x1D)
118#define CC2420_REG_MANFIDL (0x1e)
119#define CC2420_REG_MANFIDH (0x1F)
120#define CC2420_REG_FSMTC (0x20)
121#define CC2420_REG_MANAND (0x21)
122#define CC2420_REG_MANOR (0x22)
123#define CC2420_REG_AGCCTRL (0x23)
124#define CC2420_REG_AGCTST0 (0x24)
125#define CC2420_REG_AGCTST1 (0x25)
126#define CC2420_REG_AGCTST2 (0x26)
127#define CC2420_REG_FSTST0 (0x27)
128#define CC2420_REG_FSTST1 (0x28)
129#define CC2420_REG_FSTST2 (0x29)
130#define CC2420_REG_FSTST3 (0x2A)
131#define CC2420_REG_RXBPFTST (0x2B)
132#define CC2420_REG_FSMSTATE (0x2C)
133#define CC2420_REG_ADCTST (0x2D)
134#define CC2420_REG_DACTST (0x2E)
135#define CC2420_REG_TOPTST (0x2F)
136#define CC2420_REG_TXFIFO (0x3E)
137#define CC2420_REG_RXFIFO (0x3F)
145#define CC2420_RAM_TXFIFO (0x0000)
146#define CC2420_RAM_RXFIFO (0x0080)
147#define CC2420_RAM_KEY0 (0x0100)
148#define CC2420_RAM_RXNONCE (0x0110)
149#define CC2420_RAM_RXCTR (0x0110)
150#define CC2420_RAM_SABUF (0x0120)
151#define CC2420_RAM_KEY1 (0x0130)
152#define CC2420_RAM_TXNONCE (0x0140)
153#define CC2420_RAM_TXCTR (0x0140)
154#define CC2420_RAM_CBCSTATE (0x0150)
155#define CC2420_RAM_IEEEADR (0x0160)
156#define CC2420_RAM_PANID (0x0168)
157#define CC2420_RAM_SHORTADR (0x016A)
165#define CC2420_STATUS_XOSC_STABLE (0x40)
166#define CC2420_STATUS_TX_UNDERFLOW (0x20)
167#define CC2420_STATUS_ENC_BUSY (0x10)
168#define CC2420_STATUS_TX_ACTIVE (0x08)
169#define CC2420_STATUS_PLL_LOCK (0x04)
170#define CC2420_STATUS_RSSI_VALID (0x02)
177#define CC2420_MDMCTRL0_RES_FRM (0x2000
178#define CC2420_MDMCTRL0_ADR_DECODE (0x0800)
179#define CC2420_MDMCTRL0_PAN_COORD (0x1000)
180#define CC2420_MDMCTRL0_AUTOCRC (0x0020)
181#define CC2420_MDMCTRL0_AUTOACK (0x0010)
182#define CC2420_MDMCTRL0_PREAMBLE_M (0x000f)
183#define CC2420_MDMCTRL0_PREAMBLE_3B (0x0002)
190#define CC2420_CRCCOR_CRC_MASK (0x80)
191#define CC2420_CRCCOR_COR_MASK (0x7F)
198#define CC2420_TXCTRL_PA_MASK (0x001f)
205#define CC2420_RXCTRL1_RXBPF_LOCUR (0x2000)
212#define CC2420_FSCTRL_LOCK_THR_MASK (0xc000)
213#define CC2420_FSCTRL_CAL_DONE (0x2000)
214#define CC2420_FSCTRL_CAL_RUNNING (0x1000)
215#define CC2420_FSCTRL_LOCK_LENGTH (0x0800)
216#define CC2420_FSCTRL_LOCK_STATUS (0x0400)
217#define CC2420_FSCTRL_FREQ_MASK (0x03ff)
224#define CC2420_SECCTRL0_RXFIFO_PROT (0x0200)
231#define CC2420_MANFIDL_VAL (0x233d)
238#define CC2420_MANFIDH_VAL (0x3000)
241#ifdef __cplusplus
242}
243#endif
244
245#endif /* CC2420_REGISTERS_H */
@ CC2420_GOTO_PD
power down
@ CC2420_GOTO_RX
receive state
@ CC2420_GOTO_IDLE
idle
@ CC2420_GOTO_TXONCCA
transmit packet using CCA
@ CC2420_GOTO_TXON
transmit packet without CCA
@ CC2420_STATE_IDLE
idle state
@ CC2420_STATE_RX_OVERFLOW
receive buffer overflow
@ CC2420_STATE_PD
power down
@ CC2420_STATE_TX_PRE
transmitting preamble
@ CC2420_STATE_RX_SEARCH
receive SFD search