00001
00002
00003
00004
00005
00006
00007
00008
00009
00010
00011
00012
00013
00014
00015
00016
00017
00018
00019
00020
00021
00022
00023
00024
00025
00026
00027
00028
00029
00030
00031
00032 #ifndef _CC2420_ARCH_H_
00033 #define _CC2420_ARCH_H_
00034
00035
00036
00037
00038
00039 #define WRITE_BIT (0<<6)
00040 #define READ_BIT (1<<6)
00041
00042 #define REG_BIT (0<<7)
00043 #define RAM_BIT (1<<7)
00044
00045 #define RAM_READ_WRITE (0<<5)
00046 #define RAM_READ (1<<5)
00047
00048 #define REG_MASK 0x3F
00049 #define RAM_MASK 0x7F
00050 #define BANK_MASK 0xC0
00051
00052
00053
00054
00055
00056 #define RAM_NOT_USED 0x16C
00057 #define RAM_SHORTADR 0x16A
00058 #define RAM_PANID 0x168
00059 #define RAM_IEEEADR 0x160
00060 #define RAM_CBCSTATE 0x150
00061 #define RAM_TXNONCE 0x140
00062 #define RAM_TXCTR RAM_TXNONCE
00063 #define RAM_KEY1 0x130
00064 #define RAM_SABUF 0x120
00065 #define RAM_RXNONCE 0x110
00066 #define RAM_RXCTR RAM_RXNONCE
00067 #define RAM_KEY0 0x100
00068 #define RAM_RXFIFO 0x080
00069 #define RAM_TXFIFO 0x000
00070
00071
00072
00073
00074
00075 #define SNOP 0x00
00076 #define SXOSCON 0x01
00077 #define STXCAL 0x02
00078 #define SRXON 0x03
00079 #define STXON 0x04
00080 #define STXONCCA 0x05
00081 #define SRFOFF 0x06
00082 #define SXOSCOFF 0x07
00083 #define SFLUSHRX 0x08
00084 #define SFLUSHTX 0x09
00085 #define SACK 0x0A
00086 #define SACKPEND 0x0B
00087 #define SRXDEC 0x0C
00088 #define STXENC 0x0D
00089 #define SAES 0x0E
00090
00091
00092
00093 #define MAIN 0x10
00094 #define MDMCTRL0 0x11
00095 #define MDMCTRL1 0x12
00096 #define RSSI 0x13
00097 #define SYNCWORD 0x14
00098 #define TXCTRL 0x15
00099 #define RXCTRL0 0x16
00100 #define RXCTRL1 0x17
00101 #define FSCTRL 0x18
00102 #define SECCTRL0 0x19
00103 #define SECCTRL1 0x1A
00104 #define BATTMON 0x1B
00105 #define IOCFG0 0x1C
00106 #define IOCFG1 0x1D
00107 #define MANFIDL 0x1E
00108 #define MANFIDH 0x1F
00109 #define FSMTC 0x20
00110 #define MANAND 0x21
00111 #define MANOR 0x22
00112 #define AGCCTRL 0x23
00113 #define AGCTST0 0x24
00114 #define AGCTST1 0x25
00115 #define AGCTST2 0x26
00116 #define FSTST0 0x27
00117 #define FSTST1 0x28
00118 #define FSTST2 0x29
00119 #define FSTST3 0x2A
00120 #define RXBPFTST 0x2B
00121 #define FSMSTATE 0x2C
00122 #define ADCTST 0x2D
00123 #define DACTST 0x2E
00124 #define TOPTST 0x2F
00125
00126 #define RESERVED 0x30
00127
00128
00129 #define TXFIFO 0x3E
00130 #define RXFIFO 0x3F
00131
00132
00133
00134
00135
00136 #define RESERVED_1 7
00137 #define XOSC16M_STABLE 6
00138 #define TX_UNDERFLOW 5
00139 #define ENC_BUSY 4
00140 #define TX_ACTIVE 3
00141 #define LOCK 2
00142 #define RSSI_VALID 1
00143 #define RESERVED_2 0
00144
00145
00146
00147
00148 #define RESETn 15
00149 #define ENC_RESETn 14
00150 #define DEMOD_RESETn 13
00151 #define MOD_RESETn 12
00152 #define FS_RESETn 11
00153
00154 #define XOSC16M_BYPASS 0
00155
00156
00157
00158
00159
00160 #define RESERVED_FRAME_MODE 13
00161 #define PAN_COORDINATOR 12
00162 #define ADR_DECODE 11
00163 #define CCA_HYST2 10
00164 #define CCA_HYST1 9
00165 #define CCA_HYST0 8
00166 #define CCA_MODE1 7
00167 #define CCA_MODE0 6
00168 #define AUTOCRC 5
00169 #define AUTOACK 4
00170 #define PREAMBLE_LENGTH3 3
00171 #define PREAMBLE_LENGTH2 2
00172 #define PREAMBLE_LENGTH1 1
00173 #define PREAMBLE_LENGTH0 0
00174
00175
00176
00177
00178
00179 #define CORR_THR4 10
00180 #define CORR_THR3 9
00181 #define CORR_THR2 8
00182 #define CORR_THR1 7
00183 #define CORR_THR0 6
00184 #define DEMOD_AVG_MODE 5
00185 #define MODULATION_MODE 4
00186 #define TX_MODE1 3
00187 #define TX_MODE0 2
00188 #define RX_MODE1 1
00189 #define RX_MODE0 0
00190
00191
00192
00193
00194 #define CCA_THR 15
00195 #define RSSI_VAL 7
00196
00197
00198
00199
00200 #define TXMIXBUF_CUR1 15
00201 #define TXMIXBUF_CUR0 14
00202 #define TX_TURNAROUND 13
00203 #define TXMIX_CAP_ARRAY1 12
00204 #define TXMIX_CAP_ARRAY0 11
00205 #define TXMIX_CURRENT1 10
00206 #define TXMIX_CURRENT0 9
00207 #define PA_CURRENT 8
00208 #define PA_LEVEL 4
00209
00210
00211
00212
00213 #define RXMIXBUF_CUR 13
00214 #define HIGH_LNA_GAIN 11
00215 #define MED_LNA_GAIN 9
00216 #define LOW_LNA_GAIN 7
00217 #define HIGH_LNA_CURRENT 5
00218 #define MED_LNA_CURRENT 3
00219 #define LOW_LNA_CURRENT 1
00220
00221
00222
00223
00224 #define RXBPF_LOCUR 13
00225 #define RXBPF_MIDCUR 12
00226 #define LOW_LOWGAIN 11
00227 #define MED_LOWGAIN 10
00228 #define HIGH_HGM 9
00229 #define MED_HGM 8
00230 #define LNA_CAP_ARRAY 7
00231 #define RXMIX_TAIL 5
00232 #define RXMIX_VCM 3
00233 #define RXMIX_CURRENT 1
00234
00235
00236
00237
00238 #define LOCK_THR 15
00239 #define CAL_DONE 13
00240 #define CAL_RUNNING 12
00241 #define LOCK_LENGTH 11
00242 #define LOCK_STATUS 10
00243 #define FREQ 9
00244
00245
00246
00247
00248 #define RXFIFO_PROTECTION 9
00249 #define SEC_CBC_HEAD 8
00250 #define SEC_SAKEYSEL 7
00251 #define SEC_TXKEYSEL 6
00252 #define SEC_RXKEYSEL 5
00253 #define SEC_M 4
00254 #define SEC_MODE 1
00255
00256
00257
00258
00259 #define SEC_TXL 14
00260 #define SEC_RXL 6
00261
00262
00263
00264
00265 #define BATT_OK 6
00266 #define BATTMON_EN 5
00267 #define BATTMON_VOLTAGE 4
00268
00269
00270
00271
00272 #define BCN_ACCEPT 11
00273 #define FIFO_POLARITY 10
00274 #define FIFOP_POLARITY 9
00275 #define SFD_POLARITY 8
00276 #define CCA_POLARITY 7
00277 #define FIFOP_THR 6
00278
00279
00280
00281
00282 #define HSSD_SRC 12
00283 #define SFDMUX 9
00284 #define CCAMUX 4
00285
00286
00287
00288
00289 #define PARTNUM_L 15
00290 #define MANFID 11
00291
00292
00293
00294
00295 #define VERSION 15
00296 #define PARTNUM_H 11
00297
00298
00299
00300
00301 #define TC_RXCHAIN2RX 15
00302 #define TC_SWITCH2TX 12
00303 #define TC_PAON2TX 9
00304 #define TC_TXEND2SWITCH 5
00305 #define TC_TXEND2PAOFF 2
00306
00307
00308
00309
00310 #define VGA_RESET_N 15
00311 #define BIAS_PD 14
00312 #define BALUN_CTRL 13
00313 #define RXTX 12
00314 #define PRE_PD 11
00315 #define PA_N_PD 10
00316 #define PA_P_PD 9
00317 #define DAC_LPF_PD 8
00318 #define XOSC16M_PD 7
00319 #define RXBPF_CAL_PD 6
00320 #define CHP_PD 5
00321 #define FS_PD 4
00322 #define ADC_PD 3
00323 #define VGA_PD 2
00324 #define RXBPF_PD 1
00325 #define LNAMIX_PD 0
00326
00327
00328
00329
00330 #define VGA_GAIN_OE 11
00331 #define VGA_GAIN 10
00332 #define LNAMIX_GAINMODE_O 3
00333 #define LNAMIX_GAINMODE 1
00334
00335
00336
00337
00338 #define LNAMIX_HYST 15
00339 #define LNAMIX_THR_H 11
00340 #define LNAMIX_THR_L 5
00341
00342
00343
00344
00345 #define AGC_BLANK_MOD 14
00346 #define PEAKDET_CUR_BOOST 13
00347 #define AGC_SETTLE_WAIT 12
00348 #define AGC_PEAK_DET_MODE 10
00349 #define AGC_WIN_SIZE 7
00350 #define AGC_REF 5
00351
00352
00353
00354
00355 #define MED2HIGHGAIN 9
00356 #define LOW2MEDGAIN 4
00357
00358
00359
00360
00361 #define VCO_ARRAY_SETTLE_LONG 11
00362 #define VCO_ARRAY_OE 10
00363 #define VCO_ARRAY_O 9
00364 #define VCO_ARRAY_RES 4
00365
00366
00367
00368
00369 #define VCO_TX_NOCAL 15
00370 #define VCO_ARRAY_CAL_LONG 14
00371 #define VCO_CURRENT_REF 13
00372 #define VCO_CURRENT_K 9
00373 #define VC_DAC_EN 3
00374 #define VC_DAC_VAL 2
00375
00376
00377
00378
00379 #define VCO_CURCAL_SPEED 14
00380 #define VCO_CURRENT_OE 12
00381 #define VCO_CURRENT_O 11
00382 #define VCO_CURRENT_RES 5
00383
00384
00385
00386
00387 #define CHP_CAL_DISABLE 15
00388 #define CHP_CURRENT_OE 14
00389 #define CHP_TEST_UP 13
00390 #define CHP_TEST_DN 12
00391 #define CHP_DISABLE 11
00392 #define PD_DELAY 10
00393 #define CHP_STEP_PERIOD 9
00394 #define STOP_CHP_CURRENT 7
00395 #define START_CHP_CURRENT 3
00396
00397
00398
00399
00400 #define RXBPF_CAP_OE 14
00401 #define RXBPF_CAP_O 13
00402 #define RXBPF_CAP_RES 6
00403
00404
00405
00406
00407 #define FSM_CUR_STATE 5
00408
00409
00410
00411
00412 #define ADC_CLOCK_DISABLE 15
00413 #define ADC_I 14
00414 #define ADC_Q 6
00415
00416
00417
00418
00419 #define DAC_SRC 14
00420 #define DAC_I_O 11
00421 #define DAC_Q_O 5
00422
00423
00424
00425
00426 #define RAM_BIST_RUN 7
00427 #define TEST_BATTMON_EN 6
00428 #define VC_IN_TEST_EN 5
00429 #define ATESTMOD_PD 4
00430 #define ATESTMOD_MODE 3
00431
00432
00433
00434 #endif
00435