Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion app/src/main.c
Original file line number Diff line number Diff line change
Expand Up @@ -289,7 +289,7 @@ static int sm_main(void)
return ret;

exit_reboot:
LOG_PANIC();
log_flush();
sys_reboot(SYS_REBOOT_COLD);
}
SYS_INIT(sm_main, APPLICATION, 100);
3 changes: 1 addition & 2 deletions app/src/sm_at_commands.c
Original file line number Diff line number Diff line change
Expand Up @@ -141,7 +141,6 @@ static void sm_shutdown(void)
{
sm_at_host_uninit();
sm_power_off_modem();
LOG_PANIC();
sm_ctrl_pin_enter_shutdown();
}

Expand All @@ -160,7 +159,7 @@ FUNC_NORETURN void sm_reset(void)
{
sm_at_host_uninit();
sm_power_off_modem();
LOG_PANIC();
log_flush();
sys_reboot(SYS_REBOOT_COLD);
}

Expand Down
4 changes: 2 additions & 2 deletions app/src/sm_at_dfu.c
Original file line number Diff line number Diff line change
Expand Up @@ -312,7 +312,7 @@ static int handle_at_xdfu_init(enum at_parser_cmd_type cmd_type, struct at_parse

(void)set_full_mfw_dfu_segment_type(DFU_FULL_MFW_SEGMENT_BOOTLOADER);

LOG_PANIC();
log_flush();
sys_reboot(SYS_REBOOT_COLD);
default:
LOG_ERR("Invalid target type: %d", type);
Expand Down Expand Up @@ -566,7 +566,7 @@ static int handle_at_xdfu_apply(enum at_parser_cmd_type cmd_type, struct at_pars
(void)set_full_mfw_dfu_segment_type(
DFU_FULL_MFW_SEGMENT_BOOTLOADER);
LOG_INF("Firmware update successful, rebooting...");
LOG_PANIC();
log_flush();
sys_reboot(SYS_REBOOT_COLD);
}
}
Expand Down
2 changes: 1 addition & 1 deletion app/src/sm_at_fota.c
Original file line number Diff line number Diff line change
Expand Up @@ -529,7 +529,7 @@ FUNC_NORETURN static void handle_full_fota_activation_fail(int ret)
LOG_INF("External flash erase succeeded");

LOG_WRN("Rebooting...");
LOG_PANIC();
log_flush();
sys_reboot(SYS_REBOOT_COLD);
}

Expand Down
1 change: 0 additions & 1 deletion app/src/sm_at_host.c
Original file line number Diff line number Diff line change
Expand Up @@ -1084,7 +1084,6 @@ static void handle_bootloader_at_cmd(uint8_t *buf, size_t buf_size, char *at_cmd
}
} else if (strncasecmp(at_cmd, AT_XRESET_CMD, sizeof(AT_XRESET_CMD) - 1) == 0) {
LOG_INF("Rebooting device via %s command", AT_XRESET_CMD);
LOG_PANIC();
final_call(sm_reset);
} else {
LOG_ERR("AT command not supported in bootloader mode: %s", at_cmd);
Expand Down
3 changes: 2 additions & 1 deletion app/src/sm_ctrl_pin.c
Original file line number Diff line number Diff line change
Expand Up @@ -101,7 +101,7 @@ void sm_ctrl_pin_enter_sleep_no_uninit(bool at_host_power_off)
}

LOG_INF("Entering sleep. No uninit.");
LOG_PANIC();
log_flush();

k_sleep(K_MSEC(100));

Expand Down Expand Up @@ -155,6 +155,7 @@ void sm_ctrl_pin_enter_idle(void)
void sm_ctrl_pin_enter_shutdown(void)
{
LOG_INF("Entering shutdown.");
log_flush();
k_sleep(K_MSEC(100));

nrf_regulators_system_off(NRF_REGULATORS_NS);
Expand Down
Loading