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.
This commit is contained in:
parent
fd45746b8c
commit
4ffd8d1c91
|
@ -93,7 +93,6 @@ void ble_manager_init() {
|
|||
ble_manager_init_gatt();
|
||||
ble_manager_init_db_discovery();
|
||||
ble_manager_init_advertising();
|
||||
ble_manager_init_peer_manager();
|
||||
ble_manager_init_services();
|
||||
ble_manager_init_connection_params();
|
||||
}
|
||||
|
|
|
@ -34,6 +34,7 @@ extern "C" {
|
|||
|
||||
void ble_manager_init();
|
||||
void ble_manager_start_advertising(void *p_erase_bonds);
|
||||
void ble_manager_init_peer_manager();
|
||||
|
||||
// TODO use signals from RTOS to notify new time
|
||||
void ble_manager_set_new_time_callback(void (*OnNewTime)(current_time_char_t* currentTime));
|
||||
|
|
|
@ -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();
|
||||
|
|
Loading…
Reference in New Issue
Block a user