Skip to content

Commit

Permalink
flash/esp: increase calc hash algorithm timeout
Browse files Browse the repository at this point in the history
  • Loading branch information
erhankur committed Oct 24, 2024
1 parent 3fd7030 commit c467ac1
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 1 deletion.
2 changes: 2 additions & 0 deletions src/flash/nor/esp_flash.c
Original file line number Diff line number Diff line change
Expand Up @@ -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 {
Expand Down Expand Up @@ -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);
Expand Down
2 changes: 1 addition & 1 deletion testing/esp/test_flasher.py
Original file line number Diff line number Diff line change
Expand Up @@ -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())
Expand Down

0 comments on commit c467ac1

Please sign in to comment.