mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Merge branch 'bugfix/bootloader_support/flash' into 'master'
bootloader_support: fix register backup See merge request espressif/esp-idf!23507
This commit is contained in:
commit
1438d9a02c
@ -553,6 +553,7 @@ IRAM_ATTR uint32_t bootloader_flash_execute_command_common(
|
||||
uint32_t old_ctrl_reg = SPIFLASH.ctrl.val;
|
||||
uint32_t old_user_reg = SPIFLASH.user.val;
|
||||
uint32_t old_user1_reg = SPIFLASH.user1.val;
|
||||
uint32_t old_user2_reg = SPIFLASH.user2.val;
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
SPIFLASH.ctrl.val = SPI_WP_REG_M; // keep WP high while idle, otherwise leave DIO mode
|
||||
#else
|
||||
@ -599,6 +600,7 @@ IRAM_ATTR 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;
|
||||
SPIFLASH.user2.val = old_user2_reg;
|
||||
|
||||
uint32_t ret = SPIFLASH.data_buf[0];
|
||||
if (miso_len < 32) {
|
||||
|
Loading…
x
Reference in New Issue
Block a user