From 9d1387522c455f22d513bdb44c6a30ec292f635f Mon Sep 17 00:00:00 2001 From: Dong Heng Date: Mon, 9 May 2022 19:15:37 +0800 Subject: [PATCH] feat(bootloader): Disable CPU interrupt in boot --- components/bootloader/subproject/main/bootloader_start.c | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/components/bootloader/subproject/main/bootloader_start.c b/components/bootloader/subproject/main/bootloader_start.c index 3ba0adde..d79496db 100644 --- a/components/bootloader/subproject/main/bootloader_start.c +++ b/components/bootloader/subproject/main/bootloader_start.c @@ -22,6 +22,7 @@ #include "esp_image_format.h" #include "esp_spi_flash.h" #include "esp_log.h" +#include "driver/soc.h" static const char* TAG = "boot"; @@ -30,6 +31,11 @@ static int selected_boot_partition(const bootloader_state_t *bs); void call_start_cpu(void) { + esp_irqflag_t irq; + + irq = soc_save_local_irq(); + ESP_LOGD(TAG, "CPU local irq: 0x%x", irq); + #ifdef CONFIG_BOOTLOADER_FAST_BOOT REG_SET_BIT(DPORT_CTL_REG, DPORT_CTL_DOUBLE_CLK); #endif