diff --git a/ports/stm32/uart.c b/ports/stm32/uart.c index a2b69967b6e4..9f74416170f8 100644 --- a/ports/stm32/uart.c +++ b/ports/stm32/uart.c @@ -474,10 +474,11 @@ bool uart_init(pyb_uart_obj_t *uart_obj, } uint32_t mode = MP_HAL_PIN_MODE_ALT; - uint32_t pull = MP_HAL_PIN_PULL_UP; for (uint i = 0; i < 4; i++) { if (pins[i] != NULL) { + // Configure pull-up on RX and CTS (the input pins). + uint32_t pull = (i & 1) ? MP_HAL_PIN_PULL_UP : MP_HAL_PIN_PULL_NONE; bool ret = mp_hal_pin_config_alt(pins[i], mode, pull, uart_fn, uart_unit); if (!ret) { return false;