From 787d85e0001089eb92f1c3643f29c14b3273b795 Mon Sep 17 00:00:00 2001 From: Jos Verlinde Date: Sun, 9 Nov 2025 00:08:42 +0100 Subject: [PATCH] tests/extmod/machine_i2s_rate.py: Adjust pins when running on ESP32-C3. Changed the pin numbers used for the I2S rate testing as the pin numbers used were incompatible with the limited GPIO pins availalbe on the ESP32-C3, causing the tests to fail. Signed-off-by: Jos Verlinde --- tests/extmod/machine_i2s_rate.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/tests/extmod/machine_i2s_rate.py b/tests/extmod/machine_i2s_rate.py index c8fa11514c..f6de3d8f13 100644 --- a/tests/extmod/machine_i2s_rate.py +++ b/tests/extmod/machine_i2s_rate.py @@ -26,7 +26,11 @@ elif "mimxrt" in sys.platform: (2, Pin("D4"), Pin("D3"), Pin("D2"), None), ) elif "esp32" in sys.platform: - i2s_instances = ((0, Pin(18), Pin(19), Pin(21), Pin(14)),) + try: + i2s_instances = ((0, Pin(18), Pin(19), Pin(21), Pin(14)),) + except ValueError: + # fallback to lower pin number for ESP32-C3 + i2s_instances = ((0, Pin(6), Pin(7), Pin(10), Pin(11)),) # Allow for small additional RTOS overhead MAX_DELTA_MS = 8