From fe76c0d2bf9dbee0a5086c3703d3eb24b00a3cb8 Mon Sep 17 00:00:00 2001
From: Rahix <rahix@rahix.de>
Date: Mon, 19 Aug 2019 15:20:03 +0200
Subject: [PATCH] fix(ble): Workaround for lockup issue

Delaying BLE startup by a bit seems to resolve the lockup issue we
observed.  This might need further attention in the future.

Signed-off-by: Rahix <rahix@rahix.de>
---
 epicardium/ble/ble.c | 6 ++++++
 1 file changed, 6 insertions(+)

diff --git a/epicardium/ble/ble.c b/epicardium/ble/ble.c
index 622ec4e8..ad9f9296 100644
--- a/epicardium/ble/ble.c
+++ b/epicardium/ble/ble.c
@@ -187,6 +187,12 @@ static void scheduleTimer(void)
 void vBleTask(void *pvParameters)
 {
 	ble_task_id = xTaskGetCurrentTaskHandle();
+
+	/*
+	 * Delay BLE startup by a bit because it locks up Epicardium otherwise.
+	 */
+	vTaskDelay(pdMS_TO_TICKS(500));
+
 	WsfInit();
 	StackInit();
 	setAddress();
-- 
GitLab