summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tests/extmod_hardware/machine_uart_irq_rx.py11
-rw-r--r--tests/extmod_hardware/machine_uart_irq_rxidle.py11
2 files changed, 16 insertions, 6 deletions
diff --git a/tests/extmod_hardware/machine_uart_irq_rx.py b/tests/extmod_hardware/machine_uart_irq_rx.py
index ecc95e62a..3602c260e 100644
--- a/tests/extmod_hardware/machine_uart_irq_rx.py
+++ b/tests/extmod_hardware/machine_uart_irq_rx.py
@@ -24,9 +24,14 @@ elif "esp32" in sys.platform:
tx_pin = 4
rx_pin = 5
elif "pyboard" in sys.platform:
- uart_id = 4
- tx_pin = None # PA0
- rx_pin = None # PA1
+ if "STM32WB" in sys.implementation._machine:
+ # LPUART(1) is on PA2/PA3
+ uart_id = "LP1"
+ else:
+ # UART(4) is on PA0/PA1
+ uart_id = 4
+ tx_pin = None
+ rx_pin = None
elif "samd" in sys.platform and "ItsyBitsy M0" in sys.implementation._machine:
uart_id = 0
tx_pin = "D1"
diff --git a/tests/extmod_hardware/machine_uart_irq_rxidle.py b/tests/extmod_hardware/machine_uart_irq_rxidle.py
index af2412c75..634369150 100644
--- a/tests/extmod_hardware/machine_uart_irq_rxidle.py
+++ b/tests/extmod_hardware/machine_uart_irq_rxidle.py
@@ -26,9 +26,14 @@ elif "mimxrt" in sys.platform:
uart_id = 1
tx_pin = None
elif "pyboard" in sys.platform:
- uart_id = 4
- tx_pin = None # PA0
- rx_pin = None # PA1
+ if "STM32WB" in sys.implementation._machine:
+ # LPUART(1) is on PA2/PA3
+ uart_id = "LP1"
+ else:
+ # UART(4) is on PA0/PA1
+ uart_id = 4
+ tx_pin = None
+ rx_pin = None
elif "renesas-ra" in sys.platform:
uart_id = 9
tx_pin = None # P602 @ RA6M2