Skip to content

Commit 12b02b9

Browse files
committed
Merge pull request #1472 from c1728p9/nrf51_uart_glitch
Fix glitch when initializing NRF51-DK serial port
2 parents 0997039 + 5c75dc2 commit 12b02b9

File tree

1 file changed

+2
-0
lines changed
  • libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822

1 file changed

+2
-0
lines changed

libraries/mbed/targets/hal/TARGET_NORDIC/TARGET_MCU_NRF51822/serial_api.c

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,8 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
5858
obj->uart = (NRF_UART_Type *)uart;
5959

6060
//pin configurations --
61+
NRF_GPIO->OUT |= (1 << tx);
62+
NRF_GPIO->OUT |= (1 << RTS_PIN_NUMBER);
6163
NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER);
6264
NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
6365

0 commit comments

Comments
 (0)