From 7649db9712b608dba1aa8742da52abfbcb94a442 Mon Sep 17 00:00:00 2001 From: "Michael (XIAO Xufeng)" Date: Thu, 19 Aug 2021 17:02:58 +0800 Subject: [PATCH] draft: another patch.. --- components/bootloader_support/src/bootloader_flash.c | 2 ++ 1 file changed, 2 insertions(+) diff --git a/components/bootloader_support/src/bootloader_flash.c b/components/bootloader_support/src/bootloader_flash.c index 880da3d507..8ed1726e67 100644 --- a/components/bootloader_support/src/bootloader_flash.c +++ b/components/bootloader_support/src/bootloader_flash.c @@ -579,6 +579,7 @@ IRAM_ATTR static uint32_t bootloader_flash_execute_command_common( assert(miso_len <= 32); uint32_t old_ctrl_reg = SPIFLASH.ctrl.val; uint32_t old_user_reg = SPIFLASH.user.val; + uint32_t old_user1_reg = SPIFLASH.user1.val; #if CONFIG_IDF_TARGET_ESP32 SPIFLASH.ctrl.val = SPI_WP_REG_M; // keep WP high while idle, otherwise leave DIO mode #else @@ -626,6 +627,7 @@ IRAM_ATTR static uint32_t bootloader_flash_execute_command_common( } SPIFLASH.ctrl.val = old_ctrl_reg; SPIFLASH.user.val = old_user_reg; + SPIFLASH.user1.val = old_user1_reg; uint32_t ret = SPIFLASH.data_buf[0]; if (miso_len < 32) {