global_config.h 7.8 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196
  1. /**************************************************************************************************
  2. Phyplus Microelectronics Limited confidential and proprietary.
  3. All rights reserved.
  4. IMPORTANT: All rights of this software belong to Phyplus Microelectronics
  5. Limited ("Phyplus"). Your use of this Software is limited to those
  6. specific rights granted under the terms of the business contract, the
  7. confidential agreement, the non-disclosure agreement and any other forms
  8. of agreements as a customer or a partner of Phyplus. You may not use this
  9. Software unless you agree to abide by the terms of these agreements.
  10. You acknowledge that the Software may not be modified, copied,
  11. distributed or disclosed unless embedded on a Phyplus Bluetooth Low Energy
  12. (BLE) integrated circuit, either as a product or is integrated into your
  13. products. Other than for the aforementioned purposes, you may not use,
  14. reproduce, copy, prepare derivative works of, modify, distribute, perform,
  15. display or sell this Software and/or its documentation for any purposes.
  16. YOU FURTHER ACKNOWLEDGE AND AGREE THAT THE SOFTWARE AND DOCUMENTATION ARE
  17. PROVIDED AS IS WITHOUT WARRANTY OF ANY KIND, EITHER EXPRESS OR IMPLIED,
  18. INCLUDING WITHOUT LIMITATION, ANY WARRANTY OF MERCHANTABILITY, TITLE,
  19. NON-INFRINGEMENT AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL
  20. PHYPLUS OR ITS SUBSIDIARIES BE LIABLE OR OBLIGATED UNDER CONTRACT,
  21. NEGLIGENCE, STRICT LIABILITY, CONTRIBUTION, BREACH OF WARRANTY, OR OTHER
  22. LEGAL EQUITABLE THEORY ANY DIRECT OR INDIRECT DAMAGES OR EXPENSES
  23. INCLUDING BUT NOT LIMITED TO ANY INCIDENTAL, SPECIAL, INDIRECT, PUNITIVE
  24. OR CONSEQUENTIAL DAMAGES, LOST PROFITS OR LOST DATA, COST OF PROCUREMENT
  25. OF SUBSTITUTE GOODS, TECHNOLOGY, SERVICES, OR ANY CLAIMS BY THIRD PARTIES
  26. (INCLUDING BUT NOT LIMITED TO ANY DEFENSE THEREOF), OR OTHER SIMILAR COSTS.
  27. **************************************************************************************************/
  28. /**
  29. ****************************************************************************************
  30. *
  31. * @file global_config.h
  32. *
  33. * @brief This file contains the definitions of index of global configuration which
  34. * will be configured in APP project.
  35. *
  36. *
  37. * $Rev: $
  38. *
  39. ****************************************************************************************
  40. */
  41. #ifndef _GLOBAL_CONFIG_H_
  42. #define _GLOBAL_CONFIG_H_
  43. #include "types.h"
  44. /*******************************************************************************
  45. * software configuration parameters definition
  46. */
  47. #define CONFIG_BASE_ADDR 0x1fff0C00
  48. #define SOFT_PARAMETER_NUM 256
  49. // parameter index of configuration array
  50. #define ADV_CHANNEL_INTERVAL 0 // interval between adv channel in the same adv event
  51. #define SCAN_RSP_DELAY 1 // to adjust scan req -> scan rsp delay
  52. #define CONN_REQ_TO_SLAVE_DELAY 2 // to calibrate the delay between conn req & 1st slave conn event
  53. #define SLAVE_CONN_DELAY 3 // to adjust the delay between 2 slave connection events
  54. #define SLAVE_CONN_DELAY_BEFORE_SYNC 4 // to adjust the delay between 2 slave connection events before 1st anchor is acquired
  55. #define MAX_SLEEP_TIME 5 // maximum sleep time in us
  56. #define MIN_SLEEP_TIME 6 // minimum sleep time in us
  57. #define WAKEUP_ADVANCE 7 // wakeup advance time, to cover HW delay, crystal settle time, sw delay, ... etc.
  58. #define WAKEUP_DELAY 8 // cycles of SW delay to wait crystal settle
  59. #define HDC_DIRECT_ADV_INTERVAL 9
  60. #define LDC_DIRECT_ADV_INTERVAL 10
  61. #define LL_SWITCH 11 // Link Layer switch, 1 enable, 0 disable
  62. #define CLOCK_SETTING 14 // HCLK
  63. #define LL_HW_BB_DELAY 15
  64. #define LL_HW_AFE_DELAY 16
  65. #define LL_HW_PLL_DELAY 17
  66. #define LL_HW_RTLP_LOOP_TIMEOUT 18
  67. #define LL_HW_RTLP_1ST_TIMEOUT 19
  68. #define MIN_TIME_TO_STABLE_32KHZ_XOSC 20
  69. #define LL_TX_PKTS_PER_CONN_EVT 21
  70. #define LL_RX_PKTS_PER_CONN_EVT 22
  71. // ============= A1 ROM metal change add
  72. #define DIR_ADV_DELAY 23
  73. #define LL_TX_PWR_TO_REG_BIAS 24
  74. #define LL_SMART_WINDOW_COEF_ALPHA 25
  75. #define LL_SMART_WINDOW_TARGET 26
  76. #define LL_SMART_WINDOW_INCREMENT 27
  77. #define LL_SMART_WINDOW_LIMIT 28
  78. #define LL_SMART_WINDOW_ACTIVE_THD 29
  79. #define LL_SMART_WINDOW_ACTIVE_RANGE 30
  80. #define LL_SMART_WINDOW_FIRST_WINDOW 31
  81. #define LL_HW_Tx_TO_RX_INTV 32
  82. #define LL_HW_Rx_TO_TX_INTV 33
  83. #define INITIAL_STACK_PTR 34
  84. #define ALLOW_TO_SLEEP_TICK_RC32K 35
  85. #define LL_HW_BB_DELAY_ADV 36
  86. #define LL_HW_AFE_DELAY_ADV 37
  87. #define LL_HW_PLL_DELAY_ADV 38
  88. // For scan & master, add 2018-6-15
  89. #define LL_ADV_TO_SCAN_REQ_DELAY 39
  90. #define LL_ADV_TO_CONN_REQ_DELAY 40
  91. #define LL_MOVE_TO_MASTER_DELAY 41
  92. #define LL_HW_TRLP_LOOP_TIMEOUT 42
  93. #define LL_CONN_REQ_WIN_SIZE 43
  94. #define LL_CONN_REQ_WIN_OFFSET 44
  95. #define LL_MASTER_PROCESS_TARGET 45
  96. #define LL_MASTER_TIRQ_DELAY 46
  97. //for PHY updated add 2018-11-07
  98. #define LL_HW_BB_DELAY_2MPHY 47
  99. #define LL_HW_AFE_DELAY_2MPHY 48
  100. #define LL_HW_PLL_DELAY_2MPHY 49
  101. #define LL_HW_Tx_TO_RX_INTV_2MPHY 50
  102. #define LL_HW_Rx_TO_TX_INTV_2MPHY 51
  103. #define LL_HW_BB_DELAY_500KPHY 52
  104. #define LL_HW_AFE_DELAY_500KPHY 53
  105. #define LL_HW_PLL_DELAY_500KPHY 54
  106. #define LL_HW_Tx_TO_RX_INTV_500KPHY 55
  107. #define LL_HW_Rx_TO_TX_INTV_500KPHY 56
  108. #define LL_HW_BB_DELAY_125KPHY 57
  109. #define LL_HW_AFE_DELAY_125KPHY 58
  110. #define LL_HW_PLL_DELAY_125KPHY 59
  111. #define LL_HW_Tx_TO_RX_INTV_125KPHY 60
  112. #define LL_HW_Rx_TO_TX_INTV_125KPHY 61
  113. #define LL_HW_TRLP_TO_GAP 62
  114. #define LL_HW_RTLP_TO_GAP 63
  115. #define LL_TRX_NUM_ADAPTIVE_CONFIG 64
  116. #define OSAL_SYS_TICK_WAKEUP_TRIM 65
  117. // ==== A2 add, for secondary adv/scan
  118. #define LL_NOCONN_ADV_EST_TIME 70
  119. #define LL_NOCONN_ADV_MARGIN 71
  120. #define LL_SEC_SCAN_MARGIN 72
  121. #define LL_MIN_SCAN_TIME 73
  122. #define MAC_ADDRESS_LOC 80
  123. // ==============
  124. #define RC32_TRACKINK_ALLOW 0x00000001 // enable tracking RC 32KHz clock with 16MHz hclk
  125. #define SLAVE_LATENCY_ALLOW 0x00000002 // slave latency allow switch
  126. #define LL_DEBUG_ALLOW 0x00000004 // enable invoke RAM project debug output fucntion
  127. #define LL_WHITELIST_ALLOW 0x00000008 // enable whitelist filter
  128. #define LL_RC32K_SEL 0x00000010 // select RC32K RTC, otherwise select crystal 32K RTC
  129. #define SIMUL_CONN_ADV_ALLOW 0x00000020 // allow send adv in connect state
  130. #define SIMUL_CONN_SCAN_ALLOW 0x00000040 // allow scan in connect state
  131. #define GAP_DUP_RPT_FILTER_DISALLOW 0x00000100 // duplicate report filter in GAP layer, allow default
  132. // delete 2018-7-17, should use enum H_SYSCLK_SEL
  133. //enum
  134. //{
  135. // CLOCK_16MHZ = 0,
  136. // CLOCK_32MHZ = 1,
  137. // CLOCK_48MHZ = 2,
  138. // CLOCK_64MHZ = 3,
  139. // CLOCK_96MHZ = 4,
  140. // CLOCK_32MHZ_DBL=5
  141. //};
  142. //extern uint32 global_config[SOFT_PARAMETER_NUM];
  143. extern uint32 *pGlobal_config; // note: app project needn't this variable
  144. #endif // _GLOBAL_CONFIG_H_