Merge branch 'fix/fix_p4_sdspi_v5.3' into 'release/v5.3'

sdspi: fix p4 sdspi (v5.3)

See merge request espressif/esp-idf!33189
This commit is contained in:
morris
2024-09-04 11:27:52 +08:00
18 changed files with 140 additions and 58 deletions

View File

@@ -139,9 +139,8 @@ examples/storage/sd_card/sdspi:
disable:
- if: SOC_GPSPI_SUPPORTED != 1
disable_test:
- if: IDF_TARGET not in ["esp32", "esp32c3"]
temporary: true
reason: lack of runners
- if: IDF_TARGET not in ["esp32", "esp32s3", "esp32c3", "esp32p4"]
reason: needs special runner, select few typical targets for testing
examples/storage/semihost_vfs:
depends_components:

View File

@@ -17,35 +17,35 @@ menu "SD SPI Example Configuration"
int "MOSI GPIO number"
default 15 if IDF_TARGET_ESP32
default 35 if IDF_TARGET_ESP32S2
default 35 if IDF_TARGET_ESP32S3
default 4 if IDF_TARGET_ESP32S3
default 5 if IDF_TARGET_ESP32H2
default 11 if IDF_TARGET_ESP32P4
default 36 if IDF_TARGET_ESP32P4
default 4 # C3 and others
config EXAMPLE_PIN_MISO
int "MISO GPIO number"
default 2 if IDF_TARGET_ESP32
default 37 if IDF_TARGET_ESP32S2
default 37 if IDF_TARGET_ESP32S3
default 5 if IDF_TARGET_ESP32S3
default 0 if IDF_TARGET_ESP32H2
default 13 if IDF_TARGET_ESP32P4
default 47 if IDF_TARGET_ESP32P4
default 6 # C3 and others
config EXAMPLE_PIN_CLK
int "CLK GPIO number"
default 14 if IDF_TARGET_ESP32
default 36 if IDF_TARGET_ESP32S2
default 36 if IDF_TARGET_ESP32S3
default 2 if IDF_TARGET_ESP32S3
default 4 if IDF_TARGET_ESP32H2
default 12 if IDF_TARGET_ESP32P4
default 53 if IDF_TARGET_ESP32P4
default 5 # C3 and others
config EXAMPLE_PIN_CS
int "CS GPIO number"
default 13 if IDF_TARGET_ESP32
default 34 if IDF_TARGET_ESP32S2
default 34 if IDF_TARGET_ESP32S3
default 10 if IDF_TARGET_ESP32P4
default 8 if IDF_TARGET_ESP32S3
default 33 if IDF_TARGET_ESP32P4
default 1 # C3 and others
config EXAMPLE_DEBUG_PIN_CONNECTIONS

View File

@@ -1,4 +1,4 @@
# SPDX-FileCopyrightText: 2022-2023 Espressif Systems (Shanghai) CO LTD
# SPDX-FileCopyrightText: 2022-2024 Espressif Systems (Shanghai) CO LTD
# SPDX-License-Identifier: Unlicense OR CC0-1.0
import logging
import re
@@ -8,14 +8,16 @@ from pytest_embedded import Dut
@pytest.mark.esp32
@pytest.mark.esp32c3 # no runner available at the moment
@pytest.mark.esp32s3
@pytest.mark.esp32c3
@pytest.mark.esp32p4
@pytest.mark.sdcard_spimode
def test_examples_sd_card_sdspi(dut: Dut) -> 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)
dut.expect('Filesystem mounted', timeout=180)
# These lines are matched separately because of ASCII color codes in the output
name = dut.expect(re.compile(rb'Name: (\w+)\r'), timeout=20).group(1).decode()
@@ -42,4 +44,4 @@ def test_examples_sd_card_sdspi(dut: Dut) -> None:
dut.expect_exact(msg, timeout=30)
dut.expect(sd_card_format, timeout=180) # Provide enough time for SD card FATFS format operation
for msg in message_list2:
dut.expect_exact(msg, timeout=30)
dut.expect_exact(msg, timeout=180)

View File

@@ -0,0 +1 @@
CONFIG_ESP_CONSOLE_USB_SERIAL_JTAG=y