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: Andrzej Puzdrowski <andrzej.puzdrowski@nordicsemi.no>
This commit is contained in:
parent
142b339667
commit
aea38eb03a
|
@ -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;
|
||||
|
|
Loading…
Reference in New Issue