kopia lustrzana https://github.com/espressif/esp-idf
Merge branch 'bugfix/sdcard_example_format_timeout_v4.4' into 'master'
CI: [Examples/Storage] provide sufficient timeout for SD card formatting (v4.4) Closes IDF-3741 See merge request espressif/esp-idf!14886pull/7497/head
commit
0bcde21c72
|
@ -71,6 +71,7 @@ void app_main(void)
|
||||||
// connected on the bus. This is for debug / example purpose only.
|
// connected on the bus. This is for debug / example purpose only.
|
||||||
slot_config.flags |= SDMMC_SLOT_FLAG_INTERNAL_PULLUP;
|
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);
|
ret = esp_vfs_fat_sdmmc_mount(mount_point, &host, &slot_config, &mount_config, &card);
|
||||||
|
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
|
@ -83,6 +84,7 @@ void app_main(void)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ESP_LOGI(TAG, "Filesystem mounted");
|
||||||
|
|
||||||
// Card has been initialized, print its properties
|
// Card has been initialized, print its properties
|
||||||
sdmmc_card_print_info(stdout, card);
|
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: Initializing SD card', timeout=20)
|
||||||
dut.expect('example: Using SDMMC peripheral', timeout=10)
|
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
|
# These lines are matched separately because of ASCII color codes in the output
|
||||||
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=10)[0]
|
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=10)[0]
|
||||||
_type = dut.expect(re.compile(r'Type: (\S+)'), 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.gpio_cs = PIN_NUM_CS;
|
||||||
slot_config.host_id = host.slot;
|
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);
|
ret = esp_vfs_fat_sdspi_mount(mount_point, &host, &slot_config, &mount_config, &card);
|
||||||
|
|
||||||
if (ret != ESP_OK) {
|
if (ret != ESP_OK) {
|
||||||
|
@ -100,6 +101,7 @@ void app_main(void)
|
||||||
}
|
}
|
||||||
return;
|
return;
|
||||||
}
|
}
|
||||||
|
ESP_LOGI(TAG, "Filesystem mounted");
|
||||||
|
|
||||||
// Card has been initialized, print its properties
|
// Card has been initialized, print its properties
|
||||||
sdmmc_card_print_info(stdout, card);
|
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: Initializing SD card', timeout=20)
|
||||||
dut.expect('example: Using SPI peripheral', 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
|
# These lines are matched separately because of ASCII color codes in the output
|
||||||
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=20)[0]
|
name = dut.expect(re.compile(r'Name: (\w+)'), timeout=20)[0]
|
||||||
_type = dut.expect(re.compile(r'Type: (\S+)'), timeout=20)[0]
|
_type = dut.expect(re.compile(r'Type: (\S+)'), timeout=20)[0]
|
||||||
|
|
Ładowanie…
Reference in New Issue