InfiniTime.git

ref: 9196c18d376d4f18c686bcfec8550f9c8659d5ea

src/libs/mynewt-nimble/nimble/controller/syscfg.yml


  1
  2
  3
  4
  5
  6
  7
  8
  9
 10
 11
 12
 13
 14
 15
 16
 17
 18
 19
 20
 21
 22
 23
 24
 25
 26
 27
 28
 29
 30
 31
 32
 33
 34
 35
 36
 37
 38
 39
 40
 41
 42
 43
 44
 45
 46
 47
 48
 49
 50
 51
 52
 53
 54
 55
 56
 57
 58
 59
 60
 61
 62
 63
 64
 65
 66
 67
 68
 69
 70
 71
 72
 73
 74
 75
 76
 77
 78
 79
 80
 81
 82
 83
 84
 85
 86
 87
 88
 89
 90
 91
 92
 93
 94
 95
 96
 97
 98
 99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
# Licensed to the Apache Software Foundation (ASF) under one
# or more contributor license agreements.  See the NOTICE file
# distributed with this work for additional information
# regarding copyright ownership.  The ASF licenses this file
# to you under the Apache License, Version 2.0 (the
# "License"); you may not use this file except in compliance
# with the License.  You may obtain a copy of the License at
#
#  http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing,
# software distributed under the License is distributed on an
# "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY
# KIND, either express or implied.  See the License for the
# specific language governing permissions and limitations
# under the License.
#

