Commit 067f30ae authored by Piotr Dymacz's avatar Piotr Dymacz Committed by Andrzej Puzdrowski
Browse files

boot_serial: explain disabled idle state in timeout based recovery



This adds short explanation (in form of a comment) why CPU shouldn't
enter idle state in timeout based serial recovery.

Ref: 3942e9bf ("boot_serial: fix serial recovery mode with timeout")
Signed-off-by: default avatarPiotr Dymacz <pepe2k@gmail.com>
parent 3942e9bf
Loading
Loading
Loading
Loading
+5 −0
Original line number Diff line number Diff line
@@ -849,6 +849,11 @@ boot_serial_read_console(const struct boot_uart_funcs *f,int timeout_in_ms)

    off = 0;
    while (timeout_in_ms > 0 || bs_entry) {
        /*
         * Don't enter CPU idle state here if timeout based serial recovery is
         * used as otherwise the boot process hangs forever, waiting for input
         * from serial console (if single-thread mode is used).
         */
#ifndef MCUBOOT_SERIAL_WAIT_FOR_DFU
        MCUBOOT_CPU_IDLE();
#endif