diff --git a/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c b/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c index 83b0004dee..461a5b119f 100644 --- a/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c +++ b/libraries/mbed/targets/hal/TARGET_RENESAS/TARGET_RZ_A1H/serial_api.c @@ -235,8 +235,6 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) { b0 SPB2DT - Serial port break data : High-level */ obj->uart->SCSPTR = 0x0003u; // SPB2IO = 1, SPB2DT = 1 - obj->uart->SCSCR = 0x00F0; - /* ---- Line status register (SCLSR) setting ---- b0 ORER - Overrun error detect : clear */ @@ -277,6 +275,10 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) { uart_data[obj->index].sw_rts.pin = NC; uart_data[obj->index].sw_cts.pin = NC; + /* ---- Serial control register (SCSCR) setting ---- */ + /* Setting the TE and RE bits enables the TxD and RxD pins to be used. */ + obj->uart->SCSCR = 0x00F0; + is_stdio_uart = (uart == STDIO_UART) ? (1) : (0); if (is_stdio_uart) {