syscfg.defs:
    BLE_CONTROLLER:
        description: >
            Indicates that NimBLE controller is present. The default value for
            this setting shall not be overriden.            
        value: 1

    BLE_HW_WHITELIST_ENABLE:
        description: >
                        Used to enable hardware white list
        value: 1

    BLE_LL_SYSVIEW:
        description: >
                        Enable SystemView tracing module for controller.
        value: 0

    BLE_LL_PRIO:
        description: 'The priority of the LL task'
        type: 'task_priority'
        value: 0

    BLE_LL_SCA:
        description: Sleep clock accuracy of our device (in ppm)
        value: MYNEWT_VAL(BLE_LL_OUR_SCA)
        range: 0..500

    BLE_LL_TX_PWR_DBM:
        description: 'Transmit power level.'
        value: '0'

    BLE_LL_NUM_COMP_PKT_ITVL_MS:
        description: >
            Determines the interval at which the controller will send the
            number of completed packets event to the host. Rate is in milliseconds.            
        value: 2000

    BLE_LL_MFRG_ID:
        description: >
                        Manufacturer ID. Should be set to unique ID per manufacturer.
        value: '0xFFFF'

    # Configuration items for the number of duplicate advertisers and the
    # number of advertisers from which we have heard a scan response.
    BLE_LL_NUM_SCAN_DUP_ADVS:
        description: 'The number of duplicate advertisers stored.'
        value: '8'
    BLE_LL_NUM_SCAN_RSP_ADVS:
        description: >
            The number of advertisers from which we have heard a scan
            response. Prevents sending duplicate events to host.            
        value: '8'

    BLE_LL_WHITELIST_SIZE:
        description: 'Size of the LL whitelist.'
        value: '8'

    BLE_LL_RESOLV_LIST_SIZE:
        description: 'Size of the resolving list.'
        value: '4'

    # Data length management definitions for connections. These define the
    # maximum size of the PDU's that will be sent and/or received in a
    # connection.
    BLE_LL_MAX_PKT_SIZE:
        description: 'The maximum PDU size that can be sent/received'
        value: '251'
    BLE_LL_SUPP_MAX_RX_BYTES:
        description: 'The maximum supported received PDU size'
        value: MYNEWT_VAL(BLE_LL_MAX_PKT_SIZE)
    BLE_LL_SUPP_MAX_TX_BYTES:
        description: 'The maximum supported transmit PDU size'
        value: MYNEWT_VAL(BLE_LL_MAX_PKT_SIZE)
    BLE_LL_CONN_INIT_MAX_TX_BYTES:
        description: >
            Used to set the initial maximum transmit PDU size in a
            connection. If this is set to a value greater than 27,
            the controller will automatically attempt to do the
            data length update procedure. The host can always tell
            the controller to update this value.            
        value: '27'

    # The number of slots that will be allocated to each connection
    BLE_LL_CONN_INIT_SLOTS:
        description: >
            This is the number of "slots" allocated to a connection when scheduling
            connections. Each slot is 1.25 msecs long. Note that a connection event may
            last longer than the number of slots allocated here and may also end earlier
            (depending on when the next scheduled event occurs and how much data needs
            to be transferred in the connection). However, you will be guaranteed that
            a connection event will be given this much time, if needed. Consecutively
            scheduled items will be at least this far apart            
        value: '4'

    BLE_LL_CONN_INIT_MIN_WIN_OFFSET:
        description: >
            This is the minimum number of "slots" for WindowOffset value used for
            CONNECT_IND when creating new connection as a master. Each slot is 1.25
            msecs long. Increasing this value will delay first connection event after
            connection is created. However, older TI CC254x controllers cannot change
            connection parameters later if WindowOffset was set to 0 in CONNECT_IND. To
            ensure interoperability with such devices set this value to 2 (or more).            
        value: '0'

    # Strict scheduling
    BLE_LL_STRICT_CONN_SCHEDULING:
        description: >
            Forces the scheduler on a central to schedule connections in fixed
            time intervals called periods. If set to 0, the scheduler is not forced
            to do this. If set to 1, the scheduler will only schedule connections at
            period boundaries. See comments in ble_ll_sched.h for more details.            
        value: '0'

    BLE_LL_ADD_STRICT_SCHED_PERIODS:
        description: >
            The number of additional periods that will be allocated for strict
            scheduling. The total # of periods allocated for strict scheduling
            will be equal to the number of connections plus this number.            
        value: '0'

    BLE_LL_USECS_PER_PERIOD:
        description: >
                        The number of usecs per period.
        value: '3250'

    # The number of random bytes to store
    BLE_LL_RNG_BUFSIZE:
        description: >
            The number of random bytes that the link layer will try to
            always have available for the host to use. Decreasing this
            value may cause host delays if the host needs lots of random
            material often.            
        value: '32'

    BLE_LL_RFMGMT_ENABLE_TIME:
        description: >
            Time required for radio and/or related components to be fully
            enabled before any request from LL is sent. This value is used
            by rfmgmt to enable PHY in advance, before request from LL is
            made. It depends on radio driver selected and may also depend
            on hardware used:
            - nrf51 - time required for XTAL to settle
            - nrf52 - time required for XTAL to settle
            Value is specified in microseconds. If set to 0, rfmgmt keeps
            PHY enabled all the time.            
        value: MYNEWT_VAL(BLE_XTAL_SETTLE_TIME)

    # Configuration for LL supported features.
    #
    # There are a total 8 features that the LL can support. These can be found
    # in v4.2, Vol 6 Part B Section 4.6.
    #
    # These feature definitions are used to inform a host or other controller
    # about the LL features supported by the controller.
    #
    # NOTE: 'the' controller always supports extended reject indicate and thus
    # is not listed here.


    BLE_LL_CFG_FEAT_LE_ENCRYPTION:
        description: >
            This option enables/disables encryption support in the controller.
            This option saves both both code and RAM.            
        value: '1'

    BLE_LL_CFG_FEAT_CONN_PARAM_REQ:
        description: >
            This option enables/disables the connection parameter request
            procedure.  This is implemented in the controller but is disabled
            by default.            
        value: '1'

    BLE_LL_CFG_FEAT_SLAVE_INIT_FEAT_XCHG:
        description: >
            This option allows a slave to initiate the feature exchange
            procedure.  This feature is implemented but currently has no impact
            on code or ram size            
        value: '1'

    BLE_LL_CFG_FEAT_LE_PING:
        description: >
            This option allows a controller to send/receive LE pings.
            Currently, this feature is not implemented by the controller so
            turning it on or off has no effect.            
        value: 'MYNEWT_VAL_BLE_LL_CFG_FEAT_LE_ENCRYPTION'

    BLE_LL_CFG_FEAT_DATA_LEN_EXT:
        description: >
            This option enables/disables the data length update procedure in
            the controller. If enabled, the controller is allowed to change the
            size of tx/rx pdu's used in a connection. This option has only
            minor impact on code size and non on RAM.            
        value: '1'

    BLE_LL_CFG_FEAT_LL_PRIVACY:
        description: >
                        This option is used to enable/disable LL privacy.
        value: '1'

    BLE_LL_CFG_FEAT_LE_CSA2:
        description: >
            This option is used to enable/disable support for LE Channel
            Selection Algorithm #2.            
        value: '0'

    BLE_LL_CFG_FEAT_LE_2M_PHY:
        description: >
                        This option is used to enable/disable support for the 2Mbps PHY.
        value: '0'

    BLE_LL_CFG_FEAT_LE_CODED_PHY:
        description: >
                        This option is used to enable/disable support for the coded PHY.
        value: '0'

    BLE_LL_CFG_FEAT_LL_EXT_ADV:
        description: >
            This option is used to enable/disable support for Extended
            Advertising Feature. That means extended scanner, advertiser
            and connect.            
        value: MYNEWT_VAL(BLE_EXT_ADV)

    BLE_LL_CFG_FEAT_LL_PERIODIC_ADV:
        description: >
            This option is used to enable/disable support for Periodic
            Advertising Feature.            
        value: MYNEWT_VAL(BLE_PERIODIC_ADV)

    BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_CNT:
        description: >
                        This option is used to configure number of supported periodic syncs.
        value: MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS)

    BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_LIST_CNT:
        description: >
                        Size of Periodic Advertiser sync list.
        value: MYNEWT_VAL(BLE_MAX_PERIODIC_SYNCS)

    BLE_LL_CFG_FEAT_LL_PERIODIC_ADV_SYNC_TRANSFER:
        description: >
            This option is use to enable/disable support for Periodic
            Advertising Sync Transfer Feature.            
        value: MYNEWT_VAL(BLE_PERIODIC_ADV_SYNC_TRANSFER)

    BLE_LL_CFG_FEAT_CTRL_TO_HOST_FLOW_CONTROL:
        description: >
            Enable controller-to-host flow control support. This allows host to
            limit number of ACL packets sent at once from controller to avoid
            congestion on HCI transport if feature is also supported by host.            
        value: 0

    BLE_LL_CFG_FEAT_LL_SCA_UPDATE:
        description: >
                        This option is used to enable/disable support for SCA update procedure
        value: 0
        restrictions:
            - '(BLE_VERSION >= 52) if 1'

    BLE_LL_CFG_FEAT_LL_ISO:
        description: >
            This option is used to enable/disable support for LE Isochronous Channels
            as per Bluetooth v5.2 channels            
        value: MYNEWT_VAL(BLE_ISO)
        restrictions:
            - '(BLE_VERSION >= 52) if 1'

    BLE_LL_CFG_FEAT_LL_ISO_TEST:
        description: >
                        This option is used to enable/disbale test commands for ISO support
        value: MYNEWT_VAL(BLE_ISO_TEST)
        restrictions:
            - 'BLE_LL_CFG_FEAT_LL_ISO if 1'

    BLE_LL_EXT_ADV_AUX_PTR_CNT:
         description: >
            This option configure a max number of scheduled outstanding auxiliary
            packets for receive on secondary advertising channel.            
         value: 0

    BLE_PUBLIC_DEV_ADDR:
        description: >
            Allows the target or app to override the public device address
            used by the controller. If all zero, the controller will
            attempt to retrieve the public device address from its
            chip specific location. If non-zero, this address will
            be used.            
        value: "(uint8_t[6]){0x00, 0x00, 0x00, 0x00, 0x00, 0x00}"

    BLE_LL_DTM:
        description: >
                          Enables HCI Test commands needed for Bluetooth SIG certification
        value: MYNEWT_VAL(BLE_LL_DIRECT_TEST_MODE)
    BLE_LL_DTM_EXTENSIONS:
        description: >
             Enables non-standard extensions to HCI test commands. Once enabled,
             HCI_LE_Transmitter_Test accepts extra parameters in addition to
             those defined in Core specification
               interval (2 octets)   interval between packets (usecs), overrides
                                     standard interval
               pkt_count (2 octets)  number of packets to transmit, controller
                                     will automatically stop sending packets
                                     after given number of packets was sent
             Setting either of these parameters to 0 will configure for default
             behavior, as per Core specification.
             If specified interval is shorter then allowed by specification it
             will be ignored.
             Extended parameters shall immediately follow standard parameters.
             Controller can accept both standard and extended version of command
             depending on specified HCI command length.             
        value: 0

    BLE_LL_VND_EVENT_ON_ASSERT:
        description: >
            This options enables controller to send a vendor-specific event on
            an assertion in controller code. The event contains file name and
            line number where assertion occured.            
        value: 0

    BLE_LL_SYSINIT_STAGE:
        description: >
                        Sysinit stage for the NimBLE controller.
        value: 250

    BLE_LL_DEBUG_GPIO_HCI_CMD:
        description: >
            GPIO pin number to debug HCI commands flow. Pin is set to high state
            when HCI command is being processed.            
        value: -1
    BLE_LL_DEBUG_GPIO_HCI_EV:
        description: >
            GPIO pin number to debug HCI events flow. Pin is set to high state
            when HCI event is being sent.            
        value: -1
    BLE_LL_DEBUG_GPIO_SCHED_RUN:
        description: >
            GPIO pin number to debug scheduler running (on timer). Pin is set
            to high state while scheduler is running.            
        value: -1
    BLE_LL_DEBUG_GPIO_SCHED_ITEM_CB:
        description: >
            GPIO pin number to debug scheduler item execution times. Pin is set
            to high state while item is executed.            
        value: -1

