diff --git a/src/flash/nor/esp_flash.c b/src/flash/nor/esp_flash.c index c4eef8303a..393867dc56 100644 --- a/src/flash/nor/esp_flash.c +++ b/src/flash/nor/esp_flash.c @@ -72,6 +72,7 @@ #define ESP_FLASH_RW_TMO 20000 /* ms */ #define ESP_FLASH_ERASE_TMO 60000 /* ms */ +#define ESP_FLASH_VERIFY_TMO 30000 /* ms */ #define ESP_FLASH_MAPS_MAX 2 struct esp_flash_rw_args { @@ -1358,6 +1359,7 @@ static int esp_algo_flash_calc_hash(struct flash_bank *bank, uint8_t *hash, PARAM_IN); run.mem_args.params = ∓ run.mem_args.count = 1; + run.timeout_ms = ESP_FLASH_VERIFY_TMO; struct duration bench; duration_start(&bench); diff --git a/testing/esp/test_flasher.py b/testing/esp/test_flasher.py index 727592ddc9..a8d644b4ac 100644 --- a/testing/esp/test_flasher.py +++ b/testing/esp/test_flasher.py @@ -67,7 +67,7 @@ def test_big_binary(self): 4) Read written data to another file. 5) Compare files. """ - self.program_big_binary('encrypt' if self.ENCRYPTED else '', size=self.flash_sz) + self.program_big_binary('encrypt verify' if self.ENCRYPTED else 'verify', size=self.flash_sz) # restore flash contents with test app as it was overwritten by test # what can lead to the failures when preparing for the next tests self.gdb.target_program_bins(self.test_app_cfg.build_bins_dir())