Skip to content

Commit 137eb19

Browse files
authored
Merge branch 'pebble-dev:main' into main
2 parents 7e9f7f8 + c1c7ef0 commit 137eb19

3 files changed

Lines changed: 21 additions & 22 deletions

File tree

src/bluetooth-fw/nimble/init.c

Lines changed: 15 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -14,27 +14,24 @@
1414
* limitations under the License.
1515
*/
1616

17-
#include "nimble_store.h"
18-
19-
#include <stdlib.h>
20-
17+
#include <FreeRTOS.h>
2118
#include <bluetooth/init.h>
2219
#include <comm/bt_lock.h>
23-
#include <kernel/pebble_tasks.h>
24-
#include <os/tick.h>
25-
#include <system/logging.h>
26-
#include <system/passert.h>
27-
28-
#include <FreeRTOS.h>
29-
#include <semphr.h>
30-
3120
#include <host/ble_hs.h>
3221
#include <host/ble_hs_stop.h>
3322
#include <host/util/util.h>
23+
#include <kernel/pebble_tasks.h>
3424
#include <nimble/nimble_port.h>
25+
#include <os/tick.h>
26+
#include <semphr.h>
3527
#include <services/dis/ble_svc_dis.h>
3628
#include <services/gap/ble_svc_gap.h>
3729
#include <services/gatt/ble_svc_gatt.h>
30+
#include <stdlib.h>
31+
#include <system/logging.h>
32+
#include <system/passert.h>
33+
34+
#include "nimble_store.h"
3835

3936
static const uint32_t s_bt_stack_start_stop_timeout_ms = 2000;
4037

@@ -67,9 +64,7 @@ static void prv_host_task_main(void *unused) {
6764
nimble_port_run();
6865
}
6966

70-
static void prv_ble_hs_stop_cb(int status, void *arg) {
71-
xSemaphoreGive(s_host_stopped);
72-
}
67+
static void prv_ble_hs_stop_cb(int status, void *arg) { xSemaphoreGive(s_host_stopped); }
7368

7469
// ----------------------------------------------------------------------------------------
7570
void bt_driver_init(void) {
@@ -94,11 +89,11 @@ void bt_driver_init(void) {
9489

9590
#if NIMBLE_CFG_CONTROLLER
9691
TaskParameters_t ll_task_params = {
97-
.pvTaskCode = nimble_port_ll_task_func,
98-
.pcName = "NimbleLL",
99-
.usStackDepth = (configMINIMAL_STACK_SIZE + 400) / sizeof(StackType_t),
100-
.uxPriority = (configMAX_PRIORITIES - 1) | portPRIVILEGE_BIT,
101-
.puxStackBuffer = NULL,
92+
.pvTaskCode = nimble_port_ll_task_func,
93+
.pcName = "NimbleLL",
94+
.usStackDepth = (configMINIMAL_STACK_SIZE + 600) / sizeof(StackType_t),
95+
.uxPriority = (configMAX_PRIORITIES - 1) | portPRIVILEGE_BIT,
96+
.puxStackBuffer = NULL,
10297
};
10398

10499
pebble_task_create(PebbleTask_BTController, &ll_task_params, &s_ll_task_handle);

third_party/nimble/port/include/nrf52/syscfg/syscfg.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -901,11 +901,11 @@
901901
#endif
902902

903903
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_COUNT
904-
#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (12)
904+
#define MYNEWT_VAL_MSYS_1_BLOCK_COUNT (35)
905905
#endif
906906

907907
#ifndef MYNEWT_VAL_MSYS_1_BLOCK_SIZE
908-
#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (292)
908+
#define MYNEWT_VAL_MSYS_1_BLOCK_SIZE (304)
909909
#endif
910910

911911
#ifndef MYNEWT_VAL_MSYS_1_SANITY_MIN_COUNT

third_party/nimble/syscfg/targets/nrf52/syscfg.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,7 @@
1515
syscfg.vals:
1616
# TODO: HFXO with nrf52_clock_hfxo_request/release?
1717
MCU_HFCLK_SOURCE: HFINT
18+
# Values measured to be found _okay_ when doing firmware update related
19+
# activites. They may need further tuning.
20+
MSYS_1_BLOCK_COUNT: 35
21+
MSYS_1_BLOCK_SIZE: 304

0 commit comments

Comments
 (0)