PAN312x_Rf_CTK_Setting.h 12 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224225226227228229230231232233234235236237238239240241242243244245246247248249250251252253254255256257258259260261262263264265266267268269270271272273274275
  1. /***************************************************************************************************
  2. * This file is generated by PANCHIP RF CTK
  3. * @datetime 2025-08-01 15:11:39
  4. * @device PAN3120
  5. * @fwid 0x0003
  6. * @version 0x0000
  7. ***************************************************************************************************
  8. * Frequency Band(MHz) : 420 <= frequency < 440
  9. * Frequency Base(MHz) : 433.0
  10. * Frequency Step(MHz) : 0.0
  11. * Frequency Channel : 0
  12. * Data Rate Mode : Symbol Rate B
  13. * Modulation : 2FSK
  14. * Tx Power(dBm) : 20
  15. * IE of Tx Done : true
  16. * Power Supply Mode : LDO
  17. * Inductor Package : SMD0603
  18. * IE of Rx Done : true
  19. * IE of Rx Complete : false
  20. * IE of CRC Error : true
  21. * IE of Rx Timeout : false
  22. * IE of Node ID Error : false
  23. * IE of Length Done : false
  24. * IE of Node ID Done : false
  25. * IE of Header CRC Done : false
  26. * IE of Wakeup : false
  27. * IE of Ack Timeout : false
  28. * IE of Ack Error : false
  29. * IE of Syncword Timeout : false
  30. * IE of Tx FIFO Threshold : false
  31. * IE of Rx FIFO Threshold : false
  32. * IE of RSSI Valid : false
  33. * IE of Preamble Done : false
  34. * IE of Syncword Done : false
  35. * IE of Preamble Timeout : false
  36. * IE of RSSI Timeout : false
  37. * WUT Clock Divider : 65536
  38. * RCL Trim Timer : Off
  39. * Auto Clear Status : true
  40. * Idle If Possible : false
  41. * Duty Cycle Period : 0
  42. * Sleep Timer : Off
  43. * Tx Extra Times : 0
  44. * Rx Timeout(us) : 0
  45. * Ack Delay Time(us) : 0
  46. * Ack Timeout(us) : 0
  47. * Ack Check : Off
  48. * Ack Tx Byte : 0x00
  49. * Exit State of Tx Ok : Ready
  50. * Exit State of Ack Timeout : Ready
  51. * Exit State of Ack Error : Ready
  52. * Exit State of Rx Valid : Rx
  53. * Exit State of Rx Invalid : Rx
  54. * Exit State of Rx Timeout : Rx
  55. * Direct Enable : false
  56. * Packet Type : Variable Length
  57. * Node ID Size : 4-bytes
  58. * CRC Mode : CRC-16
  59. * Payload Bit Order : MSB First
  60. * Payload Manchester : Disable
  61. * Whitening : Disable
  62. * Encoding : None
  63. * Preamble Mode : Standard-0101
  64. * Preamble Tx Size : 4
  65. * Preamble Manchester : Disable
  66. * Syncword Size : 4-bytes
  67. * Syncword Value : 0x2dd42dd4
  68. * Syncword Manchester : Disable
  69. * Node ID Position : Before Length
  70. * Tx Node ID Value : 0xaabbccdd
  71. * Packet Filter Mode : Reset
  72. * Packet Filter Interrupt : false
  73. * Packet Filter Mask : 0x00
  74. * Packet Filter Pat1 Enable : true
  75. * Packet Filter Pat1 Value : 0xa0b0c0d0
  76. * Packet Filter Pat2 Enable : true
  77. * Packet Filter Pat2 Value : 0xa1b1c1d1
  78. * Packet Filter Pat3 Enable : true
  79. * Packet Filter Pat3 Value : 0xaabbccdd
  80. * Length Size : 1-byte
  81. * Data Length : 20
  82. * CRC Seed : 0xffff
  83. * CRC Poly : 0x8005
  84. * CRC Range : Include Node ID and Length
  85. * CRC Bit Invert : false
  86. * CRC Byte Order : Big Endian
  87. * CRC Bit Order : MSB First
  88. * TX_DEVIATION : 25000
  89. * RX_DEVIATION : 25000
  90. * DATA_RATE : 50
  91. **************************************************************************************************/
  92. #ifndef PAN312X_RF_CTK_SETTING_H
  93. #define PAN312X_RF_CTK_SETTING_H
  94. #include <stdint.h>
  95. #define __ctk_item_t(N) \
  96. struct{ \
  97. uint16_t addr; \
  98. uint8_t size; \
  99. uint8_t data[N]; \
  100. }
  101. typedef __ctk_item_t(1) ctk_item_t;
  102. #define INDUCTOR_PACKAGE_SMD0603 0x0603
  103. #define INDUCTOR_PACKAGE_SMD0402 0x0402
  104. #define POWER_SUPPLY_MODE_LDO 0
  105. #define POWER_SUPPLY_MODE_DCDC 1
  106. #define __CTK_ITEM_COUNT 25
  107. extern ctk_item_t const * const __CTK_ITEM_ARRAY[__CTK_ITEM_COUNT + 1];
  108. /*******************************************************************************
  109. * frequency configuration
  110. ******************************************************************************/
  111. #define CTK_DEF_FREQUENCY_BASE 433.0
  112. #define CTK_DEF_FREQUENCY_STEP 0.0
  113. #define CTK_DEF_FREQUENCY_CHANNEL 0
  114. #define CTK_DEF_FREQUENCY (CTK_DEF_FREQUENCY_BASE + CTK_DEF_FREQUENCY_STEP * CTK_DEF_FREQUENCY_CHANNEL)
  115. /*******************************************************************************
  116. * data rate configuration
  117. ******************************************************************************/
  118. #define CTK_DEF_DATA_RATE_KHZ 50
  119. #define CTK_DEF_TX_DEVIATION 25000
  120. #define CTK_DEF_RX_DEVIATION 25000
  121. /*******************************************************************************
  122. * power configuration
  123. ******************************************************************************/
  124. #define CTK_DEF_POWER_SUPPLY_MODE POWER_SUPPLY_MODE_LDO
  125. #define CTK_DEF_INDUCTOR_PACKAGE INDUCTOR_PACKAGE_SMD0603
  126. #define CTK_DEF_TX_POWER 20
  127. /*******************************************************************************
  128. * predefined for configuration define
  129. ******************************************************************************/
  130. #define CTK_BIT_ORDER_LSB_FIRST 2
  131. #define CTK_BIT_ORDER_MSB_FIRST 1
  132. #define CTK_BYTE_ORDER_BIG_ENDIAN 1
  133. #define CTK_BYTE_ORDER_LITTLE_ENDIAN 2
  134. #define CTK_CRC_RANGE_DATA_ONLY 1
  135. #define CTK_CRC_RANGE_INCLUDE_NODE_ID_AND_LENGTH 3
  136. #define CTK_DIRECT_DAT_GPIO0_AS_RX 32
  137. #define CTK_DIRECT_DAT_GPIO0_AS_TX 16
  138. #define CTK_DIRECT_DAT_GPIO1_AS_RX 33
  139. #define CTK_DIRECT_DAT_GPIO1_AS_TX 17
  140. #define CTK_DIRECT_DAT_GPIO2_AS_RX 34
  141. #define CTK_DIRECT_DAT_GPIO2_AS_TX 18
  142. #define CTK_DIRECT_DAT_GPIO3_AS_RX 35
  143. #define CTK_DIRECT_DAT_GPIO3_AS_TX 19
  144. #define CTK_DIRECT_MODE_ASYNC 1
  145. #define CTK_DIRECT_MODE_SYNC 2
  146. #define CTK_ENCODING_HAMMING_X3_X2_1 2
  147. #define CTK_ENCODING_HAMMING_X3_X_1 1
  148. #define CTK_EXIT_STATE_READY 1
  149. #define CTK_EXIT_STATE_RX 3
  150. #define CTK_EXIT_STATE_SLEEP 4
  151. #define CTK_EXIT_STATE_TX 2
  152. #define CTK_MANCHESTER_1_TO_01 1
  153. #define CTK_MANCHESTER_1_TO_10 2
  154. #define CTK_MODULATION_2FSK 1
  155. #define CTK_MODULATION_2GFSK 2
  156. #define CTK_MODULATION_GMSK 4
  157. #define CTK_MODULATION_MSK 3
  158. #define CTK_NODE_ID_POSITION_AFTER_LENGTH 2
  159. #define CTK_NODE_ID_POSITION_BEFORE_LENGTH 1
  160. #define CTK_PACKET_FILTER_MODE_KEEP 1
  161. #define CTK_PACKET_FILTER_MODE_RESET 2
  162. #define CTK_PACKET_TYPE_FIXED_LENGTH 1
  163. #define CTK_PACKET_TYPE_VARIABLE_LENGTH 2
  164. #define CTK_PREAMBLE_MODE_NON_STANDARD 1
  165. #define CTK_PREAMBLE_MODE_STANDARD_0101 2
  166. #define CTK_PREAMBLE_MODE_STANDARD_1010 3
  167. #define CTK_SYMBOL_RATE_A 1
  168. #define CTK_SYMBOL_RATE_B 2
  169. #define CTK_WHITENING_IEEE_802_15_4G 10
  170. #define CTK_WHITENING_PN11 11
  171. #define CTK_WHITENING_PN13 13
  172. #define CTK_WHITENING_PN15 15
  173. #define CTK_WHITENING_PN6 6
  174. #define CTK_WHITENING_PN7 7
  175. #define CTK_WHITENING_PN9 9
  176. #define CTK_WHITENING_PN9_CCITT 41
  177. #define CTK_WHITENING_PN9_IBM 25
  178. /*******************************************************************************
  179. * user configuration define
  180. ******************************************************************************/
  181. #define CTK_CONF_FREQUENCY_BAND "420 <= frequency < 440"
  182. #define CTK_CONF_FREQUENCY_BASE 433.0
  183. #define CTK_CONF_FREQUENCY_STEP 0.0
  184. #define CTK_CONF_FREQUENCY_CHANNEL 0
  185. #define CTK_CONF_DATA_RATE_MODE CTK_SYMBOL_RATE_B
  186. #define CTK_CONF_MODULATION CTK_MODULATION_2FSK
  187. #define CTK_CONF_TX_POWER 20
  188. #define CTK_CONF_IE_TX_DONE 1
  189. #define CTK_CONF_POWER_SUPPLY_MODE "LDO"
  190. #define CTK_CONF_INDUCTOR_PACKAGE "SMD0603"
  191. #define CTK_CONF_IE_RX_DONE 1
  192. #define CTK_CONF_IE_RX_COMPLETE 0
  193. #define CTK_CONF_IE_CRC_ERROR 1
  194. #define CTK_CONF_IE_RX_TIMEOUT 0
  195. #define CTK_CONF_IE_NODE_ID_ERROR 0
  196. #define CTK_CONF_IE_LENGTH_DONE 0
  197. #define CTK_CONF_IE_NODE_ID_DONE 0
  198. #define CTK_CONF_IE_HEADER_CRC_DONE 0
  199. #define CTK_CONF_IE_WAKEUP 0
  200. #define CTK_CONF_IE_ACK_TIMEOUT 0
  201. #define CTK_CONF_IE_ACK_ERROR 0
  202. #define CTK_CONF_IE_SYNCWORD_TIMEOUT 0
  203. #define CTK_CONF_IE_TX_FIFO_TH 0
  204. #define CTK_CONF_IE_RX_FIFO_TH 0
  205. #define CTK_CONF_IE_RSSI_VALID 0
  206. #define CTK_CONF_IE_PREAMBLE_DONE 0
  207. #define CTK_CONF_IE_SYNCWORD_DONE 0
  208. #define CTK_CONF_IE_PREAMBLE_TIMEOUT 0
  209. #define CTK_CONF_IE_RSSI_TIMEOUT 0
  210. #define CTK_CONF_WUT_DIV 65536
  211. #define CTK_CONF_RCLTRIM_TIMER_EN 0
  212. #define CTK_CONF_AUTO_CLEAR_STATUS 1
  213. #define CTK_CONF_IDLE_IF_POSSIBLE 0
  214. #define CTK_CONF_DUTY_CYCLE_PERIOD 0
  215. #define CTK_CONF_SLEEP_TIMER_EN 0
  216. #define CTK_CONF_TX_EXTRA_TIMES 0
  217. #define CTK_CONF_RX_TIMEOUT 0
  218. #define CTK_CONF_ACK_DELAY_TIME 0
  219. #define CTK_CONF_ACK_TIMEOUT 0
  220. #define CTK_CONF_ACK_CHECK_EN 0
  221. #define CTK_CONF_ACK_TX_BYTE 0x00
  222. #define CTK_CONF_TX_OK_EXIT_STATE CTK_EXIT_STATE_READY
  223. #define CTK_CONF_ACK_TIMEOUT_EXIT_STATE CTK_EXIT_STATE_READY
  224. #define CTK_CONF_ACK_ERROR_EXIT_STATE CTK_EXIT_STATE_READY
  225. #define CTK_CONF_RX_VALID_EXIT_STATE CTK_EXIT_STATE_RX
  226. #define CTK_CONF_RX_INVALID_EXIT_STATE CTK_EXIT_STATE_RX
  227. #define CTK_CONF_RX_TIMEOUT_EXIT_STATE CTK_EXIT_STATE_RX
  228. #define CTK_CONF_DIRECT_ENABLE 0
  229. #define CTK_CONF_PACKET_TYPE CTK_PACKET_TYPE_VARIABLE_LENGTH
  230. #define CTK_CONF_NODE_ID_SIZE 4
  231. #define CTK_CONF_CRC_MODE 16
  232. #define CTK_CONF_PAYLOAD_BIT_ORDER CTK_BIT_ORDER_MSB_FIRST
  233. #define CTK_CONF_PAYLOAD_MANCHESTER 0
  234. #define CTK_CONF_WHITENING 0
  235. #define CTK_CONF_ENCODING 0
  236. #define CTK_CONF_PREAMBLE_MODE CTK_PREAMBLE_MODE_STANDARD_0101
  237. #define CTK_CONF_PREAMBLE_TX_SIZE 4
  238. #define CTK_CONF_PREAMBLE_MANCHESTER 0
  239. #define CTK_CONF_SYNCWORD_SIZE 4
  240. #define CTK_CONF_SYNCWORD_VALUE 0x2dd42dd4
  241. #define CTK_CONF_SYNCWORD_MANCHESTER 0
  242. #define CTK_CONF_NODE_ID_POSITION CTK_NODE_ID_POSITION_BEFORE_LENGTH
  243. #define CTK_CONF_TX_NODE_ID_VALUE 0xaabbccdd
  244. #define CTK_CONF_PACKET_FILTER_MODE CTK_PACKET_FILTER_MODE_RESET
  245. #define CTK_CONF_PACKET_FILTER_INTERRUPT_EN 0
  246. #define CTK_CONF_PACKET_FILTER_MASK 0x00
  247. #define CTK_CONF_PACKET_FILTER_PAT1_ENABLE 1
  248. #define CTK_CONF_PACKET_FILTER_PAT1_VALUE 0xa0b0c0d0
  249. #define CTK_CONF_PACKET_FILTER_PAT2_ENABLE 1
  250. #define CTK_CONF_PACKET_FILTER_PAT2_VALUE 0xa1b1c1d1
  251. #define CTK_CONF_PACKET_FILTER_PAT3_ENABLE 1
  252. #define CTK_CONF_PACKET_FILTER_PAT3_VALUE 0xaabbccdd
  253. #define CTK_CONF_LENGTH_SIZE 1
  254. #define CTK_CONF_DATA_LENGTH 20
  255. #define CTK_CONF_CRC_SEED 0xffff
  256. #define CTK_CONF_CRC_POLY 0x8005
  257. #define CTK_CONF_CRC_RANGE CTK_CRC_RANGE_INCLUDE_NODE_ID_AND_LENGTH
  258. #define CTK_CONF_CRC_BIT_INVERT 0
  259. #define CTK_CONF_CRC_BYTE_ORDER CTK_BYTE_ORDER_BIG_ENDIAN
  260. #define CTK_CONF_CRC_BIT_ORDER CTK_BIT_ORDER_MSB_FIRST
  261. #define CTK_CONF_TX_DEVIATION 25000
  262. #define CTK_CONF_RX_DEVIATION 25000
  263. #define CTK_CONF_DATA_RATE 50
  264. #endif //PAN312X_RF_CTK_SETTING_H