A7169reg.h 27 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275276277278279280281282283284285286287288289290291292293294295296297298299300301302303304305306307308309310311312313314315316317318319320321322323324325326327328329330331332333334335336337338339340341342343344345346347348349350351352353354355356357358359360361362363364365366367368369370371372373374375376377378379380381382383384385386387388389390391392393394395396397398399400401402403404405406407408409410411412413414415416417418419420421422423424425426427428429430431432433434435436437438439440441442443444445446447448449450451452453454455456457458459460461462463464465466467468469470471472473474475476477478479480481482483484485486487488489490491492493494495496497498499500501502503504505506507508509510511512513514515516517518519520521522523524525526527528529530531532533534535536537538539540541542543544545546547548549550551552553554555556557558559560561562563
  1. /********************************************************************
  2. * A7169REG.h
  3. * RF Chip-A7169 Hardware Definitions
  4. *
  5. * This file provides the constants associated with the
  6. * AMICCOM A7169 device.
  7. *
  8. ********************************************************************/
  9. #ifndef _A7169REG_h_
  10. #define _A7169REG_h_
  11. #include <stdint.h>
  12. /**
  13. * 以下寄存器通过这个来操作:
  14. * 1、A7169_WriteReg
  15. */
  16. #define SYSTEMCLOCK_REG 0x00
  17. #define PLL1_REG 0x01
  18. #define PLL2_REG 0x02
  19. #define PLL3_REG 0x03
  20. #define PLL4_REG 0x04
  21. #define PLL5_REG 0x05
  22. #define PLL6_REG 0x06
  23. #define CRYSTAL_REG 0x07
  24. #define PAGEA_REG 0x08
  25. #define PAGEB_REG 0x09
  26. #define RX1_REG 0x0A
  27. #define RX2_REG 0x0B
  28. #define ADC_REG 0x0C
  29. #define PIN_REG 0x0D
  30. #define CALIBRATION_REG 0x0E
  31. #define MODE_REG 0x0F
  32. /**
  33. * 以下寄存器通过这两个api来操作:
  34. * 1、写操作:A7169_WritePageA
  35. * 2、读操作:A7169_ReadPageA
  36. */
  37. #define TX1_PAGEA 0x00
  38. #define WOR1_PAGEA 0x01
  39. #define WOR2_PAGEA 0x02
  40. #define RFI_PAGEA 0x03
  41. #define PM_PAGEA 0x04
  42. #define RTH_PAGEA 0x05
  43. #define AGC1_PAGEA 0x06
  44. #define AGC2_PAGEA 0x07
  45. #define GIO_PAGEA 0x08
  46. #define CKO_PAGEA 0x09
  47. #define VCB_PAGEA 0x0A
  48. #define CHG1_PAGEA 0x0B
  49. #define CHG2_PAGEA 0x0C
  50. #define FIFO_PAGEA 0x0D
  51. #define CODE_PAGEA 0x0E
  52. #define WCAL_PAGEA 0x0F
  53. /**
  54. * 以下寄存器通过这两个api来操作:
  55. * 1、写操作:A7169_WritePageB
  56. * 2、读操作:A7169_ReadPageB
  57. */
  58. #define TX2_PAGEB 0x00
  59. #define IF1_PAGEB 0x01
  60. #define IF2_PAGEB 0x02
  61. #define ACK_PAGEB 0x03
  62. #define ART_PAGEB 0x04
  63. #define SYN_PAGEB 0x05
  64. #define RCCAL_PAGEB 0x06
  65. #define ACKFIFO_PAGEB 0x07
  66. #define PNCFG1_PAGEB 0x08
  67. #define PNCFG2_PAGEB 0x09
  68. #define PNCFG3_PAGEB 0x0A
  69. #define PNCFG4_PAGEB 0x0B
  70. #define PNCFG5_PAGEB 0x0C
  71. #define TCODE_PAGEB 0x0D
  72. #define PN_DC_PAGEB 0x0E
  73. #define PNCFG6_PAGEB 0x0F
  74. #define PNCFG7_PAGEB 0x10
  75. #define PNCFG8_PAGEB 0x11
  76. #define PNCFG9_PAGEB 0x12
  77. #define PNCFG10_PAGEB 0x13
  78. #define Misc_CFG1_PAGEB 0x14
  79. #define Misc_CFG2_PAGEB 0x15
  80. #define Misc_CFG3_PAGEB 0x16
  81. #define PLL7_PAGEB 0x17
  82. #define PLL8_PAGEB 0x18
  83. #define PSMODE1_PAGEB 0x19
  84. #define PSMODE2_PAGEB 0x1A
  85. #define PSMODE3_PAGEB 0x1B
  86. #define TX3_PAGEB 0x1C
  87. #define Misc_CFG4_PAGEB 0x1D
  88. #define PNCFG11_PAGEB 0x1E
  89. #define PNCFG12_PAGEB 0x1F
  90. #define PNCFG13_PAGEB 0x20
  91. #define PNCFG14_PAGEB 0x21
  92. #define PNCFG15_PAGEB 0x22
  93. #define PNCFG16_PAGEB 0x23
  94. #define PNCFG17_PAGEB 0x24
  95. #define PNCFG18_PAGEB 0x25
  96. #define CSMA1_PAGEB 0x26
  97. #define CSMA2_PAGEB 0x27
  98. #define TXPA_PAGEB 0x28
  99. #define DCMON1_PAGEB 0x29
  100. #define DCMON2_PAGEB 0x2A
  101. #define DCMON3_PAGEB 0x2B
  102. #define MBUS1_PAGEB 0x2C
  103. #define MBUS2_PAGEB 0x2D
  104. #define MBUS3_PAGEB 0x2E
  105. #define MBUS4_PAGEB 0x2F
  106. #define MBUS5_PAGEB 0x30
  107. #define PN_DC2_PAGEB 0x31
  108. #define VCB2_PAGEB 0x32
  109. #define PS_MODE4_PAGEB 0x33
  110. #define WOR3_PAGEB 0x34
  111. /**
  112. * 以下寄存器通过这个来操作:
  113. * 1、StrobeCMD
  114. */
  115. #define CMD_Reg_W 0x00 //000x,xxxx control register write
  116. #define CMD_Reg_R 0x80 //100x,xxxx control register read
  117. #define CMD_ID_W 0x20 //001x,xxxx ID write
  118. #define CMD_ID_R 0xA0 //101x,xxxx ID Read
  119. #define CMD_FIFO_W 0x40 //010x,xxxx TX FIFO Write
  120. #define CMD_FIFO_R 0xC0 //110x,xxxx RX FIFO Read
  121. #define CMD_RF_RST 0xFF //x111,xxxx RF reset
  122. #define CMD_TFR 0x60 //0110,xxxx TX FIFO address pointrt reset
  123. #define CMD_RFR 0xE0 //1110,xxxx RX FIFO address pointer reset
  124. #define CMD_SLEEP 0x10 //0001,0000 SLEEP mode
  125. #define CMD_IDLE 0x12 //0001,0010 IDLE mode
  126. #define CMD_STBY 0x14 //0001,0100 Standby mode
  127. #define CMD_PLL 0x16 //0001,0110 PLL mode
  128. #define CMD_RX 0x18 //0001,1000 RX mode
  129. #define CMD_TX 0x1A //0001,1010 TX mode
  130. //#define CMD_DEEP_SLEEP 0x1C //0001,1100 Deep Sleep mode(tri-state)
  131. #define CMD_DEEP_SLEEP 0x1F //0001,1111 Deep Sleep mode(pull-high)
  132. //@RX2_REG
  133. typedef union
  134. {
  135. uint16_t value;
  136. struct
  137. {
  138. uint16_t DCM : 2; // [1:0]: Demodulator DC estimation mode. Recommend DCM = [01].
  139. // [00]: By DC average value, DCV[7:0],(0Bh).
  140. // [01]: DC holds after preamble detected.
  141. // [10]: DC holds after ID detected.
  142. // [11]: DC value when chip receive specific data length (set by DCL[:2:0])..
  143. uint16_t DCL : 3;// [2:0]: Data Length of Peak Detect average setting. Recommend DCL = [010].
  144. // DCL[2:0] is used to let A7169 detects n times “0” or n times ”1” to result DC estimation voltage of demodulator.
  145. // DCL[2:0] | DC average
  146. // | Before ID Sync | After ID Sync
  147. // 000 | 4 | 32
  148. // 001 | 8 | 32
  149. // 010 | 16 | 32
  150. // 011 | 32 | 32
  151. // 100 | 4 | 64
  152. // 101 | 8 | 64
  153. // 110 | 16 | 64
  154. // 111 | 32 | 64
  155. // For example, if DCL[2:0] = 000,
  156. // Before ID sync, by peak detect method to update a new DC value for every 4 times 1” and 4 times ”0” .
  157. // After ID sync, by peak detect method, to update a new DC value for every 32 times “1” and 32 times ”0” .
  158. uint16_t PMD : 3; // [2:0]: Preamble pattern detection. Recommend PMD = [100].
  159. // When DCM[1:0] = 01, 10, 11, chip will execute preamble length detection automatically.
  160. // [000]: 0 bit (Note: When PMD=[000], DC is not hold after ID detected.)
  161. // [001]: 4 bits
  162. // [010]: 8 bits (Default value)
  163. // [011]: 16 bits
  164. // [100]: 24 bits.
  165. // [101] and [11x]: 32bits.
  166. // Remark detection length setting should be smaller than the setting value of PML[1:0](08h, Page 14).
  167. uint16_t DCV : 8; // [7:0]: Data DC average value setting. Recommend DCV = [10010].
  168. // This setting is only active when DCM (09h) = [00].
  169. }bits_w;
  170. struct
  171. {
  172. uint16_t remark : 7; //
  173. uint16_t ADCO : 9; // [8:0]: RSSI value if AGC =1 (Read Only).
  174. }bits_r;
  175. }rx2_tu;
  176. //@WOR1_PAGEA
  177. typedef union
  178. {
  179. uint16_t value;
  180. struct
  181. {
  182. uint16_t WOR_AC : 9; // [15:0]: 16-bits WOR Active Period.
  183. // WOR_AC[15:9] is located in 0x09h, page 52.
  184. // WOR_AC[8:6] is located in 0x09h, page 5.
  185. // WOR Active Period = (WOR_AC[15:0]+1) x (1/4096), (244us ~ 16s).
  186. uint16_t WOR_SL : 9; // [15:0]: 16-bits WOR Sleep Period.
  187. // WOR_SL[15:10] is located in 0x09h, page 52.
  188. // WOR Sleep Period = (WOR_SL[15:0]+1) x (32/4096), (7.8ms ~ 512s)
  189. }bits_w;
  190. }pageA_wor1_tu;
  191. //@CODE_PAGEA
  192. typedef union
  193. {
  194. uint16_t value;
  195. struct
  196. {
  197. uint16_t PML : 3; // [2:0] (bit 15 / 1 / 0): Preamble Length Select. Recommend PML= [011].
  198. // [000]: 1 byte.
  199. // [001]: 2 bytes.
  200. // [010]: 3 bytes.
  201. // [011]: 4 bytes.
  202. // [100]: 16 byte.
  203. // [101]: 32 bytes.
  204. // [110]: 48 bytes.
  205. // [111]: 64 bytes.
  206. uint16_t IDL1 : 1; // [1:0] (bit 14 / 2): ID code length setting. Recommend IDL=[01].
  207. // IDL [1:0] = [Bit14, Bit2].
  208. // [00]: 2 bytes.
  209. // [01]: 4 bytes.
  210. // [10]: 6 bytes.
  211. // [11]: 8 bytes.
  212. uint16_t WS : 7; // [6:0]: Data Whitening Seed (data encryption key, only for FIFO mode).
  213. uint16_t MCS : 1; //: Manchester Code Enable (Only for FIFO mode).
  214. // [0]: Disable.
  215. // [1]: Enable.
  216. uint16_t WHTS : 1; //: Data Whitening (Data Encryption, only for FIFO mode).
  217. // [0]: Disable.
  218. // [1]: Enable (The data is whitened by multiplying with PN7).
  219. uint16_t IDL0 : 1; //
  220. uint16_t FECS : 1; // : FEC Select (Only for FIFO mode).
  221. // [0]: Disable.
  222. // [1]: Enable (The FEC is (7, 4) Hamming code).
  223. uint16_t CRCS : 1; // : CRC Select (Only for FIFO mode).
  224. // [0]: Disable.
  225. // [1]: Enable.
  226. }bits_w;
  227. }pageA_code_tu;
  228. typedef enum
  229. {
  230. GIOMD_WTR,
  231. GIOMD_EOAC_FSYNC,
  232. GIOMD_TMEO_CD,
  233. GIOMD_PDN_PA,
  234. GIOMD_TWOR,
  235. GIOMD_SDO,
  236. GIOMD_TRXD,
  237. GIOMD_RXD,
  238. GIOMD_NC1,
  239. GIOMD_PDNRX,
  240. GIOMD_NC2,
  241. GIOMD_VPOAK,
  242. GIOMD_WATCH,
  243. GIOMD_PDNTX,
  244. GIOMD_FMTDO,
  245. }gioModeSlt_e;
  246. //@GIO_PAGEA
  247. typedef union
  248. {
  249. uint16_t value;
  250. struct
  251. {
  252. uint16_t g1oe : 1; // : GIO1pin output enable.
  253. // [0]: High Z.
  254. // [1]: Enable.
  255. uint16_t g1i : 1; // : GIO1 pin output signal invert.
  256. // [0]: Non-inverted output.
  257. // [1]: Inverted output.
  258. uint16_t gio1s : 4; // [3:0]: GIO1 pin function select.
  259. // GIO1S [3:0] | TX state | RX state
  260. // [0000] | WTR (Wait until TX or RX finished)
  261. // [0001] | EOAC (end of access code) | FSYNC (frame sync)
  262. // [0010] | TMEO (TX modulation enable) | CD (carrier detect)
  263. // [0011] | PDN_PA, when PASW=1
  264. // | Preamble Detect Output (PMDO), when PASW =0
  265. // [0100] | TWOR, when TWOR mode enabled
  266. // | CWTR (Cyclic TRX edge WTR), when TWOR disabled
  267. // [0101] | In phase demodulator input (DMII) or DVT[0](AGC)
  268. // [0110] | SDO (4 wires SPI data out)
  269. // [0111] | TRXD In/Out (Direct mode)
  270. // [1000] | RXD (Direct mode)
  271. // [1001] | 0
  272. // [1010] | PDN_RX
  273. // [1011] | 0
  274. // [1100] | VPOAK (Valid Packet or Auto ACK OK Output)
  275. // [1101] | WATCH
  276. // | WATCH_Sel[1:0] is located in 0x09h, page20.
  277. // | WATCH_Sel = [00] -> FPF
  278. // | WATCH_Sel = [01] -> WE_MAN
  279. // | WATCH_Sel = [10] -> WE_PN
  280. // | WATCH_Sel = [11] -> MAN_Sleep | PN_Sleep | FEC_Sleep
  281. // [1110] | PDN_TX
  282. // [1111] | FMTDO (FIFO mode TX Data Output testing)
  283. uint16_t g2oe : 1; //: GIO2 pin output enable.
  284. // [0]: High Z.
  285. // [1]: Enable.
  286. uint16_t g2i : 1; //: GIO2 pin output signal invert.
  287. // [0]: Non-inverted output.
  288. // [1]: Inverted output.
  289. uint16_t gio2s : 4; //[3:0]: GIO2 pin function select.
  290. // GIO2S [3:0] | TX state | RX state
  291. // [0000] | WTR (Wait until TX or RX finished)
  292. // [0001] | EOAC (end of access code) | FSYNC (frame sync)
  293. // [0010] | TMEO (TX modulation enable) | CD (carrier detect)
  294. // [0011] | PDN_PA, when PASW=1 Preamble Detect Output (PMDO), when PASW =0
  295. // [0100] | TWOR, when TWOR mode enabled
  296. // | CWTR (Cyclic TRX edge WTR), when TWOR disabled
  297. // [0101] | Quadrature phase demodulator input (DMII) or DVT[0](AGC)
  298. // [0110] | SDO (4 wires SPI data out)
  299. // [0111] | TRXD In/Out (Direct mode)
  300. // [1000] | RXD (Direct mode)
  301. // [1001] | 0
  302. // [1010] | PDN_TX
  303. // [1011] | 0
  304. // [1100] | VPOAK (Valid Packet or Auto ACK OK Output)
  305. // [1101] | WATCH
  306. // | WATCH_Sel[1:0] is located in 0x09h, page20.
  307. // | WATCH_Sel = [00] -> FPF
  308. // | WATCH_Sel = [01] -> WE_MAN
  309. // | WATCH_Sel = [10] -> WE_PN
  310. // | WATCH_Sel = [11] -> MAN_Sleep | PN_Sleep | FEC_Sleep
  311. // [1110] | Battery Detect flag. (BDF)
  312. // [1111] | FMRDI. (FIFO mode RX input for testing) (for internal testing)
  313. uint16_t ddpc : 1; //(Direct mode data pin control): Direct mode modem data can be accessed via SDIO pin.
  314. // [0]: Disable.
  315. // [1]: Enable.
  316. uint16_t mcnt : 1; //[1:0]: Main Clock Divider.
  317. // [00]: =
  318. // [01]: = / 2
  319. // [10]: = / 3
  320. // [11]: = / 4
  321. // Please refer to Chapter 12 for details.
  322. uint16_t wrcks : 1; //: WOR Reference clock select.
  323. // [0]: WOR Ref clock when PF8M is equal or close to 6.4MHz.
  324. // [1]: WOR Ref clock when PF8M is equal or close to 8MHz.
  325. }bits_w;
  326. }pageA_gio_tu;
  327. //@PLL1_REG
  328. typedef union
  329. {
  330. uint16_t value;
  331. struct
  332. {
  333. uint16_t ip : 9; //LO frequency Integer Part setting.
  334. uint16_t chi : 2; //Reserved. CHI shall be [00].
  335. uint16_t chf : 2; // Charge-pump current setting for fractional-N synthesizer. Recommend CHF = [01].
  336. // [00]: 48uA
  337. // [01]: 96uA
  338. // [10]: 192uA
  339. // [11]: 384uA
  340. uint16_t chi2i : 1; //Reserved. CHI2I shall be [0].
  341. uint16_t chf2i : 1; //Reserved. CHI2F shall be [0].
  342. uint16_t crcinv : 1; // CRC Inverted Select.
  343. // [0]: Disable.
  344. // [1]: Enable
  345. }bits_w;
  346. }pll1_tu;
  347. //@PLL4_REG
  348. typedef union
  349. {
  350. uint16_t value;
  351. struct
  352. {
  353. uint16_t EDI : 1; // Dither Noise setting. Recommend EDI = [0].
  354. // [0]: Disable.
  355. // [1]: Enable.
  356. uint16_t NSDO : 1; // Mash sigma delta order setting. Recommend NSDO = [0].
  357. // [0]: Order 2.
  358. // [1]: Order 3.
  359. uint16_t SDPW : 2; // Pulse Width of sigma-delta modulator. SDPW shall be [00].
  360. uint16_t ISDIV : 1; // Divider current test bit. Recommend ISDIV = [0].
  361. // [0]: Low current.
  362. // [1]: High current.
  363. uint16_t CPS : 1; // Charge Pump tri-state setting. Recommend CPS = [1].
  364. // [0]: Tri-state.
  365. // [1]: Normal operation.
  366. uint16_t VCI : 1; // VCO current calibration test bit. Reserved. VCl shall be [0].
  367. uint16_t ADCR : 1; // Reserved. ADCR should be= [0].
  368. uint16_t MD0 : 1; // LO Buffer current select.
  369. // [0]: Low current .
  370. // [1]: High current.
  371. uint16_t PDL : 3; // PLL Settling Delay Time setting.
  372. // PDL [2:0] PLL Delay Timer Note
  373. // 000 20 us
  374. // 001 40 us
  375. // 010 60 us
  376. // 011 80 us Recommend
  377. // 100 100 us
  378. // 101 120 us
  379. // 110 140 us
  380. // 111 160 us
  381. uint16_t MD1 : 1; // RF Band select.
  382. // [0]: Low band (310MHz ~ 510MHz)
  383. // [1]: High band (860MHz ~ 930MHz)
  384. uint16_t CKX2 : 1; // Reserved. CKX2 shall be [0].
  385. uint16_t EDIVS : 1; // Synthesizer Selection. EDIVS shall be [0].
  386. // [0]: Fractional-N PLL.
  387. // [1]: Reserved.
  388. uint16_t TXDBG : 1; // TX Debug mode. TXDBG shall be [0].
  389. // [0]: Disable.
  390. // [1]: Enable.
  391. }bits_w;
  392. }pll4_tu;
  393. //@TX2_PAGEB
  394. typedef union
  395. {
  396. uint16_t value;
  397. struct
  398. {
  399. uint16_t tbg0_2 : 3; //TX Buffer Gain setting.
  400. // TBG [5:3] is located in 0x09h, page 21.
  401. // Please refer to Chapter 8 and A7169 App. Note for programmable TX output power.
  402. uint16_t tdc : 2; //TX Driver current setting.
  403. // Please refer to Chapter 8 and A7169 App. Note for programmable TX output power.
  404. uint16_t pac : 2; //PA current setting.
  405. // Please refer to Chapter 8 and A7169 App. Note for programmable TX output power
  406. uint16_t txdi : 1; //TX data inverted. Recommend TXDI = [0].
  407. // [0]: Normal.
  408. // [1]: Invert
  409. uint16_t tdl : 2; //TX Settling Delay select.
  410. uint16_t bt : 2; //Moving average for Gaussian filter select.
  411. // If GS = [0],
  412. // Gaussian filter is disabled,
  413. // BT = [00]: not average.
  414. // [01]: 2 bit average.
  415. // [10]: 4 bit average.
  416. // [11]: 8 bit average
  417. // That means BT is used to smooth TX data transition.
  418. // If GS = [1],
  419. // Gaussian filter is enabled, and crystal frequency is 12.8MHz, DMOS=1
  420. // BT = [00]: 2.0.
  421. // [01]: 1.0.
  422. // [10]: 0.5.
  423. // [11]: 0.5
  424. // If crystal frequency is 16MHz, DMOS=1
  425. // BT = [00]: 1.0.
  426. // [01]: 0.5.
  427. // That means BT is used to configure shape of Gaussian filter.
  428. uint16_t dpr : 3; //Scaling of PDL and TDL. Recommend DPR = [00000].
  429. // DPR[4:3] is located in 0x09h, page 40.
  430. uint16_t mcntr : 1; //Divided by 2 select
  431. }bits_w;
  432. uint16_t did; //Device ID data. (Read Only).
  433. }pageB_tx2_tu;
  434. //@Misc_CFG2_PAGEB
  435. typedef union
  436. {
  437. uint16_t value;
  438. struct
  439. {
  440. uint16_t dc_diff : 5; //
  441. uint16_t dc_dth : 1; //
  442. uint16_t man_sel : 1; //
  443. uint16_t man_start : 1; //
  444. uint16_t tbg3_5 : 3; //
  445. uint16_t exdis : 1; //
  446. uint16_t pn_start : 1; //
  447. uint16_t raw_sel : 1; //
  448. uint16_t rev : 2; //
  449. }bits_w;
  450. }pageB_misc_cfg2_tu;
  451. //@MODE_REG
  452. typedef union
  453. {
  454. uint16_t value;
  455. struct
  456. {
  457. uint16_t adcm : 1; //ADC measurement (Auto clear when done).
  458. // [0]: Disable
  459. // [1]: Enable.
  460. uint16_t fbc : 1; //IF Filter Bank calibration enable (Auto clear when done).
  461. // [0]: Disable .
  462. // [1]: Enable.
  463. uint16_t vbc : 1; //VCO Bank calibration enable (Auto clear when done).
  464. // [0]: Disable.
  465. // [1]: Enable.
  466. uint16_t trer : 1; //TRX mode enable by register. Shall be set to [1].
  467. // [0]: Reserved.
  468. // [1]: By register control (CER and TRSR). In FIFO mode, this bit will be cleared after end of packet encountered.
  469. uint16_t trsr : 1; //TRX Mode select by register.
  470. // [0]: RX mode.
  471. // [1]: TX mode.
  472. // When bit TRER=1, the chip will enter TX or RX mode by TRSR register
  473. uint16_t plle : 1; //PLL enable by register.
  474. // [0]: PLL off.
  475. // [1]: PLL on
  476. uint16_t cer : 1; //Crystal enable by register.
  477. // [0]: crystal turn-off.
  478. // [1]: crystal turn-on.
  479. uint16_t fms : 1; //Direct/FIFO mode select.
  480. // [0]: Direct mode.
  481. // [1]: FIFO mode.
  482. uint16_t fmt : 1; //Reserved for internal usage only. Shall be set to [0].
  483. uint16_t wore : 1; //WOT/WOR function enable.
  484. // [0]: Disable.
  485. // [1]: Enable
  486. uint16_t cce : 1; //: Chip enable by register.
  487. // [0]: chip turn-off.
  488. // [1]: chip turn-on.
  489. uint16_t vcc : 1; //VCO current calibration.
  490. // [0]: Disable
  491. // [1]: Enable
  492. uint16_t rssc : 1; //RSSI Calibration.
  493. // [0]: Disable.
  494. // [1]: Enable.
  495. uint16_t swt : 1; //VCO Current and ADC clock and System clock select. Recommend SWT = [0].
  496. // [0]: Original
  497. // [1]: Update
  498. uint16_t vbs : 1; //Reserved. Should set to [0].
  499. uint16_t dfcd : 1; //Packet Filtering by Carrier Detect.
  500. // The received packet is filtered if the input power level is below RTH (0Ah).
  501. // [0]: Disable.
  502. // [1]: Enable.
  503. }bits_w;
  504. }base_modeControl_tu;
  505. //@TX1_PAGEA
  506. typedef union
  507. {
  508. uint16_t value;
  509. struct
  510. {
  511. uint16_t fd : 8; //TX Frequency Deviation setting.
  512. // For both Gaussian filter is enabled (GS =1) or disabled(GS = 0)
  513. uint16_t fdp : 3; // Frequency Deviation Exponential Coefficient setting.
  514. uint16_t gs : 1; //Gaussian Filter Selection.
  515. // [0]: Disable.
  516. // [1]: Enable.
  517. uint16_t tme : 1; //TX Modulation Enable.
  518. // [0]: Disable.
  519. // [1]: Enable.
  520. uint16_t rc_dly : 3; //RSSI calibration RL Delay setting. Recommend RC_DLY= [000].
  521. // [000]: 100us.
  522. // [001]: 300us.
  523. // [010]: 500us.
  524. // [011]: 700us.
  525. // [100]: 900us.
  526. // [101]: 1.1ms.
  527. // [110]: 1.3ms.
  528. // [111]: 1.5ms.
  529. }bits_w;
  530. }pageA_tx1_tu;
  531. //@FIFO_PAGEA
  532. typedef union
  533. {
  534. uint16_t value;
  535. struct
  536. {
  537. uint16_t FEP : 8; //FIFO End Pointer for TX FIFO and Rx FIFO.
  538. // Where FEP[7:0] are located at here and FEP[13:8] are located at 08h page 10.
  539. // FIFO Length Setting = (FEP [13:0] +1).
  540. // For example, if FEP = 0x3F, it means FIFO length is 64 bytes.
  541. // For FIFO extension mode, FEP’s value shall be set larger than 0x3F.
  542. // Please refer to section 16.4.2 for details
  543. uint16_t PSA : 6; //Used for Segment FIFO.
  544. // Used in FIFO segment mode
  545. uint16_t FPM : 2; //FIFO Pointer Margin.
  546. // FPM is used in FIFO extension mode for an indicator.
  547. // FPM[1:0] Bytes in TX FIFO Bytes in RX FIFO
  548. // [00] 4 60
  549. // [01] 8 56
  550. // [10] 12 52
  551. // [11] 16 48
  552. }bits_w;
  553. }pageA_fifo_tu;
  554. #endif