Commit aea38eb0 authored by Andrzej Puzdrowski's avatar Andrzej Puzdrowski
Browse files

boot/boot_serial: call idle for reducing power in single thread

Sine zephyr https://github.com/zephyrproject-rtos/zephyr/pull/34279


was merged there is no silent idle thread created automatically while
CONFIG_MULTITHREADING=n. Since that any single thread application
needs to call k_cpu_idle() (wrapped by MCUBOOT_CPU_IDLE)
by itself for entering idle mode, which allows for reduction
power consumption.

Signed-off-by: default avatarAndrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
parent 142b3396
Loading
Loading
Loading
Loading
+1 −0
Original line number Diff line number Diff line
@@ -613,6 +613,7 @@ boot_serial_start(const struct boot_uart_funcs *f)

    off = 0;
    while (1) {
        MCUBOOT_CPU_IDLE();
        rc = f->read(in_buf + off, sizeof(in_buf) - off, &full_line);
        if (rc <= 0 && !full_line) {
            continue;