1 //*****************************************************************************
2 //
3 //! @file am_hal_ble_patch.c
4 //!
5 //! @brief This is a binary patch for the BLE core.
6 //!
7 //! @addtogroup BLE3patch BLE_Patch - BLE Patch
8 //! @ingroup apollo3_hal
9 //! @{
10 //
11 //*****************************************************************************
12 
13 //*****************************************************************************
14 //
15 // Copyright (c) 2024, Ambiq Micro, Inc.
16 // All rights reserved.
17 //
18 // Redistribution and use in source and binary forms, with or without
19 // modification, are permitted provided that the following conditions are met:
20 //
21 // 1. Redistributions of source code must retain the above copyright notice,
22 // this list of conditions and the following disclaimer.
23 //
24 // 2. Redistributions in binary form must reproduce the above copyright
25 // notice, this list of conditions and the following disclaimer in the
26 // documentation and/or other materials provided with the distribution.
27 //
28 // 3. Neither the name of the copyright holder nor the names of its
29 // contributors may be used to endorse or promote products derived from this
30 // software without specific prior written permission.
31 //
32 // THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
33 // AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
34 // IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
35 // ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
36 // LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
37 // CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
38 // SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
39 // INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
40 // CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
41 // ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
42 // POSSIBILITY OF SUCH DAMAGE.
43 //
44 // This is part of revision release_sdk_3_2_0-dd5f40c14b of the AmbiqSuite Development Package.
45 //
46 //*****************************************************************************
47 
48 #include "am_mcu_apollo.h"
49 
50 //*****************************************************************************
51 //
52 // BLE LL local supported feature flags.
53 //
54 //     Bit position | Link Layer Feature
55 //     0            | LE Encryption
56 //     1            | Connection Parameters Request Procedure
57 //     2            | Extended Reject Indication
58 //     3            | Slave-initiated Features Exchange
59 //     4            | LE Ping
60 //     5            | LE Data Packet Length Extension
61 //     6            | LL Privacy
62 //     7            | Extended Scanner Filter Policies
63 //
64 // Specified 4.6 Feature Support, Link Layer Specification, Core V4.2.
65 //
66 //*****************************************************************************
67 #ifndef AM_HAL_BLE_LOCAL_FEATURE
68 #define AM_HAL_BLE_LOCAL_FEATURE    0x21
69 #endif
70 
71 //*****************************************************************************
72 //
73 // Patches included in this file.
74 //
75 //*****************************************************************************
76 am_hal_ble_patch_t am_ble_buffer_patch;
77 am_hal_ble_patch_t am_ble_performance_patch;
78 am_hal_ble_patch_t am_ble_performance_copy_patch;
79 am_hal_ble_patch_t am_ble_nvds_patch;
80 
81 //*****************************************************************************
82 //
83 // Patch application order.
84 //
85 //*****************************************************************************
86 am_hal_ble_patch_t *am_hal_ble_default_patch_array[] =
87 {
88     // FTCODE patches (type 0xAA)
89 
90     // RAMCODE patches (type 0xBB)
91     &am_ble_performance_patch,
92 
93     // Standard patches (type 0xCC)
94     &am_ble_buffer_patch,
95 
96     // nvds param (type 0xDD)
97     &am_ble_nvds_patch,
98 };
99 
100 am_hal_ble_patch_t *am_hal_ble_default_copy_patch_array[] =
101 {
102     // FTCODE patches (type 0xAA)
103 
104     // RAMCODE patches (type 0xBB)
105     &am_ble_performance_copy_patch,
106 
107 };
108 
109 #define AM_HAL_BLE_NUM_DEFAULT_PATCHES                                        \
110     (sizeof(am_hal_ble_default_patch_array) /                                 \
111      sizeof(am_hal_ble_default_patch_array[0]))
112 
113 am_hal_ble_patch_t **am_hal_ble_default_patches = am_hal_ble_default_patch_array;
114 am_hal_ble_patch_t **am_hal_ble_default_copy_patches = am_hal_ble_default_copy_patch_array;
115 
116 const uint32_t am_hal_ble_num_default_patches = AM_HAL_BLE_NUM_DEFAULT_PATCHES;
117 
118 //*****************************************************************************
119 //
120 // Patch Name:  RAMCODE COPY PATCH v1.10    for Apollo3 A1
121 //
122 // Bi-directional data fix
123 // Modulation deviation fix
124 // Extend patch memory
125 // Transmit speed patch
126 // Added AGC table and enabled AGC
127 // Added local feature support setting
128 // Set VCO to 250mv
129 // Modex auto calibration update
130 // Fix connection interval calculation issue
131 // Increase RF LDO ref voltage form 1.0v to 1.1v
132 // Decrease DAC channel delay cycle
133 // Increase the VCO swing from 250mv to 300mv
134 // Fix MD trans schedule issue (disabled)
135 // Fix link loss issue
136 // Reduce duration from TX to TX
137 // Optimized 32K XO frequency calculation
138 // Fix channel map rejected issue
139 // Optimized AGC Table
140 // Date:        2019-01-30
141 //*****************************************************************************
142 
143 const am_hal_ble_buffer(0x0912) am_ble_performance_copy_patch_data =
144 {
145     .bytes =
146     {
147         0x00,0x11,0x6e,0x00,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x01,0x01,0xc5,0x01,
148         0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
149         0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,0x70,0xb5,0x00,0x20,0x0c,0x49,0x49,0x88,
150         0x0c,0x4a,0x8b,0x18,0x1a,0x88,0x0c,0x49,0x9b,0x1c,0x00,0x24,0x13,0x25,0x2d,0x02,
151         0x0c,0x54,0x40,0x1c,0xa8,0x42,0xfb,0xdb,0x00,0x20,0x00,0x2a,0x04,0xdd,0x1c,0x5c,
152         0x0c,0x54,0x40,0x1c,0x90,0x42,0xfa,0xdb,0x04,0x48,0x80,0x47,0x00,0x20,0x70,0xbd,
153         0x00,0x48,0x00,0x20,0x02,0x48,0x00,0x20,0x00,0x35,0x00,0x20,0xaf,0x33,0x01,0x00,
154         0xa0,0x08,0x1f,0xb5,0x00,0x24,0x00,0x98,0x1d,0x28,0x43,0xd2,0x01,0x00,0x79,0x44,
155         0x09,0x79,0x49,0x18,0x8f,0x44,0x0e,0x13,0x40,0x1a,0x25,0x40,0x40,0x40,0x40,0x40,
156         0x40,0x40,0x40,0x40,0x40,0x40,0x2a,0x40,0x40,0x40,0x40,0x2d,0x40,0x32,0x40,0x35,
157         0x38,0x40,0x40,0x00,0x01,0x98,0xc0,0xb2,0x00,0xf0,0x07,0xfa,0x2c,0xe0,0x02,0x98,
158         0xc1,0xb2,0x01,0x98,0xc0,0xb2,0x00,0xf0,0xb8,0xf8,0x25,0xe0,0x06,0x98,0x83,0xb2,
159         0x03,0x98,0x82,0xb2,0x02,0x98,0xc1,0xb2,0x01,0x98,0xc0,0xb2,0x00,0xf0,0x71,0xf9,
160         0x1a,0xe0,0x01,0x98,0xc0,0xb2,0x00,0xf0,0x0a,0xf9,0x15,0xe0,0x00,0xf0,0x29,0xf8,
161         0x12,0xe0,0x01,0x98,0x80,0xb2,0x00,0xf0,0x62,0xf9,0x0d,0xe0,0x00,0xf0,0x3b,0xfb,
162         0x0a,0xe0,0x00,0xf0,0x94,0xfb,0x07,0xe0,0x01,0x98,0xc0,0xb2,0x00,0xf0,0xc7,0xfa,
163         0x04,0x46,0x01,0xe0,0x00,0x24,0xe4,0x43,0x20,0x46,0x04,0xb0,0x10,0xbd,0x03,0xb4,
164         0x01,0x48,0x01,0x90,0x01,0xbd,0x39,0x27,0x00,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,
165         0x01,0xbd,0x95,0x28,0x00,0x00,0x03,0xb4,0x01,0x48,0x01,0x90,0x01,0xbd,0x01,0x01,
166         0x00,0x00,0xf0,0xb4,0x00,0x20,0x43,0x22,0x12,0x06,0x51,0x68,0xff,0x24,0x01,0x34,
167         0x21,0x43,0x51,0x60,0x51,0x68,0x23,0x03,0x19,0x43,0x51,0x60,0xa3,0x23,0xdb,0x05,
168         0x19,0x68,0x49,0x08,0x49,0x00,0x19,0x60,0x2a,0x49,0x09,0x69,0xce,0xb2,0x29,0x4d,
169         0x2a,0x4f,0x29,0x88,0xb9,0x42,0x01,0xd3,0x04,0x20,0x0d,0xe0,0x28,0x4f,0xb9,0x42,
170         0x01,0xd3,0x03,0x20,0x08,0xe0,0x26,0x4f,0xb9,0x42,0x01,0xd3,0x02,0x20,0x03,0xe0,
171         0x25,0x4f,0xb9,0x42,0x00,0xd3,0x01,0x20,0x24,0x4f,0x39,0x18,0x20,0x31,0x09,0x7e,
172         0xb1,0x42,0x09,0xda,0x00,0x28,0x01,0xdd,0x40,0x1e,0x40,0xb2,0x39,0x18,0x09,0x7a,
173         0x40,0x00,0xc0,0x19,0x00,0x8b,0x0b,0xe0,0x04,0x28,0x04,0xda,0x39,0x5c,0xb1,0x42,
174         0x01,0xdb,0x40,0x1c,0x40,0xb2,0x39,0x18,0x09,0x7a,0x40,0x00,0xc0,0x19,0x00,0x8b,
175         0x17,0x4e,0x31,0x62,0x19,0x68,0x49,0x08,0x49,0x00,0x19,0x60,0x15,0x4e,0x31,0x6b,
176         0x0f,0x46,0x27,0x43,0x37,0x63,0x98,0x62,0xa1,0x43,0x31,0x63,0x28,0x80,0x51,0x68,
177         0xb0,0x03,0x81,0x43,0x10,0x48,0x00,0x78,0xc0,0x07,0xc0,0x0f,0x03,0x05,0x19,0x43,
178         0x51,0x60,0x51,0x68,0x00,0x02,0xa1,0x43,0x01,0x43,0x51,0x60,0xf0,0xbc,0x70,0x47,
179         0x00,0x00,0x80,0x00,0x80,0x45,0x4e,0x60,0x00,0x20,0xf6,0x3f,0x00,0x00,0xf6,0x38,
180         0x00,0x00,0xf6,0x2d,0x00,0x00,0xf6,0x09,0x00,0x00,0xfc,0x67,0x00,0x20,0x80,0x04,
181         0xc0,0x50,0x40,0x00,0x80,0x45,0x3a,0x60,0x00,0x20,0xf0,0xb5,0x82,0xb0,0x43,0x22,
182         0x12,0x06,0x53,0x68,0x01,0x24,0x64,0x04,0x23,0x43,0x53,0x60,0xca,0x07,0xd2,0x0f,
183         0x96,0x46,0x8a,0x07,0xd3,0x0f,0x4a,0x07,0xd4,0x0f,0x0a,0x07,0xd2,0x0f,0x01,0x92,
184         0xca,0x06,0xd2,0x0f,0x00,0x92,0x8a,0x06,0xd2,0x0f,0x94,0x46,0x4a,0x06,0xd5,0x0f,
185         0xce,0x09,0x1f,0x4a,0x11,0x68,0x03,0x27,0x7f,0x05,0xb9,0x43,0x12,0x69,0x1d,0x4f,
186         0x3a,0x40,0x00,0x28,0x06,0xd0,0x01,0x28,0x09,0xd0,0x01,0x27,0xbf,0x05,0x02,0x28,
187         0x03,0xd0,0x39,0x43,0x00,0x28,0x06,0xd0,0x1b,0xe0,0x39,0x43,0xfa,0xe7,0x01,0x27,
188         0x7f,0x05,0x39,0x43,0xf6,0xe7,0x30,0x03,0x10,0x43,0x6a,0x01,0x10,0x43,0x62,0x46,
189         0xd2,0x02,0x10,0x43,0x00,0x9a,0xd2,0x01,0x10,0x43,0x01,0x9a,0x92,0x01,0x10,0x43,
190         0xa2,0x02,0x10,0x43,0x5a,0x02,0x10,0x43,0x72,0x46,0x12,0x02,0x10,0x43,0x08,0x4a,
191         0x10,0x61,0x07,0x48,0x01,0x60,0x43,0x20,0x00,0x06,0x41,0x68,0x01,0x22,0x52,0x04,
192         0x91,0x43,0x05,0x4a,0x12,0x78,0xd2,0x07,0x92,0x0b,0x11,0x43,0x41,0x60,0x02,0xb0,
193         0xf0,0xbd,0x00,0x00,0xc0,0x43,0x03,0xe0,0xff,0xff,0x3a,0x60,0x00,0x20,0xf8,0xb5,
194         0x00,0x24,0x43,0x20,0x00,0x06,0x41,0x68,0x01,0x27,0xbf,0x03,0x39,0x43,0x41,0x60,
195         0x41,0x68,0xba,0x00,0x11,0x43,0x41,0x60,0x21,0x48,0x05,0x68,0x51,0x1c,0x0d,0x43,
196         0x05,0x60,0x1f,0x4e,0xc8,0x20,0xb0,0x47,0x1f,0x49,0x88,0x68,0x38,0x43,0x88,0x60,
197         0x0e,0x46,0xf0,0x68,0x00,0x04,0xc7,0x0f,0x1a,0x49,0x01,0x20,0x88,0x47,0x20,0x46,
198         0x1a,0x49,0x64,0x1c,0x88,0x42,0x01,0xd8,0x00,0x2f,0xf2,0xd0,0x18,0x48,0x05,0x40,
199         0x13,0x48,0x05,0x60,0x01,0x20,0x40,0x03,0xb0,0x60,0xf1,0x68,0x15,0x48,0x01,0x40,
200         0x70,0x68,0x14,0x4a,0x10,0x40,0x08,0x43,0x70,0x60,0x30,0x68,0x3f,0x21,0x89,0x02,
201         0x88,0x43,0x30,0x60,0x43,0x21,0x09,0x06,0x4a,0x68,0x01,0x20,0x80,0x03,0x82,0x43,
202         0x0e,0x48,0x00,0x78,0xc0,0x07,0xc0,0x0f,0x83,0x03,0x1a,0x43,0x4a,0x60,0x4a,0x68,
203         0x01,0x23,0x1b,0x04,0x9a,0x43,0x00,0x04,0x02,0x43,0x4a,0x60,0xf8,0xbd,0x00,0x00,
204         0x40,0x52,0xa1,0x3b,0x00,0x00,0x00,0x00,0xc0,0x51,0x10,0x27,0x00,0x00,0xfe,0xff,
205         0xfe,0xff,0x3f,0x3f,0x00,0x00,0xc0,0xc0,0xff,0xff,0x3a,0x60,0x00,0x20,0x70,0x47,
206         0x00,0x00,0xf0,0xb5,0x83,0xb0,0x08,0x25,0x3c,0x49,0x00,0x20,0x08,0x70,0x43,0x20,
207         0x00,0x06,0x41,0x68,0xaa,0x02,0x11,0x43,0x41,0x60,0x29,0x27,0x38,0x49,0x7f,0x06,
208         0xf9,0x60,0x41,0x68,0x37,0x4b,0x91,0x43,0x1b,0x78,0xdb,0x07,0x9b,0x0c,0x19,0x43,
209         0x41,0x60,0x25,0x24,0xa4,0x01,0x41,0x68,0x11,0x43,0x41,0x60,0x41,0x68,0x52,0x10,
210         0x11,0x43,0x41,0x60,0xf8,0x68,0x03,0x21,0x49,0x06,0x88,0x43,0x56,0x03,0x06,0x43,
211         0x90,0x03,0x06,0x43,0xb8,0x68,0x01,0x20,0xff,0xf7,0x81,0xfe,0x21,0x46,0x10,0x20,
212         0xff,0xf7,0x83,0xfe,0x28,0x03,0x06,0x43,0x00,0x24,0x00,0x2d,0x0c,0xd9,0xfe,0x60,
213         0x25,0x49,0x64,0x20,0x88,0x47,0xf8,0x68,0x69,0x46,0x00,0x0a,0x80,0x1c,0x08,0x55,
214         0x64,0x1c,0xe4,0xb2,0xac,0x42,0xf2,0xd3,0x6a,0x46,0xd0,0x79,0x91,0x79,0x40,0x18,
215         0x51,0x79,0x12,0x79,0x89,0x18,0x40,0x18,0x6a,0x46,0xd1,0x78,0x41,0x18,0x90,0x78,
216         0x09,0x18,0x50,0x78,0x09,0x18,0x10,0x78,0x08,0x18,0x29,0x46,0xff,0xf7,0x63,0xfe,
217         0x12,0x49,0xc0,0xb2,0x08,0x70,0x39,0x68,0x01,0x22,0x92,0x02,0x11,0x43,0x39,0x60,
218         0x40,0x00,0x40,0x1c,0x78,0x61,0x00,0x20,0xff,0xf7,0x49,0xfe,0x43,0x21,0x09,0x06,
219         0x4a,0x68,0x01,0x20,0x00,0x03,0x82,0x43,0x0a,0x48,0x00,0x78,0xc0,0x07,0xc0,0x0f,
220         0x03,0x03,0x1a,0x43,0x4a,0x60,0x4a,0x68,0x01,0x23,0x5b,0x03,0x9a,0x43,0x40,0x03,
221         0x02,0x43,0x4a,0x60,0x03,0xb0,0xf0,0xbd,0x00,0x00,0x70,0x60,0x00,0x20,0xcc,0x34,
222         0x63,0x02,0x3a,0x60,0x00,0x20,0xa1,0x3b,0x00,0x00,0x70,0xb4,0x43,0x21,0x09,0x06,
223         0x48,0x68,0x01,0x24,0xa4,0x04,0x20,0x43,0x48,0x60,0xc4,0x20,0x87,0x22,0xd2,0x05,
224         0x10,0x60,0x5c,0x48,0x50,0x61,0x48,0x68,0x5c,0x4a,0xa0,0x43,0x12,0x78,0xd2,0x07,
225         0xd2,0x0f,0x93,0x04,0x18,0x43,0x48,0x60,0x8b,0x20,0x58,0x4b,0xc0,0x05,0x43,0x63,
226         0x58,0x4b,0x01,0x25,0xdd,0x60,0x06,0x25,0xcd,0x60,0x05,0x25,0xc5,0x63,0x85,0x68,
227         0x6d,0x08,0xf0,0x3d,0x85,0x60,0xc5,0x68,0x6d,0x08,0x5d,0x35,0xc5,0x60,0x05,0x69,
228         0x6d,0x08,0x05,0x61,0x45,0x69,0x6d,0x08,0x45,0x61,0x85,0x69,0x6d,0x08,0x85,0x61,
229         0xc5,0x69,0x6d,0x08,0xc5,0x61,0x05,0x6a,0x6d,0x08,0x05,0x62,0x45,0x6a,0x6d,0x08,
230         0x45,0x62,0x85,0x6a,0x6d,0x08,0x85,0x62,0xc5,0x6a,0x6d,0x08,0xc5,0x62,0x01,0x25,
231         0x1d,0x61,0x5d,0x62,0x9d,0x63,0x43,0x4b,0x1d,0x60,0x43,0x4d,0x5d,0x61,0x1d,0x6a,
232         0x6d,0x08,0x1d,0x62,0xc3,0x6a,0x01,0x25,0x2b,0x43,0xc3,0x62,0x48,0x68,0xa3,0x10,
233         0x18,0x43,0x48,0x60,0x48,0x68,0x9b,0x10,0x18,0x43,0x48,0x60,0x3d,0x48,0x3b,0x4b,
234         0x43,0x61,0x83,0x68,0x3f,0x25,0xad,0x05,0x2b,0x43,0x83,0x60,0x00,0x23,0xc3,0x60,
235         0x39,0x4b,0x83,0x61,0x39,0x4d,0x2b,0x68,0x1e,0x26,0xb3,0x43,0x2b,0x60,0x83,0x6a,
236         0xf5,0x03,0xab,0x43,0x1b,0x19,0x83,0x62,0x48,0x68,0xa3,0x10,0x98,0x43,0x13,0x04,
237         0x18,0x43,0x48,0x60,0x48,0x68,0x23,0x11,0x98,0x43,0x93,0x03,0x18,0x43,0x48,0x60,
238         0x48,0x68,0x63,0x11,0x18,0x43,0x48,0x60,0x29,0x20,0x40,0x06,0x04,0x6a,0x24,0x09,
239         0x24,0x01,0x08,0x34,0x04,0x62,0x48,0x68,0x98,0x43,0x53,0x03,0x18,0x43,0x48,0x60,
240         0x48,0x68,0x01,0x23,0x1b,0x05,0x18,0x43,0x48,0x60,0x28,0x24,0xa3,0x20,0xc0,0x05,
241         0x04,0x60,0x22,0x4d,0x2d,0x88,0x85,0x62,0x48,0x68,0x12,0x05,0x98,0x43,0x10,0x43,
242         0x48,0x60,0x1f,0x48,0xe6,0x21,0x01,0x70,0x04,0x72,0x1d,0x4a,0x1e,0x48,0x10,0x83,
243         0x1e,0x48,0xe0,0x23,0x03,0x76,0x1a,0x4c,0xd4,0x22,0x62,0x70,0x3c,0x22,0x62,0x72,
244         0x1b,0x4a,0x62,0x83,0x41,0x76,0xc8,0x22,0xa2,0x70,0x15,0x4d,0x46,0x24,0xac,0x72,
245         0x18,0x4c,0xac,0x83,0x81,0x76,0x29,0x46,0xca,0x70,0x50,0x21,0x2a,0x46,0xd1,0x72,
246         0x15,0x49,0xd1,0x83,0xc3,0x76,0x5a,0x21,0x11,0x73,0x13,0x49,0x11,0x84,0x03,0x77,
247         0x70,0xbc,0x70,0x47,0x00,0x00,0xff,0x7f,0x00,0x00,0x3a,0x60,0x00,0x20,0x49,0x02,
248         0x00,0x00,0x40,0x00,0x80,0x45,0x80,0x00,0x80,0x45,0x1e,0x02,0x00,0x00,0x03,0x00,
249         0x3c,0x00,0x00,0x00,0x40,0x52,0x08,0x00,0x0f,0x00,0x00,0x00,0xc0,0x51,0x4e,0x60,
250         0x00,0x20,0xfc,0x67,0x00,0x20,0xf6,0x07,0x00,0x00,0x1c,0x68,0x00,0x20,0xf6,0x09,
251         0x00,0x00,0xf6,0x2d,0x00,0x00,0xf6,0x38,0x00,0x00,0xf6,0x3f,0x00,0x00,0xf8,0xb5,
252         0x2d,0x48,0x00,0x68,0x00,0x28,0x54,0xd1,0x43,0x22,0x12,0x06,0x50,0x68,0x01,0x21,
253         0xc9,0x03,0x08,0x43,0x50,0x60,0x28,0x4f,0x3c,0x68,0x01,0x25,0x03,0x20,0x00,0x06,
254         0x20,0x43,0x38,0x60,0x00,0x26,0x25,0x49,0x1e,0x20,0x88,0x47,0x24,0x49,0x01,0x20,
255         0x88,0x47,0x78,0x68,0xc0,0x07,0xc0,0x0f,0x31,0x46,0x21,0x4a,0x76,0x1c,0x91,0x42,
256         0x01,0xd8,0x00,0x28,0xf2,0xd0,0x1c,0x48,0x81,0x68,0x1e,0x48,0x01,0x60,0x00,0x20,
257         0x00,0x26,0x00,0x2d,0x11,0xd0,0x1c,0x4b,0x32,0x46,0x00,0x25,0xcb,0x1a,0xaa,0x41,
258         0x14,0xda,0x40,0x1c,0x05,0x46,0x18,0x4f,0x4d,0x43,0x33,0x46,0x00,0x22,0x7d,0x1b,
259         0x9a,0x41,0x4d,0x1b,0x93,0x41,0xf4,0xdb,0x08,0xe0,0x14,0x4b,0x99,0x42,0x05,0xd2,
260         0x40,0x1c,0x02,0x46,0x4a,0x43,0x9a,0x1a,0x8a,0x42,0xf9,0xd8,0x01,0x21,0x09,0x06,
261         0x8c,0x43,0x49,0x00,0x0c,0x43,0x08,0x49,0x0c,0x60,0x43,0x22,0x12,0x06,0x51,0x68,
262         0x01,0x23,0xdb,0x03,0x99,0x43,0x0a,0x4b,0x1b,0x78,0xdb,0x07,0x1b,0x0c,0x19,0x43,
263         0x51,0x60,0xf8,0xbd,0x00,0x00,0x5c,0x60,0x00,0x20,0x00,0x00,0x40,0x44,0xa1,0x3b,
264         0x00,0x00,0x10,0x27,0x00,0x00,0x60,0x60,0x00,0x20,0x00,0x20,0xbc,0xbe,0x00,0xd0,
265         0x12,0x13,0x3a,0x60,0x00,0x20,0x70,0xb5,0x23,0x48,0x80,0x47,0x43,0x24,0x24,0x06,
266         0x01,0x21,0x60,0x68,0x89,0x04,0x08,0x43,0x60,0x60,0x1f,0x48,0x80,0x47,0x1f,0x48,
267         0x00,0x78,0xaa,0x28,0x06,0xd1,0xa0,0x68,0x80,0x07,0x03,0xd1,0x1d,0x49,0x88,0x47,
268         0x1d,0x49,0x08,0x60,0xa1,0x20,0xc0,0x05,0x02,0x6b,0x02,0x21,0x8a,0x43,0x0a,0x43,
269         0x02,0x63,0x01,0x21,0x02,0x6b,0x8a,0x43,0x0a,0x43,0x02,0x63,0x01,0x6b,0x04,0x26,
270         0xb1,0x43,0x31,0x43,0x01,0x63,0x14,0x4c,0x60,0x68,0x14,0x4d,0x80,0x00,0x04,0xd5,
271         0x01,0x20,0xa8,0x47,0x60,0x68,0x80,0x00,0xfa,0xd4,0x11,0x4c,0x0f,0x20,0x60,0x60,
272         0x01,0x20,0xa8,0x47,0x07,0x20,0x60,0x60,0x04,0x20,0xa8,0x47,0x06,0x20,0x60,0x60,
273         0x8b,0x21,0x0c,0x48,0xc9,0x05,0x08,0x60,0x0c,0x48,0x01,0x69,0x31,0x43,0x01,0x61,
274         0x30,0xbf,0x70,0xbd,0x00,0x00,0x35,0x37,0x00,0x00,0x39,0x9c,0x00,0x00,0x2c,0x60,
275         0x00,0x20,0xd1,0x39,0x00,0x00,0x54,0x60,0x00,0x20,0x80,0x00,0x80,0x45,0xa1,0x3b,
276         0x00,0x00,0x40,0x00,0x80,0x45,0x26,0x03,0x00,0x00,0x00,0xed,0x00,0xe0,0x70,0xb5,
277         0x2f,0x4d,0x0f,0x20,0x68,0x60,0x8b,0x24,0xe4,0x05,0x20,0x68,0x01,0x21,0x49,0x02,
278         0x88,0x43,0x20,0x60,0x2b,0x48,0x80,0x47,0x01,0x20,0x80,0xf3,0x10,0x88,0x29,0x48,
279         0x40,0x68,0x29,0x49,0x80,0x00,0x06,0xd4,0x20,0x68,0x08,0x22,0x10,0x43,0x20,0x60,
280         0x01,0x20,0x88,0x47,0x01,0xe0,0x01,0x20,0x88,0x47,0x24,0x48,0x80,0x47,0x24,0x48,
281         0x25,0x49,0x00,0x78,0x88,0x47,0x0d,0x20,0x68,0x60,0x23,0x48,0x80,0x47,0x43,0x20,
282         0x00,0x06,0x41,0x68,0x01,0x23,0x5b,0x03,0x19,0x43,0x41,0x60,0x29,0x21,0x1f,0x4a,
283         0x49,0x06,0xca,0x60,0x0a,0x6a,0x12,0x09,0x12,0x01,0x08,0x32,0x0a,0x62,0x0a,0x68,
284         0xdc,0x10,0x22,0x43,0x0a,0x60,0x1a,0x4a,0x12,0x78,0x52,0x00,0x52,0x1c,0x4a,0x61,
285         0x42,0x68,0x18,0x49,0x9a,0x43,0x09,0x78,0xc9,0x07,0xc9,0x0f,0x4b,0x03,0x1a,0x43,
286         0x42,0x60,0x43,0x68,0xa2,0x02,0x13,0x43,0x43,0x60,0x28,0x24,0xa3,0x23,0xdb,0x05,
287         0x1c,0x60,0x11,0x4c,0x24,0x88,0x9c,0x62,0x43,0x68,0x09,0x05,0x93,0x43,0x0b,0x43,
288         0x43,0x60,0x00,0x20,0x80,0xf3,0x10,0x88,0x0d,0x48,0x80,0x47,0x70,0xbd,0x40,0x00,
289         0x80,0x45,0x85,0x3b,0x01,0x00,0x80,0x00,0x80,0x45,0x89,0x44,0x01,0x00,0x6d,0x34,
290         0x01,0x00,0x40,0x60,0x00,0x20,0xa1,0x3b,0x00,0x00,0x99,0x4d,0x01,0x00,0xcc,0x34,
291         0x63,0x04,0x70,0x60,0x00,0x20,0x3a,0x60,0x00,0x20,0x4e,0x60,0x00,0x20,0xad,0x34,
292         0x01,0x00
293     }
294 };
295 
296 am_hal_ble_patch_t am_ble_performance_copy_patch =
297 {
298     .ui32Type = 0xBB,
299     .ui32Length = 0x0912,
300     .ui32CRC = 0x9516,
301     .pui32Data = am_ble_performance_copy_patch_data.words,
302 };
303 
304 //*****************************************************************************
305 //
306 // Patch Name:  RAMCODE PATCH v1.10    for Apollo3 A1
307 //
308 // Bi-directional data fix
309 // Modulation deviation fix
310 // Extend patch memory
311 // Transmit speed patch
312 // Added AGC table and enabled AGC
313 // Added local feature support setting
314 // Set VCO to 250mv
315 // Modex auto calibration update
316 // Fix connection interval calculation issue
317 // Increase RF LDO ref voltage form 1.0v to 1.1v
318 // Decrease DAC channel delay cycle
319 // Increase the VCO swing from 250mv to 300mv
320 // Fix MD trans schedule issue (disabled)
321 // Fix link loss issue
322 // Reduce duration from TX to TX
323 // Optimized 32K XO frequency calculation
324 // Fix channel map rejected issue
325 // Optimized AGC Table
326 // Date:        2019-01-30
327 //*****************************************************************************
328 
329 am_hal_ble_buffer(0x0104) am_ble_performance_patch_data =
330 {
331     .bytes =
332     {
333         0x00,0x11,0x02,0x01,0x00,0x04,0x00,0x00,0x00,0x00,0x00,0x00,0x03,0x01,0xc5,0x01,
334         0x39,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
335         0x00,0x00,0x00,0x00,0x1b,0x00,0xa1,0x06,0x1f,0xb5,0x82,0xb0,0x08,0x98,0x00,0x90,
336         0x02,0xa8,0x0f,0xc8,0x01,0x4c,0xa0,0x47,0x06,0xb0,0x10,0xbd,0x01,0x35,0x00,0x20,
337         0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x08,0x48,0x80,0x47,0x00,0xbf,0x00,0xbf,
338         0x02,0x2d,0x05,0xd1,0x06,0x48,0x80,0x47,0x00,0xbf,0x00,0xbf,0x05,0x48,0x80,0x47,
339         0x00,0x21,0x03,0x9a,0x04,0x98,0x90,0x47,0x03,0x48,0x00,0x47,0x99,0x4a,0x01,0x00,
340         0x25,0x4b,0x01,0x00,0xaf,0x4a,0x01,0x00,0x8f,0x4c,0x01,0x00,0x00,0x00,0x00,0x00,
341         0x04,0x48,0x01,0x68,0x28,0x22,0x11,0x43,0x50,0x22,0x91,0x43,0x01,0x60,0x00,0xbf,
342         0x01,0x48,0x00,0x47,0x00,0x00,0xc0,0x52,0x63,0x2a,0x00,0x00,0x00,0x00,0x00,0x00,
343         0x04,0x48,0x01,0x68,0x50,0x22,0x11,0x43,0x28,0x22,0x91,0x43,0x01,0x60,0x00,0xbf,
344         0x01,0x48,0x00,0x47,0x00,0x00,0xc0,0x52,0x83,0x2a,0x00,0x00,0x00,0xbf,0x00,0xbf,
345         0x00,0xbf,0x00,0xbf,0x08,0x98,0x00,0x28,0x01,0xd0,0x01,0x20,0x02,0x90,0x00,0x20,
346         0x60,0x85,0x01,0x48,0x00,0x47,0x00,0xbf,0xd5,0xed,0x00,0x00,0x00,0xbf,0x00,0xbf,
347         0x60,0x88,0x00,0x28,0x04,0xd1,0x10,0x7d,0x08,0x28,0x01,0xd3,0x04,0x20,0x10,0x75,
348         0x02,0x98,0x81,0x79,0x01,0x20,0x01,0x43,0x02,0x98,0x81,0x71,0x00,0x48,0x00,0x47,
349         0xa5,0xf7,0x00,0x00
350     }
351 };
352 
353 am_hal_ble_patch_t am_ble_performance_patch =
354 {
355     .ui32Type = 0xBB,
356     .ui32Length = 0x0104,
357     .ui32CRC = 0x933d,
358     .pui32Data = am_ble_performance_patch_data.words,
359 };
360 
361 //*****************************************************************************
362 //
363 // Patch Name:  Function PATCH v1.10    for Apollo3 A1
364 //
365 // Bi-directional data fix
366 // Modulation deviation fix
367 // Extend patch memory
368 // Transmit speed patch
369 // Added AGC table and enabled AGC
370 // Added local feature support setting
371 // Set VCO to 250mv
372 // Modex auto calibration update
373 // Fix connection interval calculation issue
374 // Increase RF LDO ref voltage form 1.0v to 1.1v
375 // Decrease DAC channel delay cycle
376 // Increase the VCO swing from 250mv to 300mv
377 // Fix MD trans schedule issue (disabled)
378 // Fix link loss issue
379 // Reduce duration from TX to TX
380 // Optimized 32K XO frequency calculation
381 // Fix channel map rejected issue
382 // Optimized AGC Table
383 // Date:        2019-01-30
384 //*****************************************************************************
385 
386 const am_hal_ble_buffer(0x0d38) am_ble_buffer_patch_data =
387 {
388     .bytes =
389     {
390         0x00,0x22,0x38,0x0d,0xff,0xff,0x00,0x00,0x32,0x35,0x09,0x00,0x65,0x39,0x09,0x00,
391         0x2b,0x45,0x09,0x00,0xa9,0x48,0x09,0x00,0xf7,0x53,0x09,0x00,0x1a,0x5c,0x09,0x00,
392         0x1c,0x64,0x09,0x00,0xfd,0x6a,0x09,0x00,0x1a,0x75,0x09,0x00,0xde,0x7b,0x09,0x00,
393         0x4b,0x85,0x09,0x00,0xb3,0x8b,0x09,0x00,0x1f,0x95,0x09,0x00,0x4f,0x9c,0x09,0x00,
394         0xf5,0xa2,0x09,0x00,0x1e,0xad,0x09,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
395         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
396         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
397         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x48,0x00,0x47,
398         0x41,0x48,0x00,0x20,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x05,0xb0,0xf0,0xbd,0x00,0x00,
399         0x90,0x67,0x00,0x20,0x10,0x27,0x00,0x00,0x00,0x10,0x00,0x20,0x88,0x13,0x00,0x00,
400         0x18,0x10,0x00,0x20,0xff,0x03,0x00,0x00,0xff,0xb5,0xff,0xb0,0x82,0xb0,0x07,0x46,
401         0x0c,0x46,0x16,0x46,0x00,0x25,0x30,0x48,0x06,0x60,0x84,0x99,0x04,0xd0,0xee,0x28,
402         0x02,0xd0,0x03,0x20,0x60,0x73,0x70,0xbd,0x60,0x7c,0xf1,0x28,0x06,0xd0,0xf2,0x28,
403         0x04,0xd0,0xf3,0x28,0x02,0xd0,0x02,0x20,0x60,0x73,0x70,0xbd,0x00,0x20,0x60,0x73,
404         0x70,0xbd,0x00,0x00,0x18,0x10,0x00,0x20,0x0a,0x10,0x00,0x20,0x00,0x48,0x00,0x47,
405         0x81,0x4d,0x00,0x20,0x70,0x88,0x00,0x28,0x16,0xd1,0x14,0x20,0x01,0x21,0x0b,0x20,
406         0xed,0xf7,0xc6,0xfc,0x10,0xbd,0x00,0x00,0x00,0x48,0x00,0x47,0x15,0x4e,0x00,0x20,
407         0x00,0x28,0x02,0xd0,0x08,0x78,0x01,0x28,0x1a,0xd0,0x08,0x78,0x02,0x28,0x17,0xd0,
408         0x00,0x28,0x0e,0xd0,0x01,0x28,0x0c,0xd0,0xf0,0xf7,0xd9,0xfe,0x00,0x28,0x08,0xd0,
409         0x00,0xf0,0x16,0xf8,0x32,0x20,0xef,0xf7,0x51,0xf8,0xf0,0xf7,0x80,0xe1,0x00,0xe0,
410         0x00,0xe1,0x00,0xe0,0x02,0x48,0x01,0x68,0x28,0x22,0x91,0x43,0x01,0x60,0x70,0x47,
411         0x00,0x00,0xc0,0x52,0x00,0x48,0x00,0x47,0x81,0x48,0x00,0x20,0x01,0x60,0x70,0x47,
412         0x00,0x00,0xc0,0x52,0x02,0x48,0x01,0x68,0x50,0x22,0x91,0x43,0x01,0x60,0x70,0x47,
413         0x00,0x00,0xc0,0x52,0x00,0x48,0x00,0x47,0xa1,0x48,0x00,0x20,0xc0,0x40,0x80,0x50,
414         0x10,0xb5,0x0b,0x46,0x11,0x46,0x02,0x24,0x0c,0x22,0x50,0x43,0x06,0x4a,0x80,0x18,
415         0x00,0x28,0x06,0xd0,0x42,0x68,0x00,0x2a,0x03,0xd0,0x18,0x46,0x00,0xf0,0x10,0xfb,
416         0x04,0x46,0x20,0x46,0x10,0xbd,0x00,0x00,0x98,0x56,0x01,0x00,0x00,0x49,0x08,0x47,
417         0x99,0x4e,0x00,0x20,0xf3,0xf7,0x5c,0xfd,0x7c,0x20,0x00,0x5b,0x0b,0xf8,0x40,0x19,
418         0xc1,0xb2,0x00,0x29,0x03,0xd0,0x40,0x34,0xa0,0x8f,0xf9,0xf7,0x73,0xfd,0x70,0xbd,
419         0x01,0x21,0xe1,0xe7,0x00,0x49,0x08,0x47,0x81,0x50,0x00,0x20,0x80,0xf3,0x10,0x88,
420         0x28,0x46,0xf3,0xf7,0x4d,0xf9,0x00,0x21,0x81,0xf3,0x10,0x88,0x00,0x28,0x0f,0xd0,
421         0x81,0x88,0x0a,0x46,0x0a,0x3a,0x46,0x2a,0x0c,0xd2,0x64,0x1c,0xd2,0x0b,0xd2,0x03,
422         0x0a,0x43,0xc2,0x84,0x00,0x20,0x80,0xf3,0x10,0x88,0x70,0x47,0x66,0x04,0x00,0x00,
423         0x40,0x44,0x80,0x50,0x00,0x49,0x08,0x47,0xed,0x50,0x00,0x20,0x11,0x90,0x80,0x8f,
424         0x0e,0x90,0x12,0x98,0x08,0x30,0x0d,0x90,0x12,0x98,0x30,0x30,0x0c,0x90,0x12,0x98,
425         0x44,0x30,0x0b,0x90,0x00,0x20,0x0a,0x90,0x01,0x25,0x0c,0x98,0x07,0xf0,0xa4,0xf8,
426         0x00,0x28,0x2d,0xd0,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,
427         0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x91,0xe0,0x0c,0x9a,0xff,0x20,0x22,0x23,
428         0x11,0x46,0x0a,0x30,0xfd,0xf7,0x9e,0xfb,0x07,0x70,0x61,0x88,0xc1,0x81,0xa1,0x88,
429         0x01,0x82,0xe1,0x88,0xc1,0x80,0x21,0x89,0x01,0x81,0xa1,0x7a,0xc0,0x01,0x23,0xe0,
430         0x77,0xe0,0x02,0x98,0x08,0x1a,0x40,0x01,0x40,0x09,0x90,0x42,0x1c,0xd9,0x02,0x98,
431         0x40,0x1a,0x40,0x01,0x40,0x09,0x40,0x42,0x16,0xe0,0x02,0x98,0x00,0xbf,0x00,0xbf,
432         0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0xbf,0x00,0x20,
433         0x0a,0xe0,0x02,0x98,0x38,0x1a,0x40,0x01,0x40,0x09,0x90,0x42,0xc1,0x65,0x75,0x60,
434         0x60,0x89,0xb8,0x84,0x04,0x9a,0x01,0x20,0x50,0x75,0x60,0x88,0xf8,0x85,0x04,0x9a,
435         0x60,0x78,0x10,0x75,0x00,0x48,0x00,0x47,0xe1,0x48,0x00,0x20,0x00,0xbf,0x00,0x00,
436         0x60,0x89,0x3a,0x8d,0x40,0x1e,0x80,0xb2,0x82,0x42,0x03,0xd1,0x08,0x20,0x01,0x43,
437         0x03,0x98,0x81,0x71,0x07,0xb0,0xf0,0xbd,0x60,0x61,0x00,0x20,0x00,0x00,0x00,0x00,
438         0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0x00,
439         AM_HAL_BLE_LOCAL_FEATURE,//0x01,
440         0x00,0x00,0x00,
441         0x00,0x00,0x00,0x00,0x01,0x00,0x00,0x00,0x00,0x00,0x00,0x00,0xff,0xff,0xff,0xff,
442         0xff,0x03,0x00,0x00,0xff,0x00,0x3c,0x1f,0x00,0x00,0x00,0x00,0x01,0x20,0x00,0x00,
443         0x89,0x7d,0x00,0x00,0x02,0x20,0x00,0x00,0xfd,0x76,0x00,0x00,0x10,0x18,0x00,0x8c,
444         0xc0,0x0b,0x08,0x9b,0x5b,0x1e,0x18,0x42,0x05,0xd1,0x08,0x98,0x00,0x48,0x00,0x47,
445         0xc1,0x48,0x00,0x20,0x00,0xbf,0x00,0x00,0x80,0x4b,0xd2,0x18,0x50,0x84,0x01,0x20,
446         0x80,0xf3,0x10,0x88,0xb8,0x68,0x00,0x28,0x16,0xd0,0x00,0x20,0x00,0x28,0x19,0xd0,
447         0x38,0x6b,0x00,0x28,0x12,0xd0,0x00,0x20,0x00,0x28,0x13,0xd0,0x9f,0xfc,0x00,0x19,
448         0x06,0x4b,0x59,0x68,0x09,0x18,0x8a,0x08,0x94,0x00,0x09,0x1b,0x59,0x60,0x41,0x01,
449         0x08,0x1a,0x80,0x18,0x10,0xbd,0x00,0x00,0x2c,0x60,0x00,0x20,0xb8,0x67,0x00,0x20,
450         0x00,0x49,0x08,0x47,0x79,0x55,0x00,0x20,0x7d,0x21,0x80,0x6a,0x09,0x02,0x88,0x42,
451         0x02,0xd3,0x40,0x1a,0x01,0x22,0x00,0xe0,0x08,0x1a,0x00,0x2a,0x29,0x19,0x08,0x1a,
452         0x21,0x46,0xee,0xf7,0xb1,0xfe,0x88,0xb2,0x70,0xbd,0x28,0x30,0x60,0x30,0x00,0x7e,
453         0x70,0x47,0x10,0xb4,0x02,0x46,0x40,0x32,0xd3,0x8c,0x06,0x24,0x63,0x43,0x14,0x8d,
454         0xe3,0x18,0x9b,0xb2,0x93,0x84,0x60,0x30,0x41,0x75,0x18,0x46,0x10,0xbc,0x70,0x47,
455         0x28,0x30,0x60,0x30,0x40,0x7d,0x00,0x28,0x00,0x20,0x00,0x20,0x40,0x79,0x00,0x07,
456         0x02,0xd5,0x04,0x20,0x60,0x70,0x34,0xe0,0x28,0x69,0x05,0xf0,0x51,0xfb,0x00,0x28,
457         0x02,0xd0,0x02,0x20,0x60,0x70,0x2c,0xe0,0x03,0x98,0x03,0xf0,0x4d,0xfe,0x04,0x28,
458         0x07,0xd1,0x68,0x46,0x01,0x79,0x02,0x20,0x88,0x43,0x05,0xd0,0x00,0x20,0x00,0x28,
459         0x04,0xd0,0x00,0x20,0x60,0x70,0x1c,0xe0,0x01,0x20,0xf8,0xe7,0x58,0x67,0x00,0x20,
460         0x40,0x00,0x80,0x50,0xb8,0x67,0x00,0x20,0x00,0x00,0x00,0x04,0xc8,0x67,0x00,0x20,
461         0x00,0x49,0x08,0x47,0xcd,0x55,0x00,0x20,0x81,0x6a,0x7d,0x20,0x00,0x02,0x81,0x42,
462         0x02,0xd3,0x08,0x1a,0x01,0x22,0x00,0xe0,0x40,0x1a,0x00,0x2a,0x04,0xd0,0x60,0x43,
463         0xeb,0xf7,0xa4,0xfc,0x20,0x1a,0x03,0xe0,0x60,0x43,0xeb,0xf7,0xf8,0xb5,0x00,0x24,
464         0x1c,0x48,0x00,0x78,0x00,0x28,0x2d,0xd1,0x1b,0x4e,0x70,0x68,0x1b,0x4d,0x00,0x28,
465         0x09,0xda,0x1b,0x4f,0x01,0x21,0x0b,0x20,0xb8,0x47,0x01,0x21,0x0b,0x20,0xa8,0x47,
466         0x70,0x68,0x00,0x28,0xf6,0xdb,0x00,0x21,0x0b,0x20,0xa8,0x47,0x15,0x4e,0x0a,0x20,
467         0xb0,0x47,0x05,0x27,0x3f,0x07,0xf8,0x69,0x05,0x05,0x2d,0x0d,0x00,0x2d,0x04,0xd1,
468         0x11,0x48,0xc0,0x68,0x80,0x05,0x80,0x0e,0x0c,0xd0,0x64,0x2c,0x0a,0xd2,0x14,0x20,
469         0xb0,0x47,0xf8,0x69,0x00,0x05,0x00,0x0d,0xa8,0x42,0x04,0xd9,0x05,0x46,0x64,0x1c,
470         0x64,0x2c,0xf4,0xd3,0xf8,0xbd,0x03,0x49,0x01,0x20,0x08,0x70,0x07,0x49,0x08,0x70,
471         0xf8,0xbd,0x00,0x00,0x01,0x10,0x00,0x20,0x80,0x00,0x80,0x45,0x55,0x24,0x00,0x00,
472         0x91,0x23,0x00,0x00,0xa1,0x3b,0x00,0x00,0x00,0x00,0xc0,0x52,0x00,0x10,0x00,0x20,
473         0x10,0xb5,0x18,0x48,0x01,0x68,0x40,0x29,0x01,0xd2,0x40,0x21,0x01,0x60,0x80,0x7a,
474         0xc0,0x07,0x01,0xd0,0x00,0x20,0x10,0xbd,0x13,0x48,0x80,0x47,0x05,0x20,0x00,0x07,
475         0xc0,0x69,0x12,0x49,0x00,0x05,0x04,0xd0,0x08,0x78,0x01,0x28,0x14,0xd0,0x02,0x28,
476         0x12,0xd0,0x08,0x78,0x00,0x28,0x08,0xd0,0x01,0x28,0x06,0xd0,0x02,0x28,0x04,0xd0,
477         0x0b,0x48,0x80,0x47,0x0b,0x49,0x32,0x20,0x88,0x47,0x0b,0x49,0x04,0x20,0x88,0x47,
478         0x0a,0x48,0x80,0x47,0x00,0x20,0x10,0xbd,0x09,0x49,0x04,0x20,0x88,0x47,0x01,0x20,
479         0x10,0xbd,0x00,0x00,0xb8,0x67,0x00,0x20,0x05,0x93,0x00,0x00,0x18,0x10,0x00,0x20,
480         0x25,0x4b,0x01,0x00,0xa1,0x3b,0x00,0x00,0x41,0x44,0x01,0x00,0xaf,0x4a,0x01,0x00,
481         0x89,0x44,0x01,0x00,0xf0,0xb5,0x8d,0xb0,0x04,0x46,0x6c,0x49,0x04,0xa8,0x88,0x47,
482         0x7c,0x20,0x00,0x5b,0x03,0x90,0x00,0x25,0x00,0x20,0x02,0x90,0x01,0x20,0x80,0xf3,
483         0x10,0x88,0x60,0x6c,0x00,0x21,0x81,0xf3,0x10,0x88,0x26,0x46,0x60,0x36,0x00,0x28,
484         0x6b,0xd0,0x21,0x46,0x44,0x31,0x0c,0x91,0x28,0x39,0x0b,0x91,0x64,0x31,0x0a,0x91,
485         0x81,0x88,0xca,0x00,0x5e,0x49,0x51,0x18,0xc9,0x8c,0xc9,0x0b,0x00,0x29,0x5c,0xd0,
486         0x01,0x21,0x81,0xf3,0x10,0x88,0x00,0x68,0x01,0x90,0x5a,0x49,0x0c,0x98,0x88,0x47,
487         0x07,0x46,0xe0,0x69,0x00,0x28,0x03,0xd0,0x00,0x20,0x00,0x28,0x02,0xd0,0x08,0xe0,
488         0x01,0x20,0xfa,0xe7,0x53,0x49,0x0b,0x98,0x88,0x47,0x00,0x28,0x01,0xd0,0x52,0x49,
489         0x88,0x47,0x00,0x20,0x80,0xf3,0x10,0x88,0xb8,0x88,0x4d,0x49,0xc0,0x00,0x40,0x18,
490         0xc2,0x8c,0xd2,0x0b,0xd2,0x03,0xc2,0x84,0xb8,0x88,0x07,0x28,0x1e,0xd2,0x30,0x7e,
491         0x40,0x1e,0x30,0x76,0x01,0x20,0x80,0xf3,0x10,0x88,0x20,0x6b,0x00,0x28,0x13,0xd0,
492         0x00,0x20,0x00,0x28,0x05,0xd0,0x0a,0x98,0xfb,0x21,0x80,0x79,0x08,0x40,0x0a,0x99,
493         0x88,0x71,0x41,0x49,0x38,0x46,0x88,0x47,0x00,0x20,0x80,0xf3,0x10,0x88,0x3f,0x4a,
494         0x39,0x7b,0x03,0x98,0x90,0x47,0x15,0xe0,0x01,0x20,0xea,0xe7,0x09,0x28,0x0f,0xd9,
495         0xc0,0x00,0x40,0x18,0x00,0x8d,0x00,0x0a,0x00,0x90,0x39,0x49,0x38,0x46,0x88,0x47,
496         0x00,0x28,0x07,0xd0,0x00,0x98,0x00,0x28,0x04,0xd0,0x6d,0x1c,0xed,0xb2,0x01,0xe0,
497         0x6d,0x1c,0xed,0xb2,0x01,0x98,0x00,0x28,0x9a,0xd1,0x03,0x98,0x07,0x28,0x0e,0xd0,
498         0x00,0x2d,0x0c,0xd0,0x01,0x20,0x80,0xf3,0x10,0x88,0x30,0x7e,0x40,0x1b,0x30,0x76,
499         0x00,0x20,0x80,0xf3,0x10,0x88,0x2b,0x4a,0x29,0x46,0x03,0x98,0x90,0x47,0x01,0x20,
500         0x80,0xf3,0x10,0x88,0x28,0x48,0x23,0x4f,0x09,0x90,0xb8,0x47,0x04,0x46,0x00,0x20,
501         0x80,0xf3,0x10,0x88,0x20,0x00,0x36,0xd0,0x1f,0x4e,0xe0,0x88,0x03,0x99,0x88,0x42,
502         0x12,0xd1,0x07,0x28,0x07,0xd0,0xa1,0x7a,0x00,0x91,0x20,0x4f,0xe3,0x7a,0x22,0x7b,
503         0x21,0x89,0xb8,0x47,0x05,0xe0,0x1e,0x4b,0x21,0x79,0x20,0x89,0x2a,0x46,0x98,0x47,
504         0x02,0x90,0x20,0x46,0xb0,0x47,0x03,0xe0,0x1a,0x4a,0x21,0x46,0x04,0xa8,0x90,0x47,
505         0x01,0x20,0x80,0xf3,0x10,0x88,0x0f,0x49,0x09,0x98,0x88,0x47,0x04,0x46,0x20,0x00,
506         0x0c,0xd1,0x04,0x98,0x00,0x28,0x03,0xd0,0x00,0x20,0x00,0x28,0x02,0xd0,0x05,0xe0,
507         0x01,0x20,0xfa,0xe7,0x10,0x4a,0x04,0xa9,0x09,0x98,0x90,0x47,0x00,0x20,0x80,0xf3,
508         0x10,0x88,0x00,0x2c,0xc9,0xd1,0x02,0x98,0x0d,0xb0,0xf0,0xbd,0xb5,0x38,0x00,0x00,
509         0x40,0x44,0x80,0x50,0x45,0x39,0x00,0x00,0xa5,0x93,0x00,0x00,0x09,0xb8,0x00,0x00,
510         0x5d,0x56,0x00,0x00,0x05,0xb7,0x00,0x00,0xb8,0x61,0x00,0x20,0x29,0xb7,0x00,0x00,
511         0x35,0x22,0x01,0x00,0x67,0x39,0x00,0x00,0x0f,0x39,0x00,0x00,0xf1,0xb5,0x00,0x24,
512         0x15,0x4d,0x16,0x4e,0x01,0x20,0x80,0xf3,0x10,0x88,0x00,0x98,0xa8,0x47,0x00,0x21,
513         0x81,0xf3,0x10,0x88,0x00,0x28,0x17,0xd0,0x81,0x88,0x0a,0x46,0x0a,0x3a,0x46,0x2a,
514         0x14,0xd2,0xc9,0x00,0x89,0x19,0x09,0x8d,0x0f,0x0a,0x01,0x21,0x81,0xf3,0x10,0x88,
515         0x0b,0x49,0x88,0x47,0x00,0x28,0x03,0xd0,0x00,0x2f,0x01,0xd0,0x64,0x1c,0xe4,0xb2,
516         0x00,0x20,0x80,0xf3,0x10,0x88,0xdd,0xe7,0x20,0x46,0xf8,0xbd,0xc9,0x1f,0x49,0x29,
517         0xd8,0xd3,0x04,0x49,0x88,0x47,0xd5,0xe7,0x45,0x39,0x00,0x00,0x40,0x44,0x80,0x50,
518         0x5d,0x56,0x00,0x00,0xa5,0x93,0x00,0x00,0xf1,0xb5,0x92,0xb0,0x12,0x98,0x40,0x30,
519         0x11,0x90,0x80,0x8f,0x0e,0x90,0x12,0x98,0x08,0x30,0x0d,0x90,0x12,0x98,0x30,0x30,
520         0x0c,0x90,0x12,0x98,0x44,0x30,0x0b,0x90,0x00,0x20,0x0a,0x90,0x01,0x25,0x0c,0x98,
521         0x04,0x68,0x00,0x2c,0x03,0xd0,0x00,0x20,0x00,0x28,0x02,0xd0,0x93,0xe0,0x01,0x20,
522         0xfa,0xe7,0x0e,0x98,0xc1,0x00,0xf9,0x48,0x08,0x18,0x10,0x90,0xc0,0x8c,0xc0,0x0b,
523         0x00,0x28,0x6e,0xd0,0x0e,0x98,0xf6,0x49,0x80,0x00,0x0f,0x90,0x08,0x58,0xa0,0x30,
524         0x46,0x79,0x01,0x20,0x71,0x07,0x19,0xd5,0x00,0x2c,0x17,0xd0,0xf1,0x4f,0xb0,0x06,
525         0x07,0xd5,0x20,0x7b,0xb8,0x47,0x80,0x07,0x01,0xd4,0x00,0x20,0x06,0xe0,0x01,0x20,
526         0x04,0xe0,0x20,0x7b,0xb8,0x47,0xc0,0x07,0x03,0xd0,0x01,0x20,0x00,0x28,0x02,0xd0,
527         0x04,0xe0,0x00,0x20,0xfa,0xe7,0x24,0x68,0x00,0x2c,0xe8,0xd1,0x00,0x28,0x62,0xd0,
528         0xe5,0x4b,0x00,0x22,0x21,0x46,0x0c,0x98,0x98,0x47,0xa6,0x68,0xe3,0x4a,0x09,0xa9,
529         0x30,0x46,0x90,0x47,0x00,0x28,0x56,0xd1,0xa0,0x88,0xdc,0x4f,0xc0,0x00,0xc0,0x19,
530         0x40,0x8d,0xdf,0x49,0x41,0x18,0x00,0x20,0x08,0xaa,0x12,0x79,0x00,0x2a,0x06,0xdd,
531         0x32,0x5c,0x0a,0x54,0x40,0x1c,0x08,0xaa,0x12,0x79,0x90,0x42,0xf8,0xdb,0xd9,0x49,
532         0xa0,0x68,0x88,0x47,0xd2,0x49,0x0f,0x98,0x08,0x58,0xa0,0x30,0x40,0x79,0xc0,0x07,
533         0x03,0xd0,0x08,0xa9,0x08,0x79,0x00,0x1d,0x09,0x90,0x08,0xa8,0x01,0x79,0x10,0x98,
534         0x02,0x8d,0x09,0x02,0xd2,0xb2,0x0a,0x43,0x02,0x85,0x03,0x21,0x10,0x98,0x02,0x8d,
535         0x8a,0x43,0x0a,0x43,0x02,0x85,0x11,0x98,0x80,0x8f,0x00,0x21,0xc0,0x00,0xc0,0x19,
536         0xc1,0x84,0x0b,0x98,0x00,0x68,0x00,0x28,0x04,0xd0,0x00,0x20,0x00,0x28,0x03,0xd0,
537         0x10,0xe0,0x18,0xe0,0x01,0x20,0xf9,0xe7,0x0b,0x98,0xa1,0x88,0x40,0x68,0xca,0x00,
538         0xc1,0x49,0x80,0x88,0x51,0x18,0xc0,0x00,0xc0,0x19,0xc2,0x8c,0xd2,0x0b,0xd2,0x03,
539         0x0a,0x43,0xc2,0x84,0xbd,0x4a,0x21,0x46,0x0b,0x98,0x90,0x47,0x12,0x98,0x60,0x30,
540         0x01,0x7e,0x49,0x1c,0x01,0x76,0x11,0x98,0x80,0x8f,0x07,0x28,0x08,0xd2,0x0e,0x99,
541         0x8a,0x00,0xaf,0x49,0x89,0x58,0xa0,0x31,0x49,0x79,0x49,0x07,0x00,0xd5,0x00,0x25,
542         0x0d,0x99,0x09,0x68,0x00,0x29,0x1f,0xd0,0x00,0x21,0x2a,0x46,0x8a,0x43,0x77,0xd0,
543         0x07,0x28,0x76,0xd2,0xaf,0x49,0xae,0x48,0x88,0x47,0x09,0x90,0x00,0x20,0x08,0x90,
544         0x11,0x98,0x80,0x8f,0x81,0x00,0xa2,0x48,0x40,0x58,0xa0,0x30,0x40,0x79,0xc0,0x07,
545         0xc0,0x0f,0x07,0x90,0x0d,0x98,0x06,0x68,0x00,0x2e,0x09,0xd0,0x0d,0x99,0x30,0x68,
546         0x08,0x60,0x00,0x28,0x02,0xd0,0x03,0xe0,0x01,0x21,0xde,0xe7,0x0d,0x99,0x48,0x60,
547         0x00,0x2e,0x7d,0xd0,0x00,0x20,0x06,0x90,0x12,0x98,0x03,0x90,0x06,0xa8,0x04,0x90,
548         0x07,0x9f,0x09,0x9b,0x05,0x97,0x08,0x25,0x75,0x5f,0x00,0x20,0x02,0x90,0x01,0x90,
549         0x01,0x20,0x00,0x90,0x11,0x98,0x42,0x8e,0x84,0x46,0xd4,0xb2,0x01,0x20,0x29,0x46,
550         0x09,0x31,0x89,0xb2,0x05,0x9f,0x00,0x2f,0x01,0xd0,0x09,0x1d,0x89,0xb2,0xc9,0x00,
551         0x08,0x31,0x89,0xb2,0x67,0x46,0x3f,0x8e,0x8f,0x42,0x05,0xd2,0x50,0x3f,0x79,0x05,
552         0x0c,0x0e,0xa2,0x42,0x00,0xd2,0xd4,0xb2,0xa5,0x42,0x01,0xdd,0x64,0x08,0x64,0x00,
553         0x21,0x46,0x6f,0x1a,0x62,0x1c,0x97,0x42,0x05,0xdb,0x09,0x19,0x40,0x1c,0xc0,0xb2,
554         0x6f,0x1a,0x97,0x42,0xf9,0xda,0x98,0x42,0x01,0xd9,0x00,0x25,0x34,0xe0,0x04,0x99,
555         0x08,0x70,0x81,0x4f,0x81,0x49,0x7e,0x48,0x88,0x47,0x01,0x46,0x00,0x98,0x00,0x28,
556         0x12,0xd0,0x00,0x20,0x00,0x90,0xb0,0x7a,0x80,0x07,0x80,0x0f,0x01,0x28,0x09,0xd0,
557         0x02,0x20,0x88,0x72,0xf0,0x68,0xc2,0x88,0x02,0x92,0x80,0x88,0x01,0x90,0x09,0xe0,
558         0x62,0xe0,0x58,0xe0,0x01,0x20,0xf4,0xe7,0x01,0x20,0x88,0x72,0x02,0x98,0x00,0x19,
559         0x80,0xb2,0x02,0x90,0xa5,0x42,0x01,0xdd,0xcc,0x72,0x00,0xe0,0xcd,0x72,0x01,0x98,
560         0xc8,0x80,0x02,0x98,0x08,0x81,0x28,0x1b,0x05,0xb2,0x00,0x2d,0x22,0xdc,0x01,0x22,
561         0x05,0x9b,0x03,0x98,0xb8,0x47,0x01,0x25,0x00,0x2d,0x20,0xd0,0x68,0x46,0x00,0x7e,
562         0x08,0x99,0x09,0x18,0xc9,0xb2,0x08,0x91,0x09,0x99,0x08,0x1a,0x80,0xb2,0x00,0xe0,
563         0x35,0xe0,0x09,0x90,0x12,0x98,0xc0,0x69,0x00,0x28,0x1a,0xd0,0x12,0x98,0x00,0x6a,
564         0x06,0x60,0x12,0x98,0x06,0x62,0x00,0x20,0x30,0x60,0x08,0x98,0x0a,0x28,0x13,0xd9,
565         0x00,0x25,0x24,0xe0,0x00,0x22,0x05,0x9b,0x03,0x98,0xb8,0x47,0xaa,0xe7,0x0d,0x98,
566         0x00,0x68,0x00,0x28,0x01,0xd1,0x0d,0x99,0x4e,0x60,0x30,0x60,0x0d,0x98,0x06,0x60,
567         0x15,0xe0,0x12,0x98,0xc6,0x61,0xe4,0xe7,0x0d,0x98,0x06,0x68,0x00,0x2e,0x06,0xd0,
568         0x0d,0x99,0x30,0x68,0x08,0x60,0x00,0x28,0x01,0xd1,0x0d,0x99,0x48,0x60,0x00,0x2e,
569         0x00,0xd0,0x4f,0xe7,0x03,0xe0,0x4a,0x4a,0x0d,0x99,0x0b,0x98,0x90,0x47,0x00,0x2d,
570         0x02,0xd0,0x48,0x49,0x0d,0x98,0x88,0x47,0x0b,0x98,0x00,0x68,0x00,0x28,0x03,0xd0,
571         0x00,0x20,0x00,0x28,0x02,0xd0,0x4b,0xe0,0x01,0x20,0xfa,0xe7,0x11,0x98,0x80,0x8f,
572         0x07,0x28,0x45,0xd2,0x12,0x98,0x80,0x30,0xc0,0x78,0x04,0x28,0x40,0xd1,0x3b,0x49,
573         0x37,0x48,0x88,0x47,0x00,0x28,0x3b,0xd0,0x82,0x88,0x00,0x21,0x2b,0x4b,0xd2,0x00,
574         0xd2,0x18,0x51,0x85,0x81,0x88,0xc9,0x00,0xc9,0x18,0x8a,0x8d,0x54,0x04,0x64,0x0c,
575         0x00,0x22,0x8c,0x85,0x81,0x88,0xc9,0x00,0xc9,0x18,0x0c,0x8d,0xe4,0xb2,0x0c,0x85,
576         0x81,0x88,0x01,0x24,0xc9,0x00,0xc9,0x18,0x0d,0x8d,0xad,0x08,0xad,0x00,0x25,0x43,
577         0x0d,0x85,0x81,0x88,0xc9,0x00,0xc9,0x18,0xcc,0x8c,0xe4,0x0b,0xe4,0x03,0xcc,0x84,
578         0x0b,0x99,0x84,0x88,0x49,0x68,0xe5,0x00,0x1f,0x4c,0x89,0x88,0x2c,0x19,0xc9,0x00,
579         0xc9,0x18,0xcb,0x8c,0xdb,0x0b,0xdb,0x03,0x23,0x43,0xcb,0x84,0x0b,0x99,0x09,0x68,
580         0x00,0x29,0x0d,0xd0,0x0b,0x99,0x49,0x68,0x08,0x60,0x0b,0x99,0x48,0x60,0x02,0x60,
581         0x0b,0x98,0x00,0x68,0x00,0x28,0x06,0xd0,0x00,0x21,0x00,0x29,0x05,0xd0,0x3c,0xe0,
582         0x0b,0x99,0x08,0x60,0xf1,0xe7,0x01,0x21,0xf7,0xe7,0x00,0x28,0x0a,0xd0,0x07,0x4a,
583         0x81,0x88,0xc9,0x00,0x89,0x18,0xc9,0x8c,0xc9,0x0b,0x00,0x29,0x24,0xd0,0x00,0x68,
584         0x00,0x28,0xf5,0xd1,0x00,0x28,0x26,0xd0,0x27,0xe0,0x00,0x00,0x40,0x44,0x80,0x50,
585         0x60,0x61,0x00,0x20,0x81,0xaf,0x00,0x00,0x17,0x38,0x00,0x00,0x41,0x03,0x01,0x00,
586         0x00,0x40,0x80,0x50,0xa5,0x93,0x00,0x00,0x66,0x04,0x00,0x00,0x67,0x39,0x00,0x00,
587         0xe4,0x61,0x00,0x20,0xbb,0x39,0x00,0x00,0x11,0x00,0x01,0x00,0x45,0x39,0x00,0x00,
588         0x0f,0x39,0x00,0x00,0xb5,0x38,0x00,0x00,0x81,0x88,0xca,0x00,0x07,0x49,0x51,0x18,
589         0x89,0xb2,0x0a,0x91,0xd6,0xe7,0x00,0x20,0x0a,0x90,0x0a,0x99,0x0e,0x98,0x5a,0x22,
590         0x50,0x43,0x03,0x4a,0x80,0x18,0x81,0x84,0x13,0xb0,0xf0,0xbd,0x66,0x04,0x00,0x00,
591         0x80,0x40,0x80,0x50,0x10,0xb4,0x00,0x23,0x14,0x21,0x02,0x46,0x4a,0x43,0x11,0x49,
592         0x7d,0x24,0x09,0x68,0x24,0x02,0xa1,0x42,0x02,0xd9,0x09,0x1b,0x01,0x23,0x00,0xe0,
593         0x61,0x1a,0x48,0x43,0x81,0x00,0x41,0x18,0x88,0x0a,0x0c,0x0c,0x00,0x19,0x4c,0x0c,
594         0x00,0x19,0x4c,0x0d,0x00,0x19,0x4c,0x0e,0x00,0x19,0xc9,0x0f,0x40,0x18,0xc0,0x08,
595         0x00,0x2b,0x01,0xd0,0x10,0x18,0x01,0xe0,0x10,0x1a,0x40,0x1e,0x40,0x1e,0x10,0xbc,
596         0x70,0x47,0x00,0x00,0x54,0x60,0x00,0x20,0xf0,0xb4,0x00,0x23,0x18,0x4c,0xe5,0x6b,
597         0x18,0x49,0x7d,0x22,0x09,0x68,0x12,0x02,0x91,0x42,0x02,0xd3,0x8a,0x1a,0x01,0x23,
598         0x00,0xe0,0x52,0x1a,0x06,0x46,0x56,0x43,0xf2,0x13,0x51,0x43,0x71,0x1a,0x1e,0x26,
599         0x4e,0x43,0x4f,0x10,0xf6,0x19,0x8f,0x11,0xf6,0x19,0x49,0x12,0x71,0x18,0xce,0x13,
600         0x00,0x2b,0x01,0xd0,0x80,0x1a,0x00,0xe0,0x10,0x18,0x42,0x19,0x91,0x08,0x8d,0x00,
601         0x52,0x1b,0x00,0x2b,0x04,0xd0,0x43,0x01,0x18,0x1a,0x40,0x18,0x80,0x1b,0x03,0xe0,
602         0x43,0x01,0x18,0x1a,0x40,0x18,0x80,0x19,0xe2,0x63,0xf0,0xbc,0x70,0x47,0x00,0x00,
603         0x80,0x67,0x00,0x20,0x54,0x60,0x00,0x20
604     }
605 };
606 
607 am_hal_ble_patch_t am_ble_buffer_patch =
608 {
609     .ui32Type = 0xCC,
610     .ui32Length = 0x0d38,
611     .ui32CRC = 0xf515,
612     .pui32Data = am_ble_buffer_patch_data.words,
613 };
614 
615 //*****************************************************************************
616 //
617 // Patch Name:  NVDS  v1.10  for Apollo3 A1
618 //
619 // Bi-directional data fix
620 // Modulation deviation fix
621 // Extend patch memory
622 // Transmit speed patch
623 // Added AGC table and enabled AGC
624 // Added local feature support setting
625 // Set VCO to 250mv
626 // Modex auto calibration update
627 // Fix connection interval calculation issue
628 // Increase RF LDO ref voltage form 1.0v to 1.1v
629 // Decrease DAC channel delay cycle
630 // Increase the VCO swing from 250mv to 300mv
631 // Fix MD schedule issue  (disabled)
632 // Fix link loss issue
633 // Reduce duration from TX to TX
634 // Optimized power consumption (32K clock drift,sleep clock accuracy,,advertising interval (undirect))
635 // Date:        2019-01-30
636 //
637 //*****************************************************************************
638 am_hal_ble_buffer(0x00be) am_ble_buffer_nvds_data =
639 {
640     .bytes =
641     {
642         0x4e,0x56,0x44,0x53, //NVDS_MAGIC_NUMBER
643         0x01,0x06,0x06,0xef,0xab,0x23,0x88,0x77,0x56, //bluetooth address
644         0x02,0x06,0x0a,0x4e,0x5a,0x38,0x38,0x30,0x31,0x56,0x31,0x41,0x00, //device name
645         0x03,0x06,0x01,0x00, //system clock frequency, 00=32MHz  01=24MHz  others=16MHz
646         0x07,0x06,0x02,0x00,0x00, //32K clock drift, 0x01f4 = 500 ppm
647         0x0c,0x06,0x02,50,0x00, //sleep clock accuracy, 0x01f4 = 500 ppm
648         0x08,0x06,0x01,0x00, //01 for BQB qualification, 00 for normal usage
649         0x09,0x06,0x01,0x02, //clock source selection, 00 = internal RC32KHz, 02= use Apollo3 MCU 32.768KHz
650         0x0a,0x06,0x04,0x00,0x00,0x00,0x00, //eb 0x00000000 = auto detect and low frequency clock calibration
651         0x0b,0x06,0x01,0x96, //rx_ifs  0x96 = 150us
652         0x23,0x06,0x01,0x95, //tx_ifs  0x95 = 149us
653         0x0d,0x06,0x02,0xe8,0x03, //duration allowed for XO32M stabilization from external wakeup signal
654         0x0e,0x06,0x02,0xe8,0x03, //duration allowed for XO32M stabilization from internal wakeup signal
655         0x0f,0x06,0x02,0x2c,0x01, //duration allowed for radio to leave low power mode
656         0x10,0x06,0x04,0x00,0xc2,0x01,0x00, //set UART_BAUDRATE
657         0x11,0x06,0x01,0x01, //sleep algorithm enabled
658         0x12,0x06,0x01,0x01, //external wake-up support
659         0x13,0x06,0x02,0xf4,0x01, //duration of sleep and wake-up algorithm
660         0x14,0x06,0x02,0xAC,0x09, // Ambiq's Company Identifier
661         0x15,0x06,0x01,0x09, //BLE major version, support BLE 5.0
662         0x16,0x06,0x01,0x03, //BLE minor version
663         0x17,0x06,0x01,0x29, //BLE SW version build
664         0x18,0x06,0x02,0xdc,0x05, //advertising interval (undirect)
665         0x19,0x06,0x02,0xe2,0x04, //advertising interval (direct)
666         0x20,0x06,0x01,0x01, //agc switch
667         0x21,0x06,0x01,0x02, //EA programming latency
668         0x22,0x06,0x01,0x00, //EA asap latency
669         0x24,0x06,0x04,0x42,0x02,0x60,0x09, //radio TRX timing
670         0x25,0x06,0x01,0x11, //modem polarity setting
671         0x26,0x06,0x01,0x00, //modem sync setting
672         0x27,0x06,0x01,0x02, //BLE reset delay
673         0x2d,0x06,0x01,0x00, //2 byte mode switch, 01 to enable
674         0x28,0x06,0x02,0xf6,0x3f, //initial agc gain setting
675         0x29,0x06,0x01,0x0f, //initial Tx output power, 0x0f is +4dBm
676         0x35,0x06,0x01,0x08, //maximum Tx ouput power setting
677         0x37,0x06,0x01,0x00, //RC32K calibration control, 0xAA to enable
678         0x05,0x06,0x02,0x34,0x00, //no use
679         0x04,0x06,0x01,0x20, //internal dvdd voltage level control if using 0.9V from MCU side
680         0x00,0x00,0x00,0x00  //dummy
681     }
682 };
683 
684 am_hal_ble_patch_t am_ble_nvds_patch =
685 {
686     .ui32Type = 0xDD,
687     .ui32Length = 0x00be,
688     .ui32CRC = 0x7e77,
689     .pui32Data = am_ble_buffer_nvds_data.words,
690 };
691 
692 //*****************************************************************************
693 //
694 // End Doxygen group.
695 //! @}
696 //
697 //*****************************************************************************
698