diff options
| author | Neil O'Fix <69880003+nlfx@users.noreply.github.com> | 2021-06-26 18:53:32 (GMT) |
|---|---|---|
| committer | GitHub <noreply@github.com> | 2021-06-26 18:53:32 (GMT) |
| commit | 0045fb16b66b008c13888312b92688dcb7535a0c (patch) | |
| tree | ae945a9184c1fe5f47003c9a6ef8e05a389d9f25 /src/components | |
| parent | 883700fca13a45b6cb0af4d74e3ef276a2d69283 (diff) | |
SPI flash sleep if bootloader >= 1.0.0 (#322)
* Retrieve and display bootloader version
- Display bootloader version on System Info screen
- Enable SPI flash sleep mode if bootloader version >= 1.0.0
* Wait for SPI flash to wakeup before starting OTA DFU
Diffstat (limited to 'src/components')
| -rw-r--r-- | src/components/ble/DfuService.cpp | 5 |
1 files changed, 5 insertions, 0 deletions
diff --git a/src/components/ble/DfuService.cpp b/src/components/ble/DfuService.cpp index cec194c..e6bcea8 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}; |
