From 6be402c1774076fc7a26baa42e306ca82ef9df64 Mon Sep 17 00:00:00 2001 From: wanckl Date: Mon, 15 Dec 2025 16:58:10 +0800 Subject: [PATCH] fix(driver_spi): fix some master test apps --- .../esp_driver_spi/test_apps/master/main/test_spi_master.c | 2 +- .../esp_driver_spi/test_apps/master/main/test_spi_sio.c | 4 +--- 2 files changed, 2 insertions(+), 4 deletions(-) diff --git a/components/esp_driver_spi/test_apps/master/main/test_spi_master.c b/components/esp_driver_spi/test_apps/master/main/test_spi_master.c index 1fac410229..5ba2d040ab 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_spi_master.c +++ b/components/esp_driver_spi/test_apps/master/main/test_spi_master.c @@ -124,7 +124,7 @@ TEST_CASE("SPI Master clockdiv calculation routines", "[spi]") // Test All clock source #define TEST_CLK_BYTE_LEN 10000 -#define TEST_TRANS_TIME_BIAS_RATIO (float)5.0/100 // think 5% transfer time bias as acceptable +#define TEST_TRANS_TIME_BIAS_RATIO (float)8.0/100 // think 8% transfer time bias as acceptable TEST_CASE("SPI Master clk_source and divider accuracy", "[spi]") { int64_t start = 0, end = 0; diff --git a/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c b/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c index 8df60daa13..c8d9c9cff3 100644 --- a/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c +++ b/components/esp_driver_spi/test_apps/master/main/test_spi_sio.c @@ -140,7 +140,6 @@ TEST_CASE("SPI Single Board Test SIO", "[spi]") } #endif //#if (TEST_SPI_PERIPH_NUM >= 2) -#if !TEMPORARY_DISABLED_FOR_TARGETS(ESP32P4) //IDF-7503 slave support /******************************************************************************** * Test SIO Master * SIO Slave is not supported, and one unit test is limited to one feature, so,,, @@ -271,7 +270,7 @@ void test_sio_slave_emulate(bool sio_master_in) unity_wait_for_signal("Master ready"); for (int i = 0; i < TEST_NUM; i++) { - spi_slave_transaction_t trans = {}; + spi_slave_transaction_t trans = { .flags = SPI_SLAVE_TRANS_DMA_BUFFER_ALIGN_AUTO, }; if (sio_master_in) { // slave output only section trans.length = (i + 1) * 8 * 8; @@ -324,4 +323,3 @@ void test_slave_run(void) } TEST_CASE_MULTIPLE_DEVICES("SPI_Master:Test_SIO_Mode_Multi_Board", "[spi_ms][test_env=generic_multi_device]", test_master_run, test_slave_run); -#endif //p4 slave support