From f2bc23d03ab0eba3eaa4da2ca98c8dba3a32a16e Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Tue, 11 Mar 2025 21:17:19 -0300 Subject: [PATCH 01/12] fix(uart): ci uart test fail on esp32s2 after uart break --- tests/validation/uart/uart.ino | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index 358276c00b4..e11471c8bc6 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -365,12 +365,13 @@ void change_pins_test(void) { if (TEST_UART_NUM == 1) { UARTTestConfig &config = *uart_test_configs[0]; + // internal loopback causes UART BREAK on ESP32 and ESP32-S2 + // setting it before changing the pins solves it + uart_internal_loopback(config.uart_num, NEW_RX1); config.serial.setPins(NEW_RX1, NEW_TX1); TEST_ASSERT_EQUAL(NEW_RX1, uart_get_RxPin(config.uart_num)); TEST_ASSERT_EQUAL(NEW_TX1, uart_get_TxPin(config.uart_num)); - - uart_internal_loopback(config.uart_num, NEW_RX1); - config.transmit_and_check_msg("using new pins"); + config.transmit_and_check_msg("using new uart#1 pins"); } else { for (int i = 0; i < TEST_UART_NUM; i++) { UARTTestConfig &config = *uart_test_configs[i]; From d3f51ee548dbe308d0f6eb0cd812dd47acf777d3 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Tue, 11 Mar 2025 21:41:30 -0300 Subject: [PATCH 02/12] fix(uart): ci error with change pins test on ESP32 --- tests/validation/uart/uart.ino | 16 +++++++++------- 1 file changed, 9 insertions(+), 7 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index e11471c8bc6..93969744f01 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -365,26 +365,28 @@ void change_pins_test(void) { if (TEST_UART_NUM == 1) { UARTTestConfig &config = *uart_test_configs[0]; - // internal loopback causes UART BREAK on ESP32 and ESP32-S2 + // internal loopback creates a BREAK on ESP32 and ESP32-S2 // setting it before changing the pins solves it - uart_internal_loopback(config.uart_num, NEW_RX1); + uart_internal_loopback(config.uart_num, NEW_RX1); config.serial.setPins(NEW_RX1, NEW_TX1); TEST_ASSERT_EQUAL(NEW_RX1, uart_get_RxPin(config.uart_num)); TEST_ASSERT_EQUAL(NEW_TX1, uart_get_TxPin(config.uart_num)); - config.transmit_and_check_msg("using new uart#1 pins"); + config.transmit_and_check_msg("using new UART#1 pins"); } else { for (int i = 0; i < TEST_UART_NUM; i++) { UARTTestConfig &config = *uart_test_configs[i]; UARTTestConfig &next_uart = *uart_test_configs[(i + 1) % TEST_UART_NUM]; + // internal loopback creates a BREAK on ESP32 and ESP32-S2 + // setting it before changing the pins solves it + uart_internal_loopback(config.uart_num, next_uart.default_rx_pin); config.serial.setPins(next_uart.default_rx_pin, next_uart.default_tx_pin); TEST_ASSERT_EQUAL(uart_get_RxPin(config.uart_num), next_uart.default_rx_pin); TEST_ASSERT_EQUAL(uart_get_TxPin(config.uart_num), next_uart.default_tx_pin); - - uart_internal_loopback(config.uart_num, next_uart.default_rx_pin); - config.transmit_and_check_msg("using new pins"); + String msg = String("using UART#") + config.uart_num + " pins"; + config.transmit_and_check_msg(msg.c_str()); } } - + Serial.println("Change pins test successful"); } From 7e75bba25fcf5400c30002f7c7884844b2bca0ec Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Tue, 11 Mar 2025 22:25:23 -0300 Subject: [PATCH 03/12] fix(uart): ci test with perimgr using esp32 fails --- tests/validation/uart/uart.ino | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index 93969744f01..dcdf29772fa 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -441,7 +441,10 @@ void periman_test(void) { for (auto *ref : uart_test_configs) { UARTTestConfig &config = *ref; - Wire.begin(config.default_rx_pin, config.default_tx_pin); + //Wire.begin(config.default_rx_pin, config.default_tx_pin); + pinMode(config.default_rx_pin, INPUT); + pinMode(config.default_tx_pin, OUTPUT); + config.recv_msg = ""; log_d("Trying to send message using UART%d with I2C enabled", config.uart_num); @@ -450,8 +453,10 @@ void periman_test(void) { log_d("Disabling I2C and re-enabling UART%d", config.uart_num); - config.serial.setPins(config.default_rx_pin, config.default_tx_pin); + // internal loopback creates a BREAK on ESP32 and ESP32-S2 + // setting it before changing the pins solves it uart_internal_loopback(config.uart_num, config.default_rx_pin); + config.serial.setPins(config.default_rx_pin, config.default_tx_pin); log_d("Trying to send message using UART%d with I2C disabled", config.uart_num); config.transmit_and_check_msg("while I2C is disabled"); From e6a0b20480d2d98441b544b534e608020bae2b25 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Tue, 11 Mar 2025 22:48:56 -0300 Subject: [PATCH 04/12] feat(uart): avoid electrical noise before setting pins --- tests/validation/uart/uart.ino | 3 +++ 1 file changed, 3 insertions(+) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index dcdf29772fa..678fb6de378 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -368,6 +368,7 @@ void change_pins_test(void) { // internal loopback creates a BREAK on ESP32 and ESP32-S2 // setting it before changing the pins solves it uart_internal_loopback(config.uart_num, NEW_RX1); + delay(5); // wait for internal circuit to settle config.serial.setPins(NEW_RX1, NEW_TX1); TEST_ASSERT_EQUAL(NEW_RX1, uart_get_RxPin(config.uart_num)); TEST_ASSERT_EQUAL(NEW_TX1, uart_get_TxPin(config.uart_num)); @@ -379,6 +380,7 @@ void change_pins_test(void) { // internal loopback creates a BREAK on ESP32 and ESP32-S2 // setting it before changing the pins solves it uart_internal_loopback(config.uart_num, next_uart.default_rx_pin); + delay(5); // wait for internal circuit to settle config.serial.setPins(next_uart.default_rx_pin, next_uart.default_tx_pin); TEST_ASSERT_EQUAL(uart_get_RxPin(config.uart_num), next_uart.default_rx_pin); TEST_ASSERT_EQUAL(uart_get_TxPin(config.uart_num), next_uart.default_tx_pin); @@ -456,6 +458,7 @@ void periman_test(void) { // internal loopback creates a BREAK on ESP32 and ESP32-S2 // setting it before changing the pins solves it uart_internal_loopback(config.uart_num, config.default_rx_pin); + delay(5); // wait for internal circuit to settle config.serial.setPins(config.default_rx_pin, config.default_tx_pin); log_d("Trying to send message using UART%d with I2C disabled", config.uart_num); From 6be85a3d3bb5a9f427df074808c64846f5ee3281 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Fri, 14 Mar 2025 17:10:56 -0300 Subject: [PATCH 05/12] fix(uart_ci): fixes the UART CI sketch due to IDF 5.3 pull up change --- tests/validation/uart/uart.ino | 153 ++++++++++++++++----------------- 1 file changed, 73 insertions(+), 80 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index 678fb6de378..f028450e159 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -1,9 +1,9 @@ /* UART test - * - * This test is using UART0 (Serial) only for reporting test status and helping with the auto - * baudrate detection test. - * The other serials are used for testing. - */ + + This test is using UART0 (Serial) only for reporting test status and helping with the auto + baudrate detection test. + The other serials are used for testing. +*/ // Default pins: // | Name | ESP32 | S2 | S3 | C3 | C6 | H2 | P4 | @@ -15,18 +15,18 @@ // UART2 TX | TX2 | 25 | -- | 20 | -- | -- | -- | -- | /* - * For each UART: - * - * terminal - * | ^ - * v UART0 | - * RX ^ TX - * | - * report status - * | - * TX <---> RX - * UARTx - */ + For each UART: + + terminal + | ^ + v UART0 | + RX ^ TX + | + report status + | + TX <---> RX + UARTx +*/ #include #include @@ -41,56 +41,58 @@ /* Utility classes */ class UARTTestConfig { -public: - int uart_num; - HardwareSerial &serial; - int peeked_char; - int8_t default_rx_pin; - int8_t default_tx_pin; - String recv_msg; - - UARTTestConfig(int num, HardwareSerial &serial_ref, int8_t rx_pin, int8_t tx_pin) - : uart_num(num), serial(serial_ref), peeked_char(-1), default_rx_pin(rx_pin), default_tx_pin(tx_pin), recv_msg("") {} - - void begin(unsigned long baudrate) { - serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); - while (!serial) { - delay(10); + public: + int uart_num; + HardwareSerial &serial; + int peeked_char; + int8_t default_rx_pin; + int8_t default_tx_pin; + String recv_msg; + + UARTTestConfig(int num, HardwareSerial &serial_ref, int8_t rx_pin, int8_t tx_pin) + : uart_num(num), serial(serial_ref), peeked_char(-1), default_rx_pin(rx_pin), default_tx_pin(tx_pin), recv_msg("") {} + + void begin(unsigned long baudrate) { + // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) + pinMode(default_rx_pin, INPUT_PULLUP); + serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); + while (!serial) { + delay(10); + } } - } - void end() { - serial.end(); - } - - void reset_buffers() { - recv_msg = ""; - peeked_char = -1; - } + void end() { + serial.end(); + } - void transmit_and_check_msg(const String &msg_append, bool perform_assert = true) { - reset_buffers(); - delay(100); - serial.print("Hello from Serial" + String(uart_num) + " " + msg_append); - serial.flush(); - delay(100); - if (perform_assert) { - TEST_ASSERT_EQUAL_STRING(("Hello from Serial" + String(uart_num) + " " + msg_append).c_str(), recv_msg.c_str()); - log_d("UART%d received message: %s\n", uart_num, recv_msg.c_str()); + void reset_buffers() { + recv_msg = ""; + peeked_char = -1; } - } - void onReceive() { - char c; - size_t available = serial.available(); - if (peeked_char == -1) { - peeked_char = serial.peek(); + void transmit_and_check_msg(const String &msg_append, bool perform_assert = true) { + reset_buffers(); + delay(100); + serial.print("Hello from Serial" + String(uart_num) + " " + msg_append); + serial.flush(); + delay(100); + if (perform_assert) { + TEST_ASSERT_EQUAL_STRING(("Hello from Serial" + String(uart_num) + " " + msg_append).c_str(), recv_msg.c_str()); + log_d("UART%d received message: %s\n", uart_num, recv_msg.c_str()); + } } - while (available--) { - c = (char)serial.read(); - recv_msg += c; + + void onReceive() { + char c; + size_t available = serial.available(); + if (peeked_char == -1) { + peeked_char = serial.peek(); + } + while (available--) { + c = (char)serial.read(); + recv_msg += c; + } } - } }; /* Utility global variables */ @@ -365,30 +367,27 @@ void change_pins_test(void) { if (TEST_UART_NUM == 1) { UARTTestConfig &config = *uart_test_configs[0]; - // internal loopback creates a BREAK on ESP32 and ESP32-S2 - // setting it before changing the pins solves it - uart_internal_loopback(config.uart_num, NEW_RX1); - delay(5); // wait for internal circuit to settle + // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) + pinMode(NEW_RX1, INPUT_PULLUP); config.serial.setPins(NEW_RX1, NEW_TX1); TEST_ASSERT_EQUAL(NEW_RX1, uart_get_RxPin(config.uart_num)); TEST_ASSERT_EQUAL(NEW_TX1, uart_get_TxPin(config.uart_num)); - config.transmit_and_check_msg("using new UART#1 pins"); + + uart_internal_loopback(config.uart_num, NEW_RX1); + config.transmit_and_check_msg("using new pins"); } else { for (int i = 0; i < TEST_UART_NUM; i++) { UARTTestConfig &config = *uart_test_configs[i]; UARTTestConfig &next_uart = *uart_test_configs[(i + 1) % TEST_UART_NUM]; - // internal loopback creates a BREAK on ESP32 and ESP32-S2 - // setting it before changing the pins solves it - uart_internal_loopback(config.uart_num, next_uart.default_rx_pin); - delay(5); // wait for internal circuit to settle config.serial.setPins(next_uart.default_rx_pin, next_uart.default_tx_pin); TEST_ASSERT_EQUAL(uart_get_RxPin(config.uart_num), next_uart.default_rx_pin); TEST_ASSERT_EQUAL(uart_get_TxPin(config.uart_num), next_uart.default_tx_pin); - String msg = String("using UART#") + config.uart_num + " pins"; - config.transmit_and_check_msg(msg.c_str()); + + uart_internal_loopback(config.uart_num, next_uart.default_rx_pin); + config.transmit_and_check_msg("using new pins"); } } - + Serial.println("Change pins test successful"); } @@ -443,10 +442,7 @@ void periman_test(void) { for (auto *ref : uart_test_configs) { UARTTestConfig &config = *ref; - //Wire.begin(config.default_rx_pin, config.default_tx_pin); - pinMode(config.default_rx_pin, INPUT); - pinMode(config.default_tx_pin, OUTPUT); - + Wire.begin(config.default_rx_pin, config.default_tx_pin); config.recv_msg = ""; log_d("Trying to send message using UART%d with I2C enabled", config.uart_num); @@ -454,12 +450,9 @@ void periman_test(void) { TEST_ASSERT_EQUAL_STRING("", config.recv_msg.c_str()); log_d("Disabling I2C and re-enabling UART%d", config.uart_num); + config.serial.setPins(config.default_rx_pin, config.default_tx_pin); - // internal loopback creates a BREAK on ESP32 and ESP32-S2 - // setting it before changing the pins solves it uart_internal_loopback(config.uart_num, config.default_rx_pin); - delay(5); // wait for internal circuit to settle - config.serial.setPins(config.default_rx_pin, config.default_tx_pin); log_d("Trying to send message using UART%d with I2C disabled", config.uart_num); config.transmit_and_check_msg("while I2C is disabled"); From 28564eaf6eb8346068a5d406d9d8ca3085226b60 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Fri, 14 Mar 2025 17:18:15 -0300 Subject: [PATCH 06/12] fix(uart_ci): keeping previous formatting and applying changes --- tests/validation/uart/uart.ino | 126 ++++++++++++++++----------------- 1 file changed, 63 insertions(+), 63 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index f028450e159..aa9f1613793 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -1,9 +1,9 @@ /* UART test - - This test is using UART0 (Serial) only for reporting test status and helping with the auto - baudrate detection test. - The other serials are used for testing. -*/ + * + * This test is using UART0 (Serial) only for reporting test status and helping with the auto + * baudrate detection test. + * The other serials are used for testing. + */ // Default pins: // | Name | ESP32 | S2 | S3 | C3 | C6 | H2 | P4 | @@ -15,18 +15,18 @@ // UART2 TX | TX2 | 25 | -- | 20 | -- | -- | -- | -- | /* - For each UART: - - terminal - | ^ - v UART0 | - RX ^ TX - | - report status - | - TX <---> RX - UARTx -*/ + * For each UART: + * + * terminal + * | ^ + * v UART0 | + * RX ^ TX + * | + * report status + * | + * TX <---> RX + * UARTx + */ #include #include @@ -41,58 +41,58 @@ /* Utility classes */ class UARTTestConfig { - public: - int uart_num; - HardwareSerial &serial; - int peeked_char; - int8_t default_rx_pin; - int8_t default_tx_pin; - String recv_msg; - - UARTTestConfig(int num, HardwareSerial &serial_ref, int8_t rx_pin, int8_t tx_pin) - : uart_num(num), serial(serial_ref), peeked_char(-1), default_rx_pin(rx_pin), default_tx_pin(tx_pin), recv_msg("") {} - - void begin(unsigned long baudrate) { - // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) - pinMode(default_rx_pin, INPUT_PULLUP); - serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); - while (!serial) { - delay(10); - } +public: + int uart_num; + HardwareSerial &serial; + int peeked_char; + int8_t default_rx_pin; + int8_t default_tx_pin; + String recv_msg; + + UARTTestConfig(int num, HardwareSerial &serial_ref, int8_t rx_pin, int8_t tx_pin) + : uart_num(num), serial(serial_ref), peeked_char(-1), default_rx_pin(rx_pin), default_tx_pin(tx_pin), recv_msg("") {} + + void begin(unsigned long baudrate) { + // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) + pinMode(default_rx_pin, INPUT_PULLUP); + serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); + while (!serial) { + delay(10); } + } - void end() { - serial.end(); - } + void end() { + serial.end(); + } - void reset_buffers() { - recv_msg = ""; - peeked_char = -1; - } + void reset_buffers() { + recv_msg = ""; + peeked_char = -1; + } - void transmit_and_check_msg(const String &msg_append, bool perform_assert = true) { - reset_buffers(); - delay(100); - serial.print("Hello from Serial" + String(uart_num) + " " + msg_append); - serial.flush(); - delay(100); - if (perform_assert) { - TEST_ASSERT_EQUAL_STRING(("Hello from Serial" + String(uart_num) + " " + msg_append).c_str(), recv_msg.c_str()); - log_d("UART%d received message: %s\n", uart_num, recv_msg.c_str()); - } + void transmit_and_check_msg(const String &msg_append, bool perform_assert = true) { + reset_buffers(); + delay(100); + serial.print("Hello from Serial" + String(uart_num) + " " + msg_append); + serial.flush(); + delay(100); + if (perform_assert) { + TEST_ASSERT_EQUAL_STRING(("Hello from Serial" + String(uart_num) + " " + msg_append).c_str(), recv_msg.c_str()); + log_d("UART%d received message: %s\n", uart_num, recv_msg.c_str()); } + } - void onReceive() { - char c; - size_t available = serial.available(); - if (peeked_char == -1) { - peeked_char = serial.peek(); - } - while (available--) { - c = (char)serial.read(); - recv_msg += c; - } + void onReceive() { + char c; + size_t available = serial.available(); + if (peeked_char == -1) { + peeked_char = serial.peek(); + } + while (available--) { + c = (char)serial.read(); + recv_msg += c; } + } }; /* Utility global variables */ @@ -450,8 +450,8 @@ void periman_test(void) { TEST_ASSERT_EQUAL_STRING("", config.recv_msg.c_str()); log_d("Disabling I2C and re-enabling UART%d", config.uart_num); - config.serial.setPins(config.default_rx_pin, config.default_tx_pin); + config.serial.setPins(config.default_rx_pin, config.default_tx_pin); uart_internal_loopback(config.uart_num, config.default_rx_pin); log_d("Trying to send message using UART%d with I2C disabled", config.uart_num); From 6b2965df0ee9f0d8dd1289110c4deb99a3b36ff3 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Sun, 16 Mar 2025 11:15:32 -0300 Subject: [PATCH 07/12] feat(uart_ci): trick for passing esp32 wokwi ci test Wokwi ESP32 fails with the pinMode() in line 56|58 Real device with Arduino Core 3.1.2 and 3.2 needs it to fix the issue. This patch will skip the pinMode() when compiling with Wokwi and make it pass the CI test case. --- tests/validation/uart/uart.ino | 2 ++ 1 file changed, 2 insertions(+) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index aa9f1613793..87d36d67ebe 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -54,7 +54,9 @@ public: void begin(unsigned long baudrate) { // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) + #ifdef ESP32 // Wokwi won't define it, therefore, it will ignore this line and pass Wokwi ESP32 CI pinMode(default_rx_pin, INPUT_PULLUP); + #endif serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); while (!serial) { delay(10); From 9ea405152ac92b3b4ba79429ad0d194c685bb882 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Sun, 16 Mar 2025 11:41:47 -0300 Subject: [PATCH 08/12] feat(uart_ci): reverting the wokwi patch, once it didn't make any difference --- tests/validation/uart/uart.ino | 2 -- 1 file changed, 2 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index 87d36d67ebe..aa9f1613793 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -54,9 +54,7 @@ public: void begin(unsigned long baudrate) { // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) - #ifdef ESP32 // Wokwi won't define it, therefore, it will ignore this line and pass Wokwi ESP32 CI pinMode(default_rx_pin, INPUT_PULLUP); - #endif serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); while (!serial) { delay(10); From e27dcc3c1d9d108c7c7a9dd2df60e8430e9ce788 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Sun, 16 Mar 2025 23:00:55 -0300 Subject: [PATCH 09/12] fix(wokwi): Change CPU freq to 80 --- tests/validation/uart/diagram.esp32.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/validation/uart/diagram.esp32.json b/tests/validation/uart/diagram.esp32.json index a31c06d8313..e107309a0d3 100644 --- a/tests/validation/uart/diagram.esp32.json +++ b/tests/validation/uart/diagram.esp32.json @@ -6,7 +6,7 @@ { "type": "board-esp32-devkit-c-v4", "id": "esp", - "attrs": { "cpuFrequency": "40" } + "attrs": { "cpuFrequency": "80" } } ], "connections": [ From c8f54f97f032515a448a764ddbd22832a266c3b9 Mon Sep 17 00:00:00 2001 From: Lucas Saavedra Vaz <32426024+lucasssvaz@users.noreply.github.com> Date: Mon, 17 Mar 2025 10:14:12 -0300 Subject: [PATCH 10/12] fix(wokwi): Change CPU freq to 120 --- tests/validation/uart/diagram.esp32.json | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/validation/uart/diagram.esp32.json b/tests/validation/uart/diagram.esp32.json index e107309a0d3..c2fbd952fd0 100644 --- a/tests/validation/uart/diagram.esp32.json +++ b/tests/validation/uart/diagram.esp32.json @@ -6,7 +6,7 @@ { "type": "board-esp32-devkit-c-v4", "id": "esp", - "attrs": { "cpuFrequency": "80" } + "attrs": { "cpuFrequency": "120" } } ], "connections": [ From a304ea17326f6bdbebec1377cf577b6770c656d2 Mon Sep 17 00:00:00 2001 From: "pre-commit-ci-lite[bot]" <117423508+pre-commit-ci-lite[bot]@users.noreply.github.com> Date: Mon, 17 Mar 2025 13:32:26 +0000 Subject: [PATCH 11/12] ci(pre-commit): Apply automatic fixes --- tests/validation/uart/uart.ino | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index aa9f1613793..de2908962d0 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -52,7 +52,7 @@ public: UARTTestConfig(int num, HardwareSerial &serial_ref, int8_t rx_pin, int8_t tx_pin) : uart_num(num), serial(serial_ref), peeked_char(-1), default_rx_pin(rx_pin), default_tx_pin(tx_pin), recv_msg("") {} - void begin(unsigned long baudrate) { + void begin(unsigned long baudrate) { // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) pinMode(default_rx_pin, INPUT_PULLUP); serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); From 293d0bfac07910e89561be35f4574cc36cd62061 Mon Sep 17 00:00:00 2001 From: Sugar Glider Date: Mon, 17 Mar 2025 10:48:08 -0300 Subject: [PATCH 12/12] fix(uart_ci): fixes a couple typos in commentatries --- tests/validation/uart/uart.ino | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/validation/uart/uart.ino b/tests/validation/uart/uart.ino index de2908962d0..794fc9affc2 100644 --- a/tests/validation/uart/uart.ino +++ b/tests/validation/uart/uart.ino @@ -53,7 +53,7 @@ public: : uart_num(num), serial(serial_ref), peeked_char(-1), default_rx_pin(rx_pin), default_tx_pin(tx_pin), recv_msg("") {} void begin(unsigned long baudrate) { - // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) + // pinMode will force enabling the internal pullup resistor (IDF 5.3.2 Change) pinMode(default_rx_pin, INPUT_PULLUP); serial.begin(baudrate, SERIAL_8N1, default_rx_pin, default_tx_pin); while (!serial) { @@ -367,7 +367,7 @@ void change_pins_test(void) { if (TEST_UART_NUM == 1) { UARTTestConfig &config = *uart_test_configs[0]; - // pinMode will force enabing the internal pullup resistor (IDF 5.3.2 Change) + // pinMode will force enabling the internal pullup resistor (IDF 5.3.2 Change) pinMode(NEW_RX1, INPUT_PULLUP); config.serial.setPins(NEW_RX1, NEW_TX1); TEST_ASSERT_EQUAL(NEW_RX1, uart_get_RxPin(config.uart_num));