Register and command definitions for CC2420. More...
Register and command definitions for CC2420.
Definition in file cc2420_registers.h.
Go to the source code of this file.
Internal device option flags | |
#define | CC2420_OPT_AUTOACK (0x0001) |
auto ACKs active | |
#define | CC2420_OPT_CSMA (0x0002) |
CSMA active. | |
#define | CC2420_OPT_PROMISCUOUS (0x0004) |
promiscuous mode active | |
#define | CC2420_OPT_PRELOADING (0x0008) |
preloading enabled | |
CC2420 SPI commands | |
#define | CC2420_REG_WRITE (0x00) |
read register value | |
#define | CC2420_REG_READ (0x40) |
write register value | |
#define | CC2420_RAM (0x80) |
access the internal RAM | |
#define | CC2420_RAM_WRITE (0x00) |
write to RAM | |
#define | CC2420_RAM_READ (0x20) |
read from RAM | |
#define | CC2420_FIFO_READ (CC2420_REG_RXFIFO | CC2420_REG_READ) |
#define | CC2420_FIFO_WRITE (CC2420_REG_TXFIFO | CC2420_REG_WRITE) |
CC2420 strobe commands | |
| |
#define | CC2420_STROBE_NOP (0x00) |
no operation | |
#define | CC2420_STROBE_XOSCON (0x01) |
turn transceiver on | |
#define | CC2420_STROBE_TXCAL (0x02) |
calibrate TX freq and wait | |
#define | CC2420_STROBE_RXON (0x03) |
switch to RX mode | |
#define | CC2420_STROBE_TXON (0x04) |
switch to TX mode | |
#define | CC2420_STROBE_TXONCCA (0x05) |
switch to TX after CCA | |
#define | CC2420_STROBE_RFOFF (0x06) |
switch to IDLE mode | |
#define | CC2420_STROBE_XOSCOFF (0x07) |
power down | |
#define | CC2420_STROBE_FLUSHRX (0x08) |
flush RX FIFO | |
#define | CC2420_STROBE_FLUSHTX (0x09) |
flush TX FIFO | |
#define | CC2420_STROBE_ACK (0x0A) |
send ACK with pending cleared | |
#define | CC2420_STROBE_ACKPEND (0x0B) |
send ACK with pending set | |
#define | CC2420_STROBE_RXDEC (0x0C) |
start RX FIFO decrypt/verify | |
#define | CC2420_STROBE_TXENC (0x0D) |
start TX FIFO encrypt/auth | |
#define | CC2420_STROBE_AES (0x0E) |
start AES encryption | |
CC2420 configuration registers | |
| |
#define | CC2420_REG_MAIN (0x10) |
main control | |
#define | CC2420_REG_MDMCTRL0 (0x11) |
modem control 0 | |
#define | CC2420_REG_MDMCTRL1 (0x12) |
modem control 1 | |
#define | CC2420_REG_RSSI (0x13) |
RSSI and CCA control. | |
#define | CC2420_REG_SYNCWORD (0x14) |
synchronization word control | |
#define | CC2420_REG_TXCTRL (0x15) |
transmit control | |
#define | CC2420_REG_RXCTRL0 (0x16) |
receive control 0 | |
#define | CC2420_REG_RXCTRL1 (0x17) |
receive control 1 | |
#define | CC2420_REG_FSCTRL (0x18) |
freq synthesizer control | |
#define | CC2420_REG_SECCTRL0 (0x19) |
security control 0 | |
#define | CC2420_REG_SECCTRL1 (0x1A) |
security control 1 | |
#define | CC2420_REG_BATTMON (0x1B) |
battery monitor control | |
#define | CC2420_REG_IOCFG0 (0x1C) |
I/O control 0. | |
#define | CC2420_REG_IOCFG1 (0x1D) |
I/O control 1. | |
#define | CC2420_REG_MANFIDL (0x1e) |
manufacturer ID low | |
#define | CC2420_REG_MANFIDH (0x1F) |
manufacturer ID high | |
#define | CC2420_REG_FSMTC (0x20) |
FSM timer constants. | |
#define | CC2420_REG_MANAND (0x21) |
manual signal AND override | |
#define | CC2420_REG_MANOR (0x22) |
manual signal OR override | |
#define | CC2420_REG_AGCCTRL (0x23) |
AGC control. | |
#define | CC2420_REG_AGCTST0 (0x24) |
AGC test 0. | |
#define | CC2420_REG_AGCTST1 (0x25) |
AGC test 1. | |
#define | CC2420_REG_AGCTST2 (0x26) |
AGC test 2. | |
#define | CC2420_REG_FSTST0 (0x27) |
freq synthesizer test 0 | |
#define | CC2420_REG_FSTST1 (0x28) |
freq synthesizer test 1 | |
#define | CC2420_REG_FSTST2 (0x29) |
freq synthesizer test 2 | |
#define | CC2420_REG_FSTST3 (0x2A) |
freq synthesizer test 3 | |
#define | CC2420_REG_RXBPFTST (0x2B) |
RX bandpass filter test. | |
#define | CC2420_REG_FSMSTATE (0x2C) |
FSM status. | |
#define | CC2420_REG_ADCTST (0x2D) |
ADC test. | |
#define | CC2420_REG_DACTST (0x2E) |
DAC test. | |
#define | CC2420_REG_TOPTST (0x2F) |
top level test | |
#define | CC2420_REG_TXFIFO (0x3E) |
TX FIFO byte. | |
#define | CC2420_REG_RXFIFO (0x3F) |
RX FIFO byte. | |
CC2420 section address in RAM | |
| |
#define | CC2420_RAM_TXFIFO (0x0000) |
#define | CC2420_RAM_RXFIFO (0x0080) |
#define | CC2420_RAM_KEY0 (0x0100) |
#define | CC2420_RAM_RXNONCE (0x0110) |
#define | CC2420_RAM_RXCTR (0x0110) |
#define | CC2420_RAM_SABUF (0x0120) |
#define | CC2420_RAM_KEY1 (0x0130) |
#define | CC2420_RAM_TXNONCE (0x0140) |
#define | CC2420_RAM_TXCTR (0x0140) |
#define | CC2420_RAM_CBCSTATE (0x0150) |
#define | CC2420_RAM_IEEEADR (0x0160) |
#define | CC2420_RAM_PANID (0x0168) |
#define | CC2420_RAM_SHORTADR (0x016A) |
Status byte bit fields | |
| |
#define | CC2420_STATUS_XOSC_STABLE (0x40) |
#define | CC2420_STATUS_TX_UNDERFLOW (0x20) |
#define | CC2420_STATUS_ENC_BUSY (0x10) |
#define | CC2420_STATUS_TX_ACTIVE (0x08) |
#define | CC2420_STATUS_PLL_LOCK (0x04) |
#define | CC2420_STATUS_RSSI_VALID (0x02) |
Modem control 0 register bitfields | |
#define | CC2420_MDMCTRL0_RES_FRM (0x2000 |
#define | CC2420_MDMCTRL0_ADR_DECODE (0x0800) |
#define | CC2420_MDMCTRL0_PAN_COORD (0x1000) |
#define | CC2420_MDMCTRL0_AUTOCRC (0x0020) |
#define | CC2420_MDMCTRL0_AUTOACK (0x0010) |
#define | CC2420_MDMCTRL0_PREAMBLE_M (0x000f) |
#define | CC2420_MDMCTRL0_PREAMBLE_3B (0x0002) |
#define | CC2420_CRCCOR_CRC_MASK (0x80) |
CRC/Correlation bit masks. | |
#define | CC2420_CRCCOR_COR_MASK (0x7F) |
Transmit control register bitfields | |
#define | CC2420_TXCTRL_PA_MASK (0x001f) |
Receive control register 1 bitfields | |
#define | CC2420_RXCTRL1_RXBPF_LOCUR (0x2000) |
Frequency synthesizer control and status register bitfields | |
#define | CC2420_FSCTRL_LOCK_THR_MASK (0xc000) |
#define | CC2420_FSCTRL_CAL_DONE (0x2000) |
#define | CC2420_FSCTRL_CAL_RUNNING (0x1000) |
#define | CC2420_FSCTRL_LOCK_LENGTH (0x0800) |
#define | CC2420_FSCTRL_LOCK_STATUS (0x0400) |
#define | CC2420_FSCTRL_FREQ_MASK (0x03ff) |
Security control register 0 bitfields | |
#define | CC2420_SECCTRL0_RXFIFO_PROT (0x0200) |
Manufacturer ID low register value | |
#define | CC2420_MANFIDL_VAL (0x233d) |
Manufacturer ID high register value | |
#define | CC2420_MANFIDH_VAL (0x3000) |
device state change commands | |
enum | { CC2420_GOTO_PD , CC2420_GOTO_IDLE , CC2420_GOTO_RX , CC2420_GOTO_TXON , CC2420_GOTO_TXONCCA } |
(Selected) device states | |
enum | { CC2420_STATE_PD = 0 , CC2420_STATE_IDLE = 1 , CC2420_STATE_TX_PRE = 34 , CC2420_STATE_RX_SEARCH = 6 , CC2420_STATE_RX_OVERFLOW = 17 } |
#define CC2420_CRCCOR_COR_MASK (0x7F) |
Definition at line 191 of file cc2420_registers.h.
#define CC2420_CRCCOR_CRC_MASK (0x80) |
CRC/Correlation bit masks.
Definition at line 190 of file cc2420_registers.h.
#define CC2420_FIFO_READ (CC2420_REG_RXFIFO | CC2420_REG_READ) |
Definition at line 73 of file cc2420_registers.h.
#define CC2420_FIFO_WRITE (CC2420_REG_TXFIFO | CC2420_REG_WRITE) |
Definition at line 74 of file cc2420_registers.h.
#define CC2420_FSCTRL_CAL_DONE (0x2000) |
Definition at line 213 of file cc2420_registers.h.
#define CC2420_FSCTRL_CAL_RUNNING (0x1000) |
Definition at line 214 of file cc2420_registers.h.
#define CC2420_FSCTRL_FREQ_MASK (0x03ff) |
Definition at line 217 of file cc2420_registers.h.
#define CC2420_FSCTRL_LOCK_LENGTH (0x0800) |
Definition at line 215 of file cc2420_registers.h.
#define CC2420_FSCTRL_LOCK_STATUS (0x0400) |
Definition at line 216 of file cc2420_registers.h.
#define CC2420_FSCTRL_LOCK_THR_MASK (0xc000) |
Definition at line 212 of file cc2420_registers.h.
#define CC2420_MANFIDH_VAL (0x3000) |
Definition at line 238 of file cc2420_registers.h.
#define CC2420_MANFIDL_VAL (0x233d) |
Definition at line 231 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_ADR_DECODE (0x0800) |
Definition at line 178 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_AUTOACK (0x0010) |
Definition at line 181 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_AUTOCRC (0x0020) |
Definition at line 180 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_PAN_COORD (0x1000) |
Definition at line 179 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_PREAMBLE_3B (0x0002) |
Definition at line 183 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_PREAMBLE_M (0x000f) |
Definition at line 182 of file cc2420_registers.h.
#define CC2420_MDMCTRL0_RES_FRM (0x2000 |
Definition at line 177 of file cc2420_registers.h.
#define CC2420_OPT_AUTOACK (0x0001) |
auto ACKs active
Definition at line 32 of file cc2420_registers.h.
#define CC2420_OPT_CSMA (0x0002) |
CSMA active.
Definition at line 33 of file cc2420_registers.h.
#define CC2420_OPT_PRELOADING (0x0008) |
preloading enabled
Definition at line 35 of file cc2420_registers.h.
#define CC2420_OPT_PROMISCUOUS (0x0004) |
promiscuous mode active
Definition at line 34 of file cc2420_registers.h.
#define CC2420_RAM (0x80) |
access the internal RAM
Definition at line 70 of file cc2420_registers.h.
#define CC2420_RAM_CBCSTATE (0x0150) |
Definition at line 154 of file cc2420_registers.h.
#define CC2420_RAM_IEEEADR (0x0160) |
Definition at line 155 of file cc2420_registers.h.
#define CC2420_RAM_KEY0 (0x0100) |
Definition at line 147 of file cc2420_registers.h.
#define CC2420_RAM_KEY1 (0x0130) |
Definition at line 151 of file cc2420_registers.h.
#define CC2420_RAM_PANID (0x0168) |
Definition at line 156 of file cc2420_registers.h.
#define CC2420_RAM_READ (0x20) |
read from RAM
Definition at line 72 of file cc2420_registers.h.
#define CC2420_RAM_RXCTR (0x0110) |
Definition at line 149 of file cc2420_registers.h.
#define CC2420_RAM_RXFIFO (0x0080) |
Definition at line 146 of file cc2420_registers.h.
#define CC2420_RAM_RXNONCE (0x0110) |
Definition at line 148 of file cc2420_registers.h.
#define CC2420_RAM_SABUF (0x0120) |
Definition at line 150 of file cc2420_registers.h.
#define CC2420_RAM_SHORTADR (0x016A) |
Definition at line 157 of file cc2420_registers.h.
#define CC2420_RAM_TXCTR (0x0140) |
Definition at line 153 of file cc2420_registers.h.
#define CC2420_RAM_TXFIFO (0x0000) |
Definition at line 145 of file cc2420_registers.h.
#define CC2420_RAM_TXNONCE (0x0140) |
Definition at line 152 of file cc2420_registers.h.
#define CC2420_RAM_WRITE (0x00) |
write to RAM
Definition at line 71 of file cc2420_registers.h.
#define CC2420_REG_ADCTST (0x2D) |
ADC test.
Definition at line 133 of file cc2420_registers.h.
#define CC2420_REG_AGCCTRL (0x23) |
AGC control.
Definition at line 123 of file cc2420_registers.h.
#define CC2420_REG_AGCTST0 (0x24) |
AGC test 0.
Definition at line 124 of file cc2420_registers.h.
#define CC2420_REG_AGCTST1 (0x25) |
AGC test 1.
Definition at line 125 of file cc2420_registers.h.
#define CC2420_REG_AGCTST2 (0x26) |
AGC test 2.
Definition at line 126 of file cc2420_registers.h.
#define CC2420_REG_BATTMON (0x1B) |
battery monitor control
Definition at line 115 of file cc2420_registers.h.
#define CC2420_REG_DACTST (0x2E) |
DAC test.
Definition at line 134 of file cc2420_registers.h.
#define CC2420_REG_FSCTRL (0x18) |
freq synthesizer control
Definition at line 112 of file cc2420_registers.h.
#define CC2420_REG_FSMSTATE (0x2C) |
FSM status.
Definition at line 132 of file cc2420_registers.h.
#define CC2420_REG_FSMTC (0x20) |
FSM timer constants.
Definition at line 120 of file cc2420_registers.h.
#define CC2420_REG_FSTST0 (0x27) |
freq synthesizer test 0
Definition at line 127 of file cc2420_registers.h.
#define CC2420_REG_FSTST1 (0x28) |
freq synthesizer test 1
Definition at line 128 of file cc2420_registers.h.
#define CC2420_REG_FSTST2 (0x29) |
freq synthesizer test 2
Definition at line 129 of file cc2420_registers.h.
#define CC2420_REG_FSTST3 (0x2A) |
freq synthesizer test 3
Definition at line 130 of file cc2420_registers.h.
#define CC2420_REG_IOCFG0 (0x1C) |
I/O control 0.
Definition at line 116 of file cc2420_registers.h.
#define CC2420_REG_IOCFG1 (0x1D) |
I/O control 1.
Definition at line 117 of file cc2420_registers.h.
#define CC2420_REG_MAIN (0x10) |
main control
Definition at line 104 of file cc2420_registers.h.
#define CC2420_REG_MANAND (0x21) |
manual signal AND override
Definition at line 121 of file cc2420_registers.h.
#define CC2420_REG_MANFIDH (0x1F) |
manufacturer ID high
Definition at line 119 of file cc2420_registers.h.
#define CC2420_REG_MANFIDL (0x1e) |
manufacturer ID low
Definition at line 118 of file cc2420_registers.h.
#define CC2420_REG_MANOR (0x22) |
manual signal OR override
Definition at line 122 of file cc2420_registers.h.
#define CC2420_REG_MDMCTRL0 (0x11) |
modem control 0
Definition at line 105 of file cc2420_registers.h.
#define CC2420_REG_MDMCTRL1 (0x12) |
modem control 1
Definition at line 106 of file cc2420_registers.h.
#define CC2420_REG_READ (0x40) |
write register value
Definition at line 69 of file cc2420_registers.h.
#define CC2420_REG_RSSI (0x13) |
RSSI and CCA control.
Definition at line 107 of file cc2420_registers.h.
#define CC2420_REG_RXBPFTST (0x2B) |
RX bandpass filter test.
Definition at line 131 of file cc2420_registers.h.
#define CC2420_REG_RXCTRL0 (0x16) |
receive control 0
Definition at line 110 of file cc2420_registers.h.
#define CC2420_REG_RXCTRL1 (0x17) |
receive control 1
Definition at line 111 of file cc2420_registers.h.
#define CC2420_REG_RXFIFO (0x3F) |
RX FIFO byte.
Definition at line 137 of file cc2420_registers.h.
#define CC2420_REG_SECCTRL0 (0x19) |
security control 0
Definition at line 113 of file cc2420_registers.h.
#define CC2420_REG_SECCTRL1 (0x1A) |
security control 1
Definition at line 114 of file cc2420_registers.h.
#define CC2420_REG_SYNCWORD (0x14) |
synchronization word control
Definition at line 108 of file cc2420_registers.h.
#define CC2420_REG_TOPTST (0x2F) |
top level test
Definition at line 135 of file cc2420_registers.h.
#define CC2420_REG_TXCTRL (0x15) |
transmit control
Definition at line 109 of file cc2420_registers.h.
#define CC2420_REG_TXFIFO (0x3E) |
TX FIFO byte.
Definition at line 136 of file cc2420_registers.h.
#define CC2420_REG_WRITE (0x00) |
read register value
Definition at line 68 of file cc2420_registers.h.
#define CC2420_RXCTRL1_RXBPF_LOCUR (0x2000) |
Definition at line 205 of file cc2420_registers.h.
#define CC2420_SECCTRL0_RXFIFO_PROT (0x0200) |
Definition at line 224 of file cc2420_registers.h.
#define CC2420_STATUS_ENC_BUSY (0x10) |
Definition at line 167 of file cc2420_registers.h.
#define CC2420_STATUS_PLL_LOCK (0x04) |
Definition at line 169 of file cc2420_registers.h.
#define CC2420_STATUS_RSSI_VALID (0x02) |
Definition at line 170 of file cc2420_registers.h.
#define CC2420_STATUS_TX_ACTIVE (0x08) |
Definition at line 168 of file cc2420_registers.h.
#define CC2420_STATUS_TX_UNDERFLOW (0x20) |
Definition at line 166 of file cc2420_registers.h.
#define CC2420_STATUS_XOSC_STABLE (0x40) |
Definition at line 165 of file cc2420_registers.h.
#define CC2420_STROBE_ACK (0x0A) |
send ACK with pending cleared
Definition at line 92 of file cc2420_registers.h.
#define CC2420_STROBE_ACKPEND (0x0B) |
send ACK with pending set
Definition at line 93 of file cc2420_registers.h.
#define CC2420_STROBE_AES (0x0E) |
start AES encryption
Definition at line 96 of file cc2420_registers.h.
#define CC2420_STROBE_FLUSHRX (0x08) |
flush RX FIFO
Definition at line 90 of file cc2420_registers.h.
#define CC2420_STROBE_FLUSHTX (0x09) |
flush TX FIFO
Definition at line 91 of file cc2420_registers.h.
#define CC2420_STROBE_NOP (0x00) |
no operation
Definition at line 82 of file cc2420_registers.h.
#define CC2420_STROBE_RFOFF (0x06) |
switch to IDLE mode
Definition at line 88 of file cc2420_registers.h.
#define CC2420_STROBE_RXDEC (0x0C) |
start RX FIFO decrypt/verify
Definition at line 94 of file cc2420_registers.h.
#define CC2420_STROBE_RXON (0x03) |
switch to RX mode
Definition at line 85 of file cc2420_registers.h.
#define CC2420_STROBE_TXCAL (0x02) |
calibrate TX freq and wait
Definition at line 84 of file cc2420_registers.h.
#define CC2420_STROBE_TXENC (0x0D) |
start TX FIFO encrypt/auth
Definition at line 95 of file cc2420_registers.h.
#define CC2420_STROBE_TXON (0x04) |
switch to TX mode
Definition at line 86 of file cc2420_registers.h.
#define CC2420_STROBE_TXONCCA (0x05) |
switch to TX after CCA
Definition at line 87 of file cc2420_registers.h.
#define CC2420_STROBE_XOSCOFF (0x07) |
power down
Definition at line 89 of file cc2420_registers.h.
#define CC2420_STROBE_XOSCON (0x01) |
turn transceiver on
Definition at line 83 of file cc2420_registers.h.
#define CC2420_TXCTRL_PA_MASK (0x001f) |
Definition at line 198 of file cc2420_registers.h.
anonymous enum |
Enumerator | |
---|---|
CC2420_GOTO_PD | power down |
CC2420_GOTO_IDLE | idle |
CC2420_GOTO_RX | receive state |
CC2420_GOTO_TXON | transmit packet without CCA |
CC2420_GOTO_TXONCCA | transmit packet using CCA |
Definition at line 42 of file cc2420_registers.h.
anonymous enum |
Enumerator | |
---|---|
CC2420_STATE_PD | power down |
CC2420_STATE_IDLE | idle state |
CC2420_STATE_TX_PRE | transmitting preamble |
CC2420_STATE_RX_SEARCH | receive SFD search |
CC2420_STATE_RX_OVERFLOW | receive buffer overflow |
Definition at line 55 of file cc2420_registers.h.