diff --git a/components/spi_flash/src/patch/common.c b/components/spi_flash/src/patch/common.c index 84aa395d..cc00d942 100644 --- a/components/spi_flash/src/patch/common.c +++ b/components/spi_flash/src/patch/common.c @@ -106,6 +106,7 @@ void FLASH_PATCH_TEXT_ATTR spi_exit(spi_state_t *state) Cache_Read_Enable_2(); vPortExitCritical(); + patch_delay(1); } static void FLASH_PATCH_TEXT_ATTR spi_trans_block(bool write_mode, diff --git a/components/spi_flash/src/patch/fm25q16a.c b/components/spi_flash/src/patch/fm25q16a.c index dbd290af..541f6bfd 100644 --- a/components/spi_flash/src/patch/fm25q16a.c +++ b/components/spi_flash/src/patch/fm25q16a.c @@ -237,7 +237,7 @@ static void FLASH_PATCH_TEXT_ATTR fm_cam_read_pre(void) static void FLASH_PATCH_TEXT_ATTR fm_soft_reset() { fm_send_spi_cmd(0x66, 1*8, 0, 0, NULL, 0, NULL, 0, 0); - // ets_delay_us(100); + // patch_delay(1); fm_send_spi_cmd(0x99, 1*8, 0, 0, NULL, 0, NULL, 0, 0); } @@ -378,7 +378,7 @@ static bool FLASH_PATCH_TEXT_ATTR fm_cam_erase_and_fix(uint8_t (*buf)[32]) } if (memcmp(cam_check, buf[line], 32) != 0) { ERROR(FLASH_PATCH_STR("CAM BUF[%d] check error\n"), line); - ets_delay_us(50000); + patch_delay(50); return false; } }