Skip to content
This repository was archived by the owner on Dec 16, 2024. It is now read-only.

Commit 2b7bd59

Browse files
committed
http fota: add firmware update reboot reason
1 parent 740a476 commit 2b7bd59

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

app/http_fota/source/http_fota_task.c

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -326,6 +326,10 @@ static void fota_fsm(fota_context_t *pCtx)
326326
} else {
327327
#endif
328328
LOG_WRN("Entering mcuboot");
329+
#ifdef CONFIG_LCZ_MEMFAULT
330+
memfault_reboot_tracking_mark_reset_imminent(
331+
kMfltRebootReason_FirmwareUpdate, NULL);
332+
#endif
329333
/* Allow last print to occur. */
330334
k_sleep(K_MSEC(CONFIG_LOG_PROCESS_THREAD_SLEEP_MS));
331335
sys_reboot(SYS_REBOOT_COLD);
@@ -350,6 +354,10 @@ static void fota_fsm(fota_context_t *pCtx)
350354
next_state = FOTA_FSM_MODEM_WAIT;
351355
} else {
352356
LOG_WRN("Rebooting for modem update to be completed.");
357+
#ifdef CONFIG_LCZ_MEMFAULT
358+
memfault_reboot_tracking_mark_reset_imminent(
359+
kMfltRebootReason_FirmwareUpdate, NULL);
360+
#endif
353361
/* Allow last print to occur. */
354362
k_sleep(K_MSEC(CONFIG_LOG_PROCESS_THREAD_SLEEP_MS));
355363
sys_reboot(SYS_REBOOT_COLD);

0 commit comments

Comments
 (0)