summaryrefslogtreecommitdiff
path: root/src/SystemTask
diff options
context:
space:
mode:
authorJF <jf@codingfield.com>2020-03-06 20:50:29 (GMT)
committerJF <jf@codingfield.com>2020-03-06 20:50:29 (GMT)
commit4ffd8d1c91ce7c985e673182c142d5f191b0d3ee (patch)
treee4bbbba640db753573fd67e3ef94b719d984e859 /src/SystemTask
parentfd45746b8cdb13dc7b0bfc175b5d5829bcdd8a07 (diff)
Call ble_manager_init_peer_manager() _after_ the scheduler has been started. This fixes an issue that would prevent the firmware from running correctly after a full reset or after the flashing of the firmware.
Before this fix, ble_manager_init_peer_manager() was called before the scheduler, which trigged an assert in an IRQ routine.
Diffstat (limited to 'src/SystemTask')
-rw-r--r--src/SystemTask/SystemTask.cpp1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/SystemTask/SystemTask.cpp b/src/SystemTask/SystemTask.cpp
index e15846d..ca0c71e 100644
--- a/src/SystemTask/SystemTask.cpp
+++ b/src/SystemTask/SystemTask.cpp
@@ -34,6 +34,7 @@ void SystemTask::Work() {
NRF_LOG_INFO("Last reset reason : %s", Pinetime::Drivers::Watchdog::ResetReasonToString(watchdog.ResetReason()));
APP_GPIOTE_INIT(2);
bool erase_bonds=false;
+ ble_manager_init_peer_manager();
nrf_sdh_freertos_init(ble_manager_start_advertising, &erase_bonds);
spi.Init();