zephyr: Enable interrupts unconditionally
Due to an issue described here:
https://github.com/zephyrproject-rtos/zephyr/issues/8393
interrupts are not enabled when multithreading is disabled.
Enable interrupts to allow the serial recovery mode UART to receive
characters.
Note: This commit must be reverted once the issue is addressed.
Signed-off-by: Carles Cufi <carles.cufi@nordicsemi.no>
diff --git a/boot/zephyr/serial_adapter.c b/boot/zephyr/serial_adapter.c
index e04e0b1..f51dc94 100644
--- a/boot/zephyr/serial_adapter.c
+++ b/boot/zephyr/serial_adapter.c
@@ -197,5 +197,10 @@
uart_irq_rx_enable(uart_dev);
+ /* Enable all interrupts unconditionally. Note that this is due
+ * to Zephyr issue #8393. This should be removed once the
+ * issue is fixed in upstream Zephyr. */
+ irq_unlock(0);
+
return 0;
}