mirror of
https://github.com/espressif/esp-nimble.git
synced 2026-07-28 21:57:55 +00:00
nimble/ll: Make LL task stack size configurable
This commit makes LL stack size configurable. Depending on compiler and platform default value may not be enough. It was reported that on nRF52840 90 words is not enough even if Ext Adv is disabled. To keep things simple lets just increase default stack size to 120 word for all usecases (with exception of nRF51 where defults to 96 bytes).
This commit is contained in:
@@ -72,3 +72,4 @@ syscfg.vals.BLE_CONTROLLER:
|
||||
OS_CPUTIME_FREQ: 32768
|
||||
OS_CPUTIME_TIMER_NUM: 5
|
||||
BLE_LL_RFMGMT_ENABLE_TIME: 1500
|
||||
BLE_LL_STACK_SIZE: 4000
|
||||
|
||||
@@ -358,21 +358,10 @@ static void ble_ll_event_dbuf_overflow(struct ble_npl_event *ev);
|
||||
#endif
|
||||
|
||||
#if MYNEWT
|
||||
|
||||
#if BABBLESIM
|
||||
#define BLE_LL_STACK_SIZE (4000)
|
||||
#else
|
||||
/* The BLE LL task data structure */
|
||||
#if MYNEWT_VAL(BLE_LL_CFG_FEAT_LL_EXT_ADV)
|
||||
#define BLE_LL_STACK_SIZE (120)
|
||||
#else
|
||||
#define BLE_LL_STACK_SIZE (90)
|
||||
#endif
|
||||
#endif
|
||||
|
||||
struct os_task g_ble_ll_task;
|
||||
|
||||
OS_TASK_STACK_DEFINE(g_ble_ll_stack, BLE_LL_STACK_SIZE);
|
||||
OS_TASK_STACK_DEFINE(g_ble_ll_stack, MYNEWT_VAL(BLE_LL_STACK_SIZE));
|
||||
|
||||
#endif /* MYNEWT */
|
||||
|
||||
@@ -1991,7 +1980,7 @@ ble_ll_init(void)
|
||||
/* Initialize the LL task */
|
||||
os_task_init(&g_ble_ll_task, "ble_ll", ble_ll_task, NULL,
|
||||
MYNEWT_VAL(BLE_LL_PRIO), OS_WAIT_FOREVER, g_ble_ll_stack,
|
||||
BLE_LL_STACK_SIZE);
|
||||
MYNEWT_VAL(BLE_LL_STACK_SIZE));
|
||||
#else
|
||||
|
||||
/*
|
||||
|
||||
@@ -493,6 +493,11 @@ syscfg.defs:
|
||||
range: 1..257
|
||||
value: 32
|
||||
|
||||
BLE_LL_STACK_SIZE:
|
||||
description: >
|
||||
This is the stack size for LL task.
|
||||
value: 120
|
||||
|
||||
syscfg.vals.BLE_LL_CFG_FEAT_LL_EXT_ADV:
|
||||
BLE_LL_CFG_FEAT_LE_CSA2: 1
|
||||
BLE_HW_WHITELIST_ENABLE: 0
|
||||
|
||||
@@ -29,3 +29,6 @@ pkg.apis: ble_driver
|
||||
pkg.deps:
|
||||
- nimble
|
||||
- nimble/controller
|
||||
|
||||
# allows to override nimble/controller settings
|
||||
pkg.subpriority: 1
|
||||
|
||||
@@ -0,0 +1,21 @@
|
||||
# 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.vals.!BLE_LL_CFG_FEAT_LL_EXT_ADV:
|
||||
BLE_LL_STACK_SIZE: 96
|
||||
Reference in New Issue
Block a user