From 9ffd462a28f303ab2567e47f52d0bd9022b0d340 Mon Sep 17 00:00:00 2001 From: Mark Lamb Date: Wed, 9 Sep 2020 20:13:11 +0100 Subject: [PATCH] Support 31250 baud rate --- targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/serial_api.c | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/serial_api.c b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/serial_api.c index 6be6948dc1..7db9639f51 100644 --- a/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/serial_api.c +++ b/targets/TARGET_NORDIC/TARGET_NRF5x/TARGET_NRF52/serial_api.c @@ -1046,8 +1046,10 @@ void serial_baud(serial_t *obj, int baudrate) new_rate = NRF_UARTE_BAUDRATE_14400; } else if (baudrate < 28800) { new_rate = NRF_UARTE_BAUDRATE_19200; - } else if (baudrate < 38400) { + } else if (baudrate < 31250) { new_rate = NRF_UARTE_BAUDRATE_28800; + } else if (baudrate < 38400) { + new_rate = NRF_UARTE_BAUDRATE_31250; } else if (baudrate < 57600) { new_rate = NRF_UARTE_BAUDRATE_38400; } else if (baudrate < 76800) {