找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
查看: 2816|回复: 1
收起左侧

通讯模块SI4438的配置源码

[复制链接]
ID:301559 发表于 2018-4-3 16:20 | 显示全部楼层 |阅读模式
Si443是Silicon labs公司专门针对中国市场推出的一款无线收发神器。其工作频段是425MHz到525MHz。这款芯片的技术参数如下:

参数名称                      SI4432                      SI4463                            SI4438
频率范围              240~960MHz           142-175,284-250           424-525MHz
420-525 850-1050                    
接收灵敏度             -121dBm                        -126dBm                       -124dBm
发射功率                +20Db                             +21Db                            +20Db
关机电流                      50nA                            30nA                             30nA
待机电流                      800nA                           50nA                              50nA
DATA速率                0.123~256K                 0.123~1M                      0.1~500k
接收电流                  18.5mA                          10.0/14mA                       14mA
发射电流                    85mA                            70-80mA                       70-75mA
TX/ RX FIFO              64byte                           64byte                            64byte

单片机源程序如下:
  1. /*! @file radio_config.h
  2. * @brief This file contains the automatically generated
  3. * configurations.
  4. *
  5. * @n WDS GUI Version: 3.2.11.0
  6. * @n Device: Si4438 Rev.: B1                                 
  7. *
  8. * @b COPYRIGHT
  9. * @n Silicon Laboratories Confidential
  10. * @n Copyright 2017 Silicon Laboratories, Inc.
  11. */

  12. #ifndef RADIO_CONFIG_H_
  13. #define RADIO_CONFIG_H_

  14. // USER DEFINED PARAMETERS
  15. // Define your own parameters here

  16. // INPUT DATA
  17. /*
  18. // Crys_freq(Hz): 30000000    Crys_tol(ppm): 20    IF_mode: 2    High_perf_Ch_Fil: 1    OSRtune: 0    Ch_Fil_Bw_AFC: 0    ANT_DIV: 0    PM_pattern: 0   
  19. // MOD_type: 2    Rsymb(sps): 10000    Fdev(Hz): 20000    RXBW(Hz): 150000    Manchester: 0    AFC_en: 0    Rsymb_error: 0.0    Chip-Version: 2   
  20. // RF Freq.(MHz): 490    API_TC: 29    fhst: 250000    inputBW: 0    BERT: 0    RAW_dout: 0    D_source: 0    Hi_pfm_div: 1   
  21. //
  22. // # RX IF frequency is  -468750 Hz
  23. // # WB filter 3 (BW =  92.61 kHz);  NB-filter 3 (BW = 92.61 kHz)
  24. //
  25. // Modulation index: 4
  26. */


  27. // CONFIGURATION PARAMETERS
  28. #define RADIO_CONFIGURATION_DATA_RADIO_XO_FREQ                     30000000L
  29. #define RADIO_CONFIGURATION_DATA_CHANNEL_NUMBER                    0x04
  30. #define RADIO_CONFIGURATION_DATA_RADIO_PACKET_LENGTH               0x07
  31. #define RADIO_CONFIGURATION_DATA_RADIO_STATE_AFTER_POWER_UP        0x03
  32. #define RADIO_CONFIGURATION_DATA_RADIO_DELAY_CNT_AFTER_RESET       0xF000
  33. #define RADIO_CONFIGURATION_DATA_CUSTOM_PAYLOAD                                           {0xC5, 0xC5, 0xC5, 0xC5, 0xC5, 0xC5, 0xC5}


  34. // CONFIGURATION COMMANDS

  35. /*
  36. // Command:                  RF_POWER_UP
  37. // Description:              Command to power-up the device and select the operational mode and functionality.
  38. */
  39. #define RF_POWER_UP 0x02, 0x01, 0x00, 0x01, 0xC9, 0xC3, 0x80

  40. /*
  41. // Command:                  RF_GPIO_PIN_CFG
  42. // Description:              Configures the GPIO pins.
  43. */
  44. #define RF_GPIO_PIN_CFG 0x13, 0x04, 0x10, 0x00, 0x00, 0x14, 0x00, 0x00

  45. /*
  46. // Set properties:           RF_GLOBAL_XO_TUNE_2
  47. // Number of properties:     2
  48. // Group ID:                 0x00
  49. // Start ID:                 0x00
  50. // Default values:           0x40, 0x00,
  51. // Descriptions:
  52. //   GLOBAL_XO_TUNE - Configure the internal capacitor frequency tuning bank for the crystal oscillator.
  53. //   GLOBAL_CLK_CFG - Clock configuration options.
  54. */
  55. #define RF_GLOBAL_XO_TUNE_2 0x11, 0x00, 0x02, 0x00, 0x52, 0x00

  56. /*
  57. // Set properties:           RF_GLOBAL_CONFIG_1
  58. // Number of properties:     1
  59. // Group ID:                 0x00
  60. // Start ID:                 0x03
  61. // Default values:           0x20,
  62. // Descriptions:
  63. //   GLOBAL_CONFIG - Global configuration settings.
  64. */
  65. #define RF_GLOBAL_CONFIG_1 0x11, 0x00, 0x01, 0x03, 0x60

  66. /*
  67. // Set properties:           RF_INT_CTL_ENABLE_2
  68. // Number of properties:     2
  69. // Group ID:                 0x01
  70. // Start ID:                 0x00
  71. // Default values:           0x04, 0x00,
  72. // Descriptions:
  73. //   INT_CTL_ENABLE - This property provides for global enabling of the three interrupt groups (Chip, Modem and Packet Handler) in order to generate HW interrupts at the NIRQ pin.
  74. //   INT_CTL_PH_ENABLE - Enable individual interrupt sources within the Packet Handler Interrupt Group to generate a HW interrupt on the NIRQ output pin.
  75. */
  76. #define RF_INT_CTL_ENABLE_2 0x11, 0x01, 0x02, 0x00, 0x01, 0x38

  77. /*
  78. // Set properties:           RF_FRR_CTL_A_MODE_4
  79. // Number of properties:     4
  80. // Group ID:                 0x02
  81. // Start ID:                 0x00
  82. // Default values:           0x01, 0x02, 0x09, 0x00,
  83. // Descriptions:
  84. //   FRR_CTL_A_MODE - Fast Response Register A Configuration.
  85. //   FRR_CTL_B_MODE - Fast Response Register B Configuration.
  86. //   FRR_CTL_C_MODE - Fast Response Register C Configuration.
  87. //   FRR_CTL_D_MODE - Fast Response Register D Configuration.
  88. */
  89. #define RF_FRR_CTL_A_MODE_4 0x11, 0x02, 0x04, 0x00, 0x00, 0x00, 0x00, 0x00

  90. /*
  91. // Set properties:           RF_PREAMBLE_TX_LENGTH_9
  92. // Number of properties:     9
  93. // Group ID:                 0x10
  94. // Start ID:                 0x00
  95. // Default values:           0x08, 0x14, 0x00, 0x0F, 0x21, 0x00, 0x00, 0x00, 0x00,
  96. // Descriptions:
  97. //   PREAMBLE_TX_LENGTH - Configure length of TX Preamble.
  98. //   PREAMBLE_CONFIG_STD_1 - Configuration of reception of a packet with a Standard Preamble pattern.
  99. //   PREAMBLE_CONFIG_NSTD - Configuration of transmission/reception of a packet with a Non-Standard Preamble pattern.
  100. //   PREAMBLE_CONFIG_STD_2 - Configuration of timeout periods during reception of a packet with Standard Preamble pattern.
  101. //   PREAMBLE_CONFIG - General configuration bits for the Preamble field.
  102. //   PREAMBLE_PATTERN_31_24 - Configuration of the bit values describing a Non-Standard Preamble pattern.
  103. //   PREAMBLE_PATTERN_23_16 - Configuration of the bit values describing a Non-Standard Preamble pattern.
  104. //   PREAMBLE_PATTERN_15_8 - Configuration of the bit values describing a Non-Standard Preamble pattern.
  105. //   PREAMBLE_PATTERN_7_0 - Configuration of the bit values describing a Non-Standard Preamble pattern.
  106. */
  107. #define RF_PREAMBLE_TX_LENGTH_9 0x11, 0x10, 0x09, 0x00, 0x08, 0x14, 0x00, 0x0F, 0x31, 0x00, 0x00, 0x00, 0x00

  108. /*
  109. // Set properties:           RF_SYNC_CONFIG_5
  110. // Number of properties:     5
  111. // Group ID:                 0x11
  112. // Start ID:                 0x00
  113. // Default values:           0x01, 0x2D, 0xD4, 0x2D, 0xD4,
  114. // Descriptions:
  115. //   SYNC_CONFIG - Sync Word configuration bits.
  116. //   SYNC_BITS_31_24 - Sync word.
  117. //   SYNC_BITS_23_16 - Sync word.
  118. //   SYNC_BITS_15_8 - Sync word.
  119. //   SYNC_BITS_7_0 - Sync word.
  120. */
  121. #define RF_SYNC_CONFIG_5 0x11, 0x11, 0x05, 0x00, 0x01, 0xB4, 0x2B, 0x00, 0x00

  122. /*
  123. // Set properties:           RF_PKT_CRC_CONFIG_7
  124. // Number of properties:     7
  125. // Group ID:                 0x12
  126. // Start ID:                 0x00
  127. // Default values:           0x00, 0x01, 0x08, 0xFF, 0xFF, 0x00, 0x00,
  128. // Descriptions:
  129. //   PKT_CRC_CONFIG - Select a CRC polynomial and seed.
  130. //   PKT_WHT_POLY_15_8 - 16-bit polynomial value for the PN Generator (e.g., for Data Whitening)
  131. //   PKT_WHT_POLY_7_0 - 16-bit polynomial value for the PN Generator (e.g., for Data Whitening)
  132. //   PKT_WHT_SEED_15_8 - 16-bit seed value for the PN Generator (e.g., for Data Whitening)
  133. //   PKT_WHT_SEED_7_0 - 16-bit seed value for the PN Generator (e.g., for Data Whitening)
  134. //   PKT_WHT_BIT_NUM - Selects which bit of the LFSR (used to generate the PN / data whitening sequence) is used as the output bit for data scrambling.
  135. //   PKT_CONFIG1 - General configuration bits for transmission or reception of a packet.
  136. */
  137. #define RF_PKT_CRC_CONFIG_7 0x11, 0x12, 0x07, 0x00, 0x84, 0x01, 0x08, 0xFF, 0xFF, 0x00, 0x02

  138. /*
  139. // Set properties:           RF_PKT_LEN_12
  140. // Number of properties:     12
  141. // Group ID:                 0x12
  142. // Start ID:                 0x08
  143. // Default values:           0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  144. // Descriptions:
  145. //   PKT_LEN - Configuration bits for reception of a variable length packet.
  146. //   PKT_LEN_FIELD_SOURCE - Field number containing the received packet length byte(s).
  147. //   PKT_LEN_ADJUST - Provides for adjustment/offset of the received packet length value (in order to accommodate a variety of methods of defining total packet length).
  148. //   PKT_TX_THRESHOLD - TX FIFO almost empty threshold.
  149. //   PKT_RX_THRESHOLD - RX FIFO Almost Full threshold.
  150. //   PKT_FIELD_1_LENGTH_12_8 - Unsigned 13-bit Field 1 length value.
  151. //   PKT_FIELD_1_LENGTH_7_0 - Unsigned 13-bit Field 1 length value.
  152. //   PKT_FIELD_1_CONFIG - General data processing and packet configuration bits for Field 1.
  153. //   PKT_FIELD_1_CRC_CONFIG - Configuration of CRC control bits across Field 1.
  154. //   PKT_FIELD_2_LENGTH_12_8 - Unsigned 13-bit Field 2 length value.
  155. //   PKT_FIELD_2_LENGTH_7_0 - Unsigned 13-bit Field 2 length value.
  156. //   PKT_FIELD_2_CONFIG - General data processing and packet configuration bits for Field 2.
  157. */
  158. #define RF_PKT_LEN_12 0x11, 0x12, 0x0C, 0x08, 0x00, 0x00, 0x00, 0x30, 0x30, 0x00, 0x07, 0x04, 0x80, 0x00, 0x00, 0x00

  159. /*
  160. // Set properties:           RF_PKT_FIELD_2_CRC_CONFIG_12
  161. // Number of properties:     12
  162. // Group ID:                 0x12
  163. // Start ID:                 0x14
  164. // Default values:           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  165. // Descriptions:
  166. //   PKT_FIELD_2_CRC_CONFIG - Configuration of CRC control bits across Field 2.
  167. //   PKT_FIELD_3_LENGTH_12_8 - Unsigned 13-bit Field 3 length value.
  168. //   PKT_FIELD_3_LENGTH_7_0 - Unsigned 13-bit Field 3 length value.
  169. //   PKT_FIELD_3_CONFIG - General data processing and packet configuration bits for Field 3.
  170. //   PKT_FIELD_3_CRC_CONFIG - Configuration of CRC control bits across Field 3.
  171. //   PKT_FIELD_4_LENGTH_12_8 - Unsigned 13-bit Field 4 length value.
  172. //   PKT_FIELD_4_LENGTH_7_0 - Unsigned 13-bit Field 4 length value.
  173. //   PKT_FIELD_4_CONFIG - General data processing and packet configuration bits for Field 4.
  174. //   PKT_FIELD_4_CRC_CONFIG - Configuration of CRC control bits across Field 4.
  175. //   PKT_FIELD_5_LENGTH_12_8 - Unsigned 13-bit Field 5 length value.
  176. //   PKT_FIELD_5_LENGTH_7_0 - Unsigned 13-bit Field 5 length value.
  177. //   PKT_FIELD_5_CONFIG - General data processing and packet configuration bits for Field 5.
  178. */
  179. #define RF_PKT_FIELD_2_CRC_CONFIG_12 0x11, 0x12, 0x0C, 0x14, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

  180. /*
  181. // Set properties:           RF_PKT_FIELD_5_CRC_CONFIG_12
  182. // Number of properties:     12
  183. // Group ID:                 0x12
  184. // Start ID:                 0x20
  185. // Default values:           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  186. // Descriptions:
  187. //   PKT_FIELD_5_CRC_CONFIG - Configuration of CRC control bits across Field 5.
  188. //   PKT_RX_FIELD_1_LENGTH_12_8 - Unsigned 13-bit RX Field 1 length value.
  189. //   PKT_RX_FIELD_1_LENGTH_7_0 - Unsigned 13-bit RX Field 1 length value.
  190. //   PKT_RX_FIELD_1_CONFIG - General data processing and packet configuration bits for RX Field 1.
  191. //   PKT_RX_FIELD_1_CRC_CONFIG - Configuration of CRC control bits across RX Field 1.
  192. //   PKT_RX_FIELD_2_LENGTH_12_8 - Unsigned 13-bit RX Field 2 length value.
  193. //   PKT_RX_FIELD_2_LENGTH_7_0 - Unsigned 13-bit RX Field 2 length value.
  194. //   PKT_RX_FIELD_2_CONFIG - General data processing and packet configuration bits for RX Field 2.
  195. //   PKT_RX_FIELD_2_CRC_CONFIG - Configuration of CRC control bits across RX Field 2.
  196. //   PKT_RX_FIELD_3_LENGTH_12_8 - Unsigned 13-bit RX Field 3 length value.
  197. //   PKT_RX_FIELD_3_LENGTH_7_0 - Unsigned 13-bit RX Field 3 length value.
  198. //   PKT_RX_FIELD_3_CONFIG - General data processing and packet configuration bits for RX Field 3.
  199. */
  200. #define RF_PKT_FIELD_5_CRC_CONFIG_12 0x11, 0x12, 0x0C, 0x20, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

  201. /*
  202. // Set properties:           RF_PKT_RX_FIELD_3_CRC_CONFIG_9
  203. // Number of properties:     9
  204. // Group ID:                 0x12
  205. // Start ID:                 0x2C
  206. // Default values:           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  207. // Descriptions:
  208. //   PKT_RX_FIELD_3_CRC_CONFIG - Configuration of CRC control bits across RX Field 3.
  209. //   PKT_RX_FIELD_4_LENGTH_12_8 - Unsigned 13-bit RX Field 4 length value.
  210. //   PKT_RX_FIELD_4_LENGTH_7_0 - Unsigned 13-bit RX Field 4 length value.
  211. //   PKT_RX_FIELD_4_CONFIG - General data processing and packet configuration bits for RX Field 4.
  212. //   PKT_RX_FIELD_4_CRC_CONFIG - Configuration of CRC control bits across RX Field 4.
  213. //   PKT_RX_FIELD_5_LENGTH_12_8 - Unsigned 13-bit RX Field 5 length value.
  214. //   PKT_RX_FIELD_5_LENGTH_7_0 - Unsigned 13-bit RX Field 5 length value.
  215. //   PKT_RX_FIELD_5_CONFIG - General data processing and packet configuration bits for RX Field 5.
  216. //   PKT_RX_FIELD_5_CRC_CONFIG - Configuration of CRC control bits across RX Field 5.
  217. */
  218. #define RF_PKT_RX_FIELD_3_CRC_CONFIG_9 0x11, 0x12, 0x09, 0x2C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

  219. /*
  220. // Set properties:           RF_MODEM_MOD_TYPE_12
  221. // Number of properties:     12
  222. // Group ID:                 0x20
  223. // Start ID:                 0x00
  224. // Default values:           0x02, 0x80, 0x07, 0x0F, 0x42, 0x40, 0x01, 0xC9, 0xC3, 0x80, 0x00, 0x06,
  225. // Descriptions:
  226. //   MODEM_MOD_TYPE - Selects the type of modulation. In TX mode, additionally selects the source of the modulation.
  227. //   MODEM_MAP_CONTROL - Controls polarity and mapping of transmit and receive bits.
  228. //   MODEM_DSM_CTRL - Miscellaneous control bits for the Delta-Sigma Modulator (DSM) in the PLL Synthesizer.
  229. //   MODEM_DATA_RATE_2 - Unsigned 24-bit value used to determine the TX data rate
  230. //   MODEM_DATA_RATE_1 - Unsigned 24-bit value used to determine the TX data rate
  231. //   MODEM_DATA_RATE_0 - Unsigned 24-bit value used to determine the TX data rate
  232. //   MODEM_TX_NCO_MODE_3 - TX Gaussian filter oversampling ratio and Byte 3 of unsigned 26-bit TX Numerically Controlled Oscillator (NCO) modulus.
  233. //   MODEM_TX_NCO_MODE_2 - TX Gaussian filter oversampling ratio and Byte 3 of unsigned 26-bit TX Numerically Controlled Oscillator (NCO) modulus.
  234. //   MODEM_TX_NCO_MODE_1 - TX Gaussian filter oversampling ratio and Byte 3 of unsigned 26-bit TX Numerically Controlled Oscillator (NCO) modulus.
  235. //   MODEM_TX_NCO_MODE_0 - TX Gaussian filter oversampling ratio and Byte 3 of unsigned 26-bit TX Numerically Controlled Oscillator (NCO) modulus.
  236. //   MODEM_FREQ_DEV_2 - 17-bit unsigned TX frequency deviation word.
  237. //   MODEM_FREQ_DEV_1 - 17-bit unsigned TX frequency deviation word.
  238. */
  239. #define RF_MODEM_MOD_TYPE_12 0x11, 0x20, 0x0C, 0x00, 0x02, 0x00, 0x07, 0x01, 0x86, 0xA0, 0x01, 0xC9, 0xC3, 0x80, 0x00, 0x05

  240. /*
  241. // Set properties:           RF_MODEM_FREQ_DEV_0_1
  242. // Number of properties:     1
  243. // Group ID:                 0x20
  244. // Start ID:                 0x0C
  245. // Default values:           0xD3,
  246. // Descriptions:
  247. //   MODEM_FREQ_DEV_0 - 17-bit unsigned TX frequency deviation word.
  248. */
  249. #define RF_MODEM_FREQ_DEV_0_1 0x11, 0x20, 0x01, 0x0C, 0x76

  250. /*
  251. // Set properties:           RF_MODEM_TX_RAMP_DELAY_8
  252. // Number of properties:     8
  253. // Group ID:                 0x20
  254. // Start ID:                 0x18
  255. // Default values:           0x01, 0x00, 0x08, 0x03, 0xC0, 0x00, 0x10, 0x20,
  256. // Descriptions:
  257. //   MODEM_TX_RAMP_DELAY - TX ramp-down delay setting.
  258. //   MODEM_MDM_CTRL - MDM control.
  259. //   MODEM_IF_CONTROL - Selects Fixed-IF, Scaled-IF, or Zero-IF mode of RX Modem operation.
  260. //   MODEM_IF_FREQ_2 - the IF frequency setting (an 18-bit signed number).
  261. //   MODEM_IF_FREQ_1 - the IF frequency setting (an 18-bit signed number).
  262. //   MODEM_IF_FREQ_0 - the IF frequency setting (an 18-bit signed number).
  263. //   MODEM_DECIMATION_CFG1 - Specifies three decimator ratios for the Cascaded Integrator Comb (CIC) filter.
  264. //   MODEM_DECIMATION_CFG0 - Specifies miscellaneous parameters and decimator ratios for the Cascaded Integrator Comb (CIC) filter.
  265. */
  266. #define RF_MODEM_TX_RAMP_DELAY_8 0x11, 0x20, 0x08, 0x18, 0x01, 0x80, 0x08, 0x03, 0x80, 0x00, 0x20, 0x20

  267. /*
  268. // Set properties:           RF_MODEM_BCR_OSR_1_9
  269. // Number of properties:     9
  270. // Group ID:                 0x20
  271. // Start ID:                 0x22
  272. // Default values:           0x00, 0x4B, 0x06, 0xD3, 0xA0, 0x06, 0xD3, 0x02, 0xC0,
  273. // Descriptions:
  274. //   MODEM_BCR_OSR_1 - RX BCR/Slicer oversampling rate (12-bit unsigned number).
  275. //   MODEM_BCR_OSR_0 - RX BCR/Slicer oversampling rate (12-bit unsigned number).
  276. //   MODEM_BCR_NCO_OFFSET_2 - RX BCR NCO offset value (an unsigned 22-bit number).
  277. //   MODEM_BCR_NCO_OFFSET_1 - RX BCR NCO offset value (an unsigned 22-bit number).
  278. //   MODEM_BCR_NCO_OFFSET_0 - RX BCR NCO offset value (an unsigned 22-bit number).
  279. //   MODEM_BCR_GAIN_1 - The unsigned 11-bit RX BCR loop gain value.
  280. //   MODEM_BCR_GAIN_0 - The unsigned 11-bit RX BCR loop gain value.
  281. //   MODEM_BCR_GEAR - RX BCR loop gear control.
  282. //   MODEM_BCR_MISC1 - Miscellaneous control bits for the RX BCR loop.
  283. */
  284. #define RF_MODEM_BCR_OSR_1_9 0x11, 0x20, 0x09, 0x22, 0x01, 0x77, 0x01, 0x5D, 0x86, 0x00, 0xAF, 0x02, 0xC2

  285. /*
  286. // Set properties:           RF_MODEM_AFC_GEAR_7
  287. // Number of properties:     7
  288. // Group ID:                 0x20
  289. // Start ID:                 0x2C
  290. // Default values:           0x00, 0x23, 0x83, 0x69, 0x00, 0x40, 0xA0,
  291. // Descriptions:
  292. //   MODEM_AFC_GEAR - RX AFC loop gear control.
  293. //   MODEM_AFC_WAIT - RX AFC loop wait time control.
  294. //   MODEM_AFC_GAIN_1 - Sets the gain of the PLL-based AFC acquisition loop, and provides miscellaneous control bits for AFC functionality.
  295. //   MODEM_AFC_GAIN_0 - Sets the gain of the PLL-based AFC acquisition loop, and provides miscellaneous control bits for AFC functionality.
  296. //   MODEM_AFC_LIMITER_1 - Set the AFC limiter value.
  297. //   MODEM_AFC_LIMITER_0 - Set the AFC limiter value.
  298. //   MODEM_AFC_MISC - Specifies miscellaneous AFC control bits.
  299. */
  300. #define RF_MODEM_AFC_GEAR_7 0x11, 0x20, 0x07, 0x2C, 0x04, 0x36, 0x80, 0x1D, 0x11, 0xEC, 0x80

  301. /*
  302. // Set properties:           RF_MODEM_AGC_CONTROL_1
  303. // Number of properties:     1
  304. // Group ID:                 0x20
  305. // Start ID:                 0x35
  306. // Default values:           0xE0,
  307. // Descriptions:
  308. //   MODEM_AGC_CONTROL - Miscellaneous control bits for the Automatic Gain Control (AGC) function in the RX Chain.
  309. */
  310. #define RF_MODEM_AGC_CONTROL_1 0x11, 0x20, 0x01, 0x35, 0xE2

  311. /*
  312. // Set properties:           RF_MODEM_AGC_WINDOW_SIZE_3
  313. // Number of properties:     3
  314. // Group ID:                 0x20
  315. // Start ID:                 0x38
  316. // Default values:           0x11, 0x10, 0x10,
  317. // Descriptions:
  318. //   MODEM_AGC_WINDOW_SIZE - Specifies the size of the measurement and settling windows for the AGC algorithm.
  319. //   MODEM_AGC_RFPD_DECAY - Sets the decay time of the RF peak detectors.
  320. //   MODEM_AGC_IFPD_DECAY - Sets the decay time of the IF peak detectors.
  321. */
  322. #define RF_MODEM_AGC_WINDOW_SIZE_3 0x11, 0x20, 0x03, 0x38, 0x11, 0x52, 0x52

  323. /*
  324. // Set properties:           RF_MODEM_OOK_PDTC_1
  325. // Number of properties:     1
  326. // Group ID:                 0x20
  327. // Start ID:                 0x40
  328. // Default values:           0x2B,
  329. // Descriptions:
  330. //   MODEM_OOK_PDTC - Configures the attack and decay times of the OOK Peak Detector.
  331. */
  332. #define RF_MODEM_OOK_PDTC_1 0x11, 0x20, 0x01, 0x40, 0x2A

  333. /*
  334. // Set properties:           RF_MODEM_OOK_CNT1_9
  335. // Number of properties:     9
  336. // Group ID:                 0x20
  337. // Start ID:                 0x42
  338. // Default values:           0xA4, 0x03, 0x56, 0x02, 0x00, 0xA3, 0x02, 0x80, 0xFF,
  339. // Descriptions:
  340. //   MODEM_OOK_CNT1 - OOK control.
  341. //   MODEM_OOK_MISC - Selects the detector(s) used for demodulation of an OOK signal, or for demodulation of a (G)FSK signal when using the asynchronous demodulator.
  342. //   MODEM_RAW_SEARCH - Defines and controls the search period length for the Moving Average and Min-Max detectors.
  343. //   MODEM_RAW_CONTROL - Defines gain and enable controls for raw / nonstandard mode.
  344. //   MODEM_RAW_EYE_1 - 11 bit eye-open detector threshold.
  345. //   MODEM_RAW_EYE_0 - 11 bit eye-open detector threshold.
  346. //   MODEM_ANT_DIV_MODE - Antenna diversity mode settings.
  347. //   MODEM_ANT_DIV_CONTROL - Specifies controls for the Antenna Diversity algorithm.
  348. //   MODEM_RSSI_THRESH - Configures the RSSI threshold.
  349. */
  350. #define RF_MODEM_OOK_CNT1_9 0x11, 0x20, 0x09, 0x42, 0xA4, 0x02, 0xD6, 0x83, 0x01, 0x20, 0x01, 0x80, 0xFF

  351. /*
  352. // Set properties:           RF_MODEM_RSSI_CONTROL_1
  353. // Number of properties:     1
  354. // Group ID:                 0x20
  355. // Start ID:                 0x4C
  356. // Default values:           0x01,
  357. // Descriptions:
  358. //   MODEM_RSSI_CONTROL - Control of the averaging modes and latching time for reporting RSSI value(s).
  359. */
  360. #define RF_MODEM_RSSI_CONTROL_1 0x11, 0x20, 0x01, 0x4C, 0x00

  361. /*
  362. // Set properties:           RF_MODEM_RSSI_COMP_1
  363. // Number of properties:     1
  364. // Group ID:                 0x20
  365. // Start ID:                 0x4E
  366. // Default values:           0x32,
  367. // Descriptions:
  368. //   MODEM_RSSI_COMP - RSSI compensation value.
  369. */
  370. #define RF_MODEM_RSSI_COMP_1 0x11, 0x20, 0x01, 0x4E, 0x40

  371. /*
  372. // Set properties:           RF_MODEM_CLKGEN_BAND_1
  373. // Number of properties:     1
  374. // Group ID:                 0x20
  375. // Start ID:                 0x51
  376. // Default values:           0x08,
  377. // Descriptions:
  378. //   MODEM_CLKGEN_BAND - Select PLL Synthesizer output divider ratio as a function of frequency band.
  379. */
  380. #define RF_MODEM_CLKGEN_BAND_1 0x11, 0x20, 0x01, 0x51, 0x0A

  381. /*
  382. // Set properties:           RF_MODEM_CHFLT_RX1_CHFLT_COE13_7_0_12
  383. // Number of properties:     12
  384. // Group ID:                 0x21
  385. // Start ID:                 0x00
  386. // Default values:           0xFF, 0xBA, 0x0F, 0x51, 0xCF, 0xA9, 0xC9, 0xFC, 0x1B, 0x1E, 0x0F, 0x01,
  387. // Descriptions:
  388. //   MODEM_CHFLT_RX1_CHFLT_COE13_7_0 - Filter coefficients for the first set of RX filter coefficients.
  389. //   MODEM_CHFLT_RX1_CHFLT_COE12_7_0 - Filter coefficients for the first set of RX filter coefficients.
  390. //   MODEM_CHFLT_RX1_CHFLT_COE11_7_0 - Filter coefficients for the first set of RX filter coefficients.
  391. //   MODEM_CHFLT_RX1_CHFLT_COE10_7_0 - Filter coefficients for the first set of RX filter coefficients.
  392. //   MODEM_CHFLT_RX1_CHFLT_COE9_7_0 - Filter coefficients for the first set of RX filter coefficients.
  393. //   MODEM_CHFLT_RX1_CHFLT_COE8_7_0 - Filter coefficients for the first set of RX filter coefficients.
  394. //   MODEM_CHFLT_RX1_CHFLT_COE7_7_0 - Filter coefficients for the first set of RX filter coefficients.
  395. //   MODEM_CHFLT_RX1_CHFLT_COE6_7_0 - Filter coefficients for the first set of RX filter coefficients.
  396. //   MODEM_CHFLT_RX1_CHFLT_COE5_7_0 - Filter coefficients for the first set of RX filter coefficients.
  397. //   MODEM_CHFLT_RX1_CHFLT_COE4_7_0 - Filter coefficients for the first set of RX filter coefficients.
  398. //   MODEM_CHFLT_RX1_CHFLT_COE3_7_0 - Filter coefficients for the first set of RX filter coefficients.
  399. //   MODEM_CHFLT_RX1_CHFLT_COE2_7_0 - Filter coefficients for the first set of RX filter coefficients.
  400. */
  401. #define RF_MODEM_CHFLT_RX1_CHFLT_COE13_7_0_12 0x11, 0x21, 0x0C, 0x00, 0xCC, 0xA1, 0x30, 0xA0, 0x21, 0xD1, 0xB9, 0xC9, 0xEA, 0x05, 0x12, 0x11

  402. /*
  403. // Set properties:           RF_MODEM_CHFLT_RX1_CHFLT_COE1_7_0_12
  404. // Number of properties:     12
  405. // Group ID:                 0x21
  406. // Start ID:                 0x0C
  407. // Default values:           0xFC, 0xFD, 0x15, 0xFF, 0x00, 0x0F, 0xFF, 0xC4, 0x30, 0x7F, 0xF5, 0xB5,
  408. // Descriptions:
  409. //   MODEM_CHFLT_RX1_CHFLT_COE1_7_0 - Filter coefficients for the first set of RX filter coefficients.
  410. //   MODEM_CHFLT_RX1_CHFLT_COE0_7_0 - Filter coefficients for the first set of RX filter coefficients.
  411. //   MODEM_CHFLT_RX1_CHFLT_COEM0 - Filter coefficients for the first set of RX filter coefficients.
  412. //   MODEM_CHFLT_RX1_CHFLT_COEM1 - Filter coefficients for the first set of RX filter coefficients.
  413. //   MODEM_CHFLT_RX1_CHFLT_COEM2 - Filter coefficients for the first set of RX filter coefficients.
  414. //   MODEM_CHFLT_RX1_CHFLT_COEM3 - Filter coefficients for the first set of RX filter coefficients.
  415. //   MODEM_CHFLT_RX2_CHFLT_COE13_7_0 - Filter coefficients for the second set of RX filter coefficients.
  416. //   MODEM_CHFLT_RX2_CHFLT_COE12_7_0 - Filter coefficients for the second set of RX filter coefficients.
  417. //   MODEM_CHFLT_RX2_CHFLT_COE11_7_0 - Filter coefficients for the second set of RX filter coefficients.
  418. //   MODEM_CHFLT_RX2_CHFLT_COE10_7_0 - Filter coefficients for the second set of RX filter coefficients.
  419. //   MODEM_CHFLT_RX2_CHFLT_COE9_7_0 - Filter coefficients for the second set of RX filter coefficients.
  420. //   MODEM_CHFLT_RX2_CHFLT_COE8_7_0 - Filter coefficients for the second set of RX filter coefficients.
  421. */
  422. #define RF_MODEM_CHFLT_RX1_CHFLT_COE1_7_0_12 0x11, 0x21, 0x0C, 0x0C, 0x0A, 0x04, 0x15, 0xFC, 0x03, 0x00, 0xCC, 0xA1, 0x30, 0xA0, 0x21, 0xD1

  423. /*
  424. // Set properties:           RF_MODEM_CHFLT_RX2_CHFLT_COE7_7_0_12
  425. // Number of properties:     12
  426. // Group ID:                 0x21
  427. // Start ID:                 0x18
  428. // Default values:           0xB8, 0xDE, 0x05, 0x17, 0x16, 0x0C, 0x03, 0x00, 0x15, 0xFF, 0x00, 0x00,
  429. // Descriptions:
  430. //   MODEM_CHFLT_RX2_CHFLT_COE7_7_0 - Filter coefficients for the second set of RX filter coefficients.
  431. //   MODEM_CHFLT_RX2_CHFLT_COE6_7_0 - Filter coefficients for the second set of RX filter coefficients.
  432. //   MODEM_CHFLT_RX2_CHFLT_COE5_7_0 - Filter coefficients for the second set of RX filter coefficients.
  433. //   MODEM_CHFLT_RX2_CHFLT_COE4_7_0 - Filter coefficients for the second set of RX filter coefficients.
  434. //   MODEM_CHFLT_RX2_CHFLT_COE3_7_0 - Filter coefficients for the second set of RX filter coefficients.
  435. //   MODEM_CHFLT_RX2_CHFLT_COE2_7_0 - Filter coefficients for the second set of RX filter coefficients.
  436. //   MODEM_CHFLT_RX2_CHFLT_COE1_7_0 - Filter coefficients for the second set of RX filter coefficients.
  437. //   MODEM_CHFLT_RX2_CHFLT_COE0_7_0 - Filter coefficients for the second set of RX filter coefficients.
  438. //   MODEM_CHFLT_RX2_CHFLT_COEM0 - Filter coefficients for the second set of RX filter coefficients.
  439. //   MODEM_CHFLT_RX2_CHFLT_COEM1 - Filter coefficients for the second set of RX filter coefficients.
  440. //   MODEM_CHFLT_RX2_CHFLT_COEM2 - Filter coefficients for the second set of RX filter coefficients.
  441. //   MODEM_CHFLT_RX2_CHFLT_COEM3 - Filter coefficients for the second set of RX filter coefficients.
  442. */
  443. #define RF_MODEM_CHFLT_RX2_CHFLT_COE7_7_0_12 0x11, 0x21, 0x0C, 0x18, 0xB9, 0xC9, 0xEA, 0x05, 0x12, 0x11, 0x0A, 0x04, 0x15, 0xFC, 0x03, 0x00

  444. /*
  445. // Set properties:           RF_PA_MODE_4
  446. // Number of properties:     4
  447. // Group ID:                 0x22
  448. // Start ID:                 0x00
  449. // Default values:           0x08, 0x7F, 0x00, 0x5D,
  450. // Descriptions:
  451. //   PA_MODE - Selects the PA operating mode, and selects resolution of PA power adjustment (i.e., step size).
  452. //   PA_PWR_LVL - Configuration of PA output power level.
  453. //   PA_BIAS_CLKDUTY - Configuration of the PA Bias and duty cycle of the TX clock source.
  454. //   PA_TC - Configuration of PA ramping parameters.
  455. */
  456. #define RF_PA_MODE_4 0x11, 0x22, 0x04, 0x00, 0x08, 0x7F, 0x00, 0x3D

  457. /*
  458. // Set properties:           RF_SYNTH_PFDCP_CPFF_7
  459. // Number of properties:     7
  460. // Group ID:                 0x23
  461. // Start ID:                 0x00
  462. // Default values:           0x2C, 0x0E, 0x0B, 0x04, 0x0C, 0x73, 0x03,
  463. // Descriptions:
  464. //   SYNTH_PFDCP_CPFF - Feed forward charge pump current selection.
  465. //   SYNTH_PFDCP_CPINT - Integration charge pump current selection.
  466. //   SYNTH_VCO_KV - Gain scaling factors (Kv) for the VCO tuning varactors on both the integrated-path and feed forward path.
  467. //   SYNTH_LPFILT3 - Value of resistor R2 in feed-forward path of loop filter.
  468. //   SYNTH_LPFILT2 - Value of capacitor C2 in feed-forward path of loop filter.
  469. //   SYNTH_LPFILT1 - Value of capacitors C1 and C3 in feed-forward path of loop filter.
  470. //   SYNTH_LPFILT0 - Bias current of the active amplifier in the feed-forward loop filter.
  471. */
  472. #define RF_SYNTH_PFDCP_CPFF_7 0x11, 0x23, 0x07, 0x00, 0x2C, 0x0E, 0x0B, 0x04, 0x0C, 0x73, 0x03

  473. /*
  474. // Set properties:           RF_MATCH_VALUE_1_12
  475. // Number of properties:     12
  476. // Group ID:                 0x30
  477. // Start ID:                 0x00
  478. // Default values:           0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00,
  479. // Descriptions:
  480. //   MATCH_VALUE_1 - Match value to be compared with the result of logically AND-ing (bit-wise) the Mask 1 value with the received Match 1 byte.
  481. //   MATCH_MASK_1 - Mask value to be logically AND-ed (bit-wise) with the Match 1 byte.
  482. //   MATCH_CTRL_1 - Enable for Packet Match functionality, and configuration of Match Byte 1.
  483. //   MATCH_VALUE_2 - Match value to be compared with the result of logically AND-ing (bit-wise) the Mask 2 value with the received Match 2 byte.
  484. //   MATCH_MASK_2 - Mask value to be logically AND-ed (bit-wise) with the Match 2 byte.
  485. //   MATCH_CTRL_2 - Configuration of Match Byte 2.
  486. //   MATCH_VALUE_3 - Match value to be compared with the result of logically AND-ing (bit-wise) the Mask 3 value with the received Match 3 byte.
  487. //   MATCH_MASK_3 - Mask value to be logically AND-ed (bit-wise) with the Match 3 byte.
  488. //   MATCH_CTRL_3 - Configuration of Match Byte 3.
  489. //   MATCH_VALUE_4 - Match value to be compared with the result of logically AND-ing (bit-wise) the Mask 4 value with the received Match 4 byte.
  490. //   MATCH_MASK_4 - Mask value to be logically AND-ed (bit-wise) with the Match 4 byte.
  491. //   MATCH_CTRL_4 - Configuration of Match Byte 4.
  492. */
  493. #define RF_MATCH_VALUE_1_12 0x11, 0x30, 0x0C, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00, 0x00

  494. /*
  495. // Set properties:           RF_FREQ_CONTROL_INTE_8
  496. // Number of properties:     8
  497. // Group ID:                 0x40
  498. // Start ID:                 0x00
  499. // Default values:           0x3C, 0x08, 0x00, 0x00, 0x00, 0x00, 0x20, 0xFF,
  500. // Descriptions:
  501. //   FREQ_CONTROL_INTE - Frac-N PLL Synthesizer integer divide number.
  502. //   FREQ_CONTROL_FRAC_2 - Frac-N PLL fraction number.
  503. //   FREQ_CONTROL_FRAC_1 - Frac-N PLL fraction number.
  504. //   FREQ_CONTROL_FRAC_0 - Frac-N PLL fraction number.
  505. //   FREQ_CONTROL_CHANNEL_STEP_SIZE_1 - EZ Frequency Programming channel step size.
  506. //   FREQ_CONTROL_CHANNEL_STEP_SIZE_0 - EZ Frequency Programming channel step size.
  507. //   FREQ_CONTROL_W_SIZE - Set window gating period (in number of crystal reference clock cycles) for counting VCO frequency during calibration.
  508. //   FREQ_CONTROL_VCOCNT_RX_ADJ - Adjust target count for VCO calibration in RX mode.
  509. */
  510. #define RF_FREQ_CONTROL_INTE_8 0x11, 0x40, 0x08, 0x00, 0x40, 0x0A, 0xAA, 0xAA, 0x44, 0x44, 0x20, 0xFE


  511. // AUTOMATICALLY GENERATED CODE!
  512. // DO NOT EDIT/MODIFY BELOW THIS LINE!
  513. // --------------------------------------------

  514. #ifndef FIRMWARE_LOAD_COMPILE
  515. #define RADIO_CONFIGURATION_DATA_ARRAY { \
  516.         0x07, RF_POWER_UP, \
  517.         0x08, RF_GPIO_PIN_CFG, \
  518.         0x06, RF_GLOBAL_XO_TUNE_2, \
  519.         0x05, RF_GLOBAL_CONFIG_1, \
  520.         0x06, RF_INT_CTL_ENABLE_2, \
  521.         0x08, RF_FRR_CTL_A_MODE_4, \
  522.         0x0D, RF_PREAMBLE_TX_LENGTH_9, \
  523.         0x09, RF_SYNC_CONFIG_5, \
  524.         0x0B, RF_PKT_CRC_CONFIG_7, \
  525.         0x10, RF_PKT_LEN_12, \
  526.         0x10, RF_PKT_FIELD_2_CRC_CONFIG_12, \
  527.         0x10, RF_PKT_FIELD_5_CRC_CONFIG_12, \
  528.         0x0D, RF_PKT_RX_FIELD_3_CRC_CONFIG_9, \
  529.         0x10, RF_MODEM_MOD_TYPE_12, \
  530.         0x05, RF_MODEM_FREQ_DEV_0_1, \
  531.         0x0C, RF_MODEM_TX_RAMP_DELAY_8, \
  532.         0x0D, RF_MODEM_BCR_OSR_1_9, \
  533.         0x0B, RF_MODEM_AFC_GEAR_7, \
  534.         0x05, RF_MODEM_AGC_CONTROL_1, \
  535.         0x07, RF_MODEM_AGC_WINDOW_SIZE_3, \
  536.         0x05, RF_MODEM_OOK_PDTC_1, \
  537. ……………………

  538. …………限于本文篇幅 余下代码请从51黑下载附件…………
复制代码

所有资料51hei提供下载:
radio_config_Si4438.zip (6.13 KB, 下载次数: 27)

评分

参与人数 1黑币 +50 收起 理由
admin + 50 共享资料的黑币奖励!

查看全部评分

回复

使用道具 举报

ID:396096 发表于 2018-9-26 16:33 | 显示全部楼层
正需要,谢楼主
回复

使用道具 举报

您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

手机版|小黑屋|51黑电子论坛 |51黑电子论坛6群 QQ 管理员QQ:125739409;技术交流QQ群281945664

Powered by 单片机教程网

快速回复 返回顶部 返回列表