summaryrefslogtreecommitdiff
path: root/src/components
diff options
context:
space:
mode:
authorKieran Cawthray <kieranc@gmail.com>2021-06-29 21:10:36 +0200
committerKieran Cawthray <kieranc@gmail.com>2021-06-29 21:10:36 +0200
commit4f21748aa2a4693bd4b243ab0ebe11482d1aaf09 (patch)
tree762dd147b5d08db903da93883e7dc8dcaf6292cd /src/components
parent660a8597f6edc66deec94782817613e1a4f84a6d (diff)
parentf317d54218659af437d840d00fd349e7919a243f (diff)
Merge remote-tracking branch 'upstream/develop' into pinetimestyle-colorpicker
Diffstat (limited to 'src/components')
-rw-r--r--src/components/ble/DfuService.cpp5
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/ble/DfuService.cpp b/src/components/ble/DfuService.cpp
index cec194cc..e6bcea81 100644
--- a/src/components/ble/DfuService.cpp
+++ b/src/components/ble/DfuService.cpp
@@ -121,6 +121,11 @@ int DfuService::WritePacketHandler(uint16_t connectionHandle, os_mbuf* om) {
NRF_LOG_INFO(
"[DFU] -> Start data received : SD size : %d, BT size : %d, app size : %d", softdeviceSize, bootloaderSize, applicationSize);
+ // wait until SystemTask has finished waking up all devices
+ while (systemTask.IsSleeping()) {
+ vTaskDelay(50); // 50ms
+ }
+
dfuImage.Erase();
uint8_t data[] {16, 1, 1};