# Below settings allow to change scheduler timings. These should be left at
# default values unless you know what you are doing!
    BLE_LL_SCHED_AUX_MAFS_DELAY:
        description: >
            Additional delay [us] between last ADV_EXT_IND and AUX_ADV_IND PDUs
            when scheduling extended advertising event. This extends T_MAFS.            
        value: 0
    BLE_LL_SCHED_AUX_CHAIN_MAFS_DELAY:
        description: >
            Additional delay [us] between consecutive AUX_CHAIN_IND PDUs
            when scheduling extended or periodic advertising event. This extends
            T_MAFS.            
        value: 0
    BLE_LL_SCHED_SCAN_AUX_PDU_LEN:
        description: >
            This is expected PDU len for AUX_ADV_IND and subsequent
            AUX_CHAIN_IND. When scheduling scan scheduler will reserve time for
            receiving this amount of time. Setting this to high value improves
            reception of large PDUs but results in wasting scheduler space when
            receiving small PDUs only. On the other hand too low value can
            result in not being able to scan whole PDU due to being preempted
            by next scheduled item. By default size matching legacy ADV_IND PDU
            payload is used: ExtHeader (Flags, AdvA, ADI) + 31 bytes of data.            
        range: 1..257
        value: 41

    BLE_LL_SCHED_SCAN_SYNC_PDU_LEN:
        description: >
            This is expected PDU len for AUX_SYNC_IND and subsequent
            AUX_CHAIN_IND. When scheduling scan scheduler will reserve time for
            receiving this amount of time. Setting this to high value improves
            reception of large PDUs but results in wasting scheduler space when
            receiving small PDUs only. On the other hand too low value can
            result in not being able to scan whole PDU due to being preempted
            by next scheduled item. By default size matching PDU with legacy
            data size is used: ExtHeader + 31 bytes of data.            
        range: 1..257
        value: 32

# deprecated settings (to be defunct/removed eventually)
    BLE_LL_DIRECT_TEST_MODE:
        description: use BLE_LL_DTM instead
        value: 0
        deprecated: 1
    BLE_XTAL_SETTLE_TIME:
        description: use BLE_LL_RFMGMT_ENABLE_TIME instead
        value: 0
        deprecated: 1
    BLE_LL_OUR_SCA:
        description: use BLE_LL_SCA instead
        value: 60
        deprecated: 1

# defunct settings (to be removed eventually)
    BLE_DEVICE:
        description: Superseded by BLE_CONTROLLER
        value: 1
        defunct: 1
    BLE_LP_CLOCK:
        description: Superseded by BLE_CONTROLLER
        value: 1
        defunct: 1
    BLE_NUM_COMP_PKT_RATE:
        description: Superseded by BLE_LL_NUM_COMP_PKT_ITVL_MS
        value: '(2 * OS_TICKS_PER_SEC)'
        defunct: 1
    BLE_LL_MASTER_SCA:
        description: use BLE_LL_SCA instead
        value: 4
        defunct: 1


syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
    BLE_LL_CFG_FEAT_LE_CSA2: 1
    BLE_HW_WHITELIST_ENABLE: 0
    BLE_LL_EXT_ADV_AUX_PTR_CNT: 5

# Enable vendor event on assert in standalone build to make failed assertions in
# controller code visible when connected to external host
syscfg.vals.!BLE_HOST:
    BLE_LL_VND_EVENT_ON_ASSERT: 1

syscfg.restrictions:
    - OS_CPUTIME_FREQ == 32768