mirror of
https://github.com/espressif/esp-idf.git
synced 2024-10-05 20:47:46 -04:00
Examples/Storage: sufficient timeout for SD formatting
Too short timeouts often cause useless failures on large-capacity SDs (16GB+) Fixed by adding 60 sec timeout on new "Filesystem mounted" checkpoint JIRA IDF-3741
This commit is contained in:
parent
6b9cc71931
commit
a866779070
@ -71,6 +71,7 @@ void app_main(void)
|
||||
// connected on the bus. This is for debug / example purpose only.
|
||||
slot_config.flags |= SDMMC_SLOT_FLAG_INTERNAL_PULLUP;
|
||||
|
||||
ESP_LOGI(TAG, "Mounting filesystem");
|
||||
ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
@ -83,6 +84,7 @@ void app_main(void)
|
||||
}
|
||||
return;
|
||||
}
|
||||
ESP_LOGI(TAG, "Filesystem mounted");
|
||||
|
||||
// Card has been initialized, print its properties
|
||||
sdmmc_card_print_info(stdout, card);
|
||||
|
@ -12,6 +12,9 @@ def test_examples_sd_card(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -
|
||||
dut.expect('example: Initializing SD card', timeout=20)
|
||||
dut.expect('example: Using SDMMC peripheral', timeout=10)
|
||||
|
||||
# Provide enough time for possible SD card formatting
|
||||
dut.expect('Filesystem mounted', timeout=60)
|
||||
|
||||
# These lines are matched separately because of ASCII color codes in the output
|
||||
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=10)[0]
|
||||
_type = dut.expect(re.compile(r'Type: (\S+)'), timeout=10)[0]
|
||||
|
@ -88,6 +88,7 @@ void app_main(void)
|
||||
slot_config.gpio_cs = PIN_NUM_CS;
|
||||
slot_config.host_id = host.slot;
|
||||
|
||||
ESP_LOGI(TAG, "Mounting filesystem");
|
||||
ret = esp_vfs_fat_sdspi_mount(mount_point, &host, &slot_config, &mount_config, &card);
|
||||
|
||||
if (ret != ESP_OK) {
|
||||
@ -100,6 +101,7 @@ void app_main(void)
|
||||
}
|
||||
return;
|
||||
}
|
||||
ESP_LOGI(TAG, "Filesystem mounted");
|
||||
|
||||
// Card has been initialized, print its properties
|
||||
sdmmc_card_print_info(stdout, card);
|
||||
|
@ -12,6 +12,9 @@ def test_examples_sd_card(env, extra_data): # type: (ttfw_idf.Env.Env, None ) -
|
||||
dut.expect('example: Initializing SD card', timeout=20)
|
||||
dut.expect('example: Using SPI peripheral', timeout=20)
|
||||
|
||||
# Provide enough time for possible SD card formatting
|
||||
dut.expect('Filesystem mounted', timeout=60)
|
||||
|
||||
# These lines are matched separately because of ASCII color codes in the output
|
||||
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=20)[0]
|
||||
_type = dut.expect(re.compile(r'Type: (\S+)'), timeout=20)[0]
|
||||
|
Loading…
x
Reference in New Issue
Block a user