Skip to content

Commit 9c9b996

Browse files
agattidpgeorge
authored andcommitted
tests/target_wiring: Provide an ESP8266 target wiring module.
This commit introduces ESP8266 support for target wiring tests, fixing execution of relevant tests that once failed on that platform. ESP8266 boards need to have GPIO4 and GPIO5 connected together to provide a UART loopback, in order to test whether UART data effectively flows through. The wiring-enabled UART transmission timing test was also updated with measurements compatible with a few ESP8266 test boards. Signed-off-by: Alessandro Gatti <a.gatti@frob.it>
1 parent dbf59db commit 9c9b996

File tree

2 files changed

+9
-0
lines changed

2 files changed

+9
-0
lines changed

tests/extmod/machine_uart_tx.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,8 @@
1919
bit_margin = 1
2020
elif "esp32" in sys.platform:
2121
timing_margin_us = 400
22+
elif "esp8266" in sys.platform:
23+
timing_margin_us = 4100
2224
elif "mimxrt" in sys.platform:
2325
initial_delay_ms = 20 # UART sends idle frame after init, so wait for that
2426
bit_margin = 1

tests/target_wiring/esp8266.py

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
# Target wiring for general esp8266 board.
2+
#
3+
# Connect:
4+
# - GPIO4 to GPIO5
5+
6+
uart_loopback_args = (1,)
7+
uart_loopback_kwargs = {}

0 commit comments

Comments
 (0)