global_config.h 7.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210
  1. /**
  2. * @file
  3. * @author chipsea
  4. * @brief
  5. * @version 0.1
  6. * @date 2020-11-30
  7. * @copyright Copyright (c) 2020, CHIPSEA Co., Ltd.
  8. * @note
  9. */
  10. /**
  11. ****************************************************************************************
  12. *
  13. * @file global_config.h
  14. *
  15. * @brief This file contains the definitions of index of global configuration which
  16. * will be configured in APP project.
  17. *
  18. *
  19. * $Rev: $
  20. *
  21. ****************************************************************************************
  22. */
  23. #ifndef _GLOBAL_CONFIG_H_
  24. #define _GLOBAL_CONFIG_H_
  25. #include "types.h"
  26. /*******************************************************************************
  27. * software configuration parameters definition
  28. */
  29. #define CONFIG_BASE_ADDR 0x1fff0400
  30. #define SOFT_PARAMETER_NUM 256
  31. // parameter index of configuration array
  32. #define ADV_CHANNEL_INTERVAL 0 // interval between adv channel in the same adv event
  33. #define SCAN_RSP_DELAY 1 // to adjust scan req -> scan rsp delay
  34. #define CONN_REQ_TO_SLAVE_DELAY 2 // to calibrate the delay between conn req & 1st slave conn event
  35. #define SLAVE_CONN_DELAY 3 // to adjust the delay between 2 slave connection events
  36. #define SLAVE_CONN_DELAY_BEFORE_SYNC 4 // to adjust the delay between 2 slave connection events before 1st anchor is acquired
  37. #define MAX_SLEEP_TIME 5 // maximum sleep time in us
  38. #define MIN_SLEEP_TIME 6 // minimum sleep time in us
  39. #define WAKEUP_ADVANCE 7 // wakeup advance time, to cover HW delay, crystal settle time, sw delay, ... etc.
  40. #define WAKEUP_DELAY 8 // cycles of SW delay to wait crystal settle
  41. #define HDC_DIRECT_ADV_INTERVAL 9
  42. #define LDC_DIRECT_ADV_INTERVAL 10
  43. #define LL_SWITCH 11 // Link Layer switch, 1 enable, 0 disable
  44. #define NON_ADV_CHANNEL_INTERVAL 12 // interval between non-adv channel in the same adv event
  45. #define CLOCK_SETTING 14 // HCLK
  46. #define LL_HW_BB_DELAY 15
  47. #define LL_HW_AFE_DELAY 16
  48. #define LL_HW_PLL_DELAY 17
  49. #define LL_HW_RTLP_LOOP_TIMEOUT 18
  50. #define LL_HW_RTLP_1ST_TIMEOUT 19
  51. #define MIN_TIME_TO_STABLE_32KHZ_XOSC 20
  52. #define LL_TX_PKTS_PER_CONN_EVT 21
  53. #define LL_RX_PKTS_PER_CONN_EVT 22
  54. // ============= A1 ROM metal change add
  55. #define DIR_ADV_DELAY 23
  56. #define LL_TX_PWR_TO_REG_BIAS 24
  57. #define LL_SMART_WINDOW_COEF_ALPHA 25
  58. #define LL_SMART_WINDOW_TARGET 26
  59. #define LL_SMART_WINDOW_INCREMENT 27
  60. #define LL_SMART_WINDOW_LIMIT 28
  61. #define LL_SMART_WINDOW_ACTIVE_THD 29
  62. #define LL_SMART_WINDOW_ACTIVE_RANGE 30
  63. #define LL_SMART_WINDOW_FIRST_WINDOW 31
  64. #define LL_HW_Tx_TO_RX_INTV 32
  65. #define LL_HW_Rx_TO_TX_INTV 33
  66. #define INITIAL_STACK_PTR 34
  67. #define ALLOW_TO_SLEEP_TICK_RC32K 35
  68. #define LL_HW_BB_DELAY_ADV 36
  69. #define LL_HW_AFE_DELAY_ADV 37
  70. #define LL_HW_PLL_DELAY_ADV 38
  71. // For scan & master, add 2018-6-15
  72. #define LL_ADV_TO_SCAN_REQ_DELAY 39
  73. #define LL_ADV_TO_CONN_REQ_DELAY 40
  74. #define LL_MOVE_TO_MASTER_DELAY 41
  75. #define LL_HW_TRLP_LOOP_TIMEOUT 42
  76. #define LL_CONN_REQ_WIN_SIZE 43
  77. #define LL_CONN_REQ_WIN_OFFSET 44
  78. #define LL_MASTER_PROCESS_TARGET 45
  79. #define LL_MASTER_TIRQ_DELAY 46
  80. #define LL_HW_BB_DELAY_2MPHY 47
  81. #define LL_HW_AFE_DELAY_2MPHY 48
  82. #define LL_HW_PLL_DELAY_2MPHY 49
  83. #define LL_HW_Tx_TO_RX_INTV_2MPHY 50
  84. #define LL_HW_Rx_TO_TX_INTV_2MPHY 51
  85. #define LL_HW_BB_DELAY_500KPHY 52
  86. #define LL_HW_AFE_DELAY_500KPHY 53
  87. #define LL_HW_PLL_DELAY_500KPHY 54
  88. #define LL_HW_Tx_TO_RX_INTV_500KPHY 55
  89. #define LL_HW_Rx_TO_TX_INTV_500KPHY 56
  90. #define LL_HW_BB_DELAY_125KPHY 57
  91. #define LL_HW_AFE_DELAY_125KPHY 58
  92. #define LL_HW_PLL_DELAY_125KPHY 59
  93. #define LL_HW_Tx_TO_RX_INTV_125KPHY 60
  94. #define LL_HW_Rx_TO_TX_INTV_125KPHY 61
  95. #define LL_HW_TRLP_TO_GAP 62
  96. #define LL_HW_RTLP_TO_GAP 63
  97. #define LL_TRX_NUM_ADAPTIVE_CONFIG 64
  98. #define OSAL_SYS_TICK_WAKEUP_TRIM 65
  99. // ==== A2 add, for secondary adv/scan
  100. #define LL_NOCONN_ADV_EST_TIME 70
  101. #define LL_NOCONN_ADV_MARGIN 71
  102. #define LL_SEC_SCAN_MARGIN 72
  103. #define LL_MIN_SCAN_TIME 73
  104. // Bumblebee ROM code
  105. #define LL_CONN_ADV_EST_TIME 74
  106. #define LL_SCANABLE_ADV_EST_TIME 75
  107. #define MAC_ADDRESS_LOC 80
  108. // ==== For Extended Adv & Periodic adv
  109. #define LL_EXT_ADV_INTER_PRI_CHN_INT 81
  110. #define LL_EXT_ADV_INTER_AUX_CHN_INT 82
  111. #define LL_EXT_ADV_RSC_POOL_PERIOD 83
  112. #define LL_EXT_ADV_RSC_POOL_UNIT 84
  113. #define LL_EXT_ADV_TASK_DURATION 86
  114. #define LL_PRD_ADV_TASK_DURATION 87
  115. #define LL_CONN_TASK_DURATION 88
  116. #define TIMER_ISR_ENTRY_TIME 90 // time from HW timer expiry to ISR entry, unit: us
  117. #define LL_MULTICONN_MASTER_PREEMP 91
  118. #define LL_MULTICONN_SLAVE_PREEMP 92
  119. #define LL_EXT_ADV_INTER_SEC_CHN_INT 93
  120. #define LL_EXT_ADV_PRI_2_SEC_CHN_INT 94
  121. #define LL_EXT_ADV_RSC_PERIOD 95
  122. #define LL_EXT_ADV_RSC_SLOT_DURATION 96
  123. #define LL_PRD_ADV_RSC_PERIOD 97
  124. #define LL_PRD_ADV_RSC_SLOT_DURATION 98
  125. #define LL_EXT_ADV_PROCESS_TARGET 99
  126. #define LL_PRD_ADV_PROCESS_TARGET 100
  127. // ==============
  128. #define RC32_TRACKINK_ALLOW 0x00000001 // enable tracking RC 32KHz clock with 16MHz hclk
  129. #define SLAVE_LATENCY_ALLOW 0x00000002 // slave latency allow switch
  130. #define LL_DEBUG_ALLOW 0x00000004 // enable invoke RAM project debug output fucntion
  131. #define LL_WHITELIST_ALLOW 0x00000008 // enable whitelist filter
  132. #define LL_RC32K_SEL 0x00000010 // select RC32K RTC, otherwise select crystal 32K RTC
  133. #define SIMUL_CONN_ADV_ALLOW 0x00000020 // allow send adv in connect state
  134. #define SIMUL_CONN_SCAN_ALLOW 0x00000040 // allow scan in connect state
  135. #define GAP_DUP_RPT_FILTER_DISALLOW 0x00000100 // duplicate report filter in GAP layer, allow default
  136. // delete 2018-7-17, should use enum H_SYSCLK_SEL
  137. //enum
  138. //{
  139. // CLOCK_16MHZ = 0,
  140. // CLOCK_32MHZ = 1,
  141. // CLOCK_48MHZ = 2,
  142. // CLOCK_64MHZ = 3,
  143. // CLOCK_96MHZ = 4,
  144. // CLOCK_32MHZ_DBL=5
  145. //};
  146. //extern uint32 global_config[SOFT_PARAMETER_NUM];
  147. extern uint32 *pGlobal_config; // note: app project needn't this variable
  148. #endif // _GLOBAL_CONFIG_H_