summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/FreeRTOSConfig.h2
-rw-r--r--src/components/ble/NimbleController.cpp1
-rw-r--r--src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c4
3 files changed, 4 insertions, 3 deletions
diff --git a/src/FreeRTOSConfig.h b/src/FreeRTOSConfig.h
index 5462b93c..263d8031 100644
--- a/src/FreeRTOSConfig.h
+++ b/src/FreeRTOSConfig.h
@@ -60,7 +60,7 @@
#define configUSE_TICKLESS_IDLE_SIMPLE_DEBUG 0 /* See into vPortSuppressTicksAndSleep source code for explanation */
#define configCPU_CLOCK_HZ (SystemCoreClock)
#define configTICK_RATE_HZ 1024
-#define configMAX_PRIORITIES (4)
+#define configMAX_PRIORITIES (3)
#define configMINIMAL_STACK_SIZE (120)
#define configTOTAL_HEAP_SIZE (1024 * 17)
#define configMAX_TASK_NAME_LEN (4)
diff --git a/src/components/ble/NimbleController.cpp b/src/components/ble/NimbleController.cpp
index 0be7c0f7..10eb429a 100644
--- a/src/components/ble/NimbleController.cpp
+++ b/src/components/ble/NimbleController.cpp
@@ -77,6 +77,7 @@ int GAPEventCallback(struct ble_gap_event* event, void* arg) {
void NimbleController::Init() {
while (!ble_hs_synced()) {
+ vTaskDelay(10);
}
nptr = this;
diff --git a/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c b/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
index 205831a9..49834db1 100644
--- a/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
+++ b/src/libs/mynewt-nimble/porting/npl/freertos/src/nimble_port_freertos.c
@@ -38,7 +38,7 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* since it has compatible prototype.
*/
xTaskCreate(nimble_port_ll_task_func, "ll", configMINIMAL_STACK_SIZE + 200,
- NULL, 3, &ll_task_h);
+ NULL, 2, &ll_task_h);
#endif
/*
@@ -47,5 +47,5 @@ nimble_port_freertos_init(TaskFunction_t host_task_fn)
* default queue it is just easier to make separate task which does this.
*/
xTaskCreate(host_task_fn, "ble", configMINIMAL_STACK_SIZE + 600,
- NULL, 2, &host_task_h);
+ NULL, 1, &host_task_h);
}