mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
spi_flash: Fix bug that in bootloader dummy is 0 when mosi is 0
This commit is contained in:
parent
0347d96124
commit
4074221540
@ -603,14 +603,12 @@ IRAM_ATTR uint32_t bootloader_flash_execute_command_common(
|
||||
SPIFLASH.addr = address;
|
||||
#endif
|
||||
//dummy phase
|
||||
uint32_t total_dummy = dummy_len;
|
||||
if (miso_len > 0) {
|
||||
uint32_t total_dummy = dummy_len + g_rom_spiflash_dummy_len_plus[1];
|
||||
total_dummy += g_rom_spiflash_dummy_len_plus[1];
|
||||
}
|
||||
SPIFLASH.user.usr_dummy = total_dummy > 0;
|
||||
SPIFLASH.user1.usr_dummy_cyclelen = total_dummy - 1;
|
||||
} else {
|
||||
SPIFLASH.user.usr_dummy = 0;
|
||||
SPIFLASH.user1.usr_dummy_cyclelen = 0;
|
||||
}
|
||||
//output data
|
||||
SPIFLASH.user.usr_mosi = mosi_len > 0;
|
||||
#if CONFIG_IDF_TARGET_ESP32
|
||||
|
Loading…
Reference in New Issue
Block a user