mirror of https://github.com/ARMmbed/mbed-os.git
Fix glitch when initializing NRF51-DK serial port
When initializing the NRF51's serial TX and RTS pins set the data output register to high before setting the setting them to output. This prevents these pins from glitching low before the UART has been turned on.pull/1472/head
parent
09970394da
commit
5c75dc29ee
|
@ -58,6 +58,8 @@ void serial_init(serial_t *obj, PinName tx, PinName rx) {
|
||||||
obj->uart = (NRF_UART_Type *)uart;
|
obj->uart = (NRF_UART_Type *)uart;
|
||||||
|
|
||||||
//pin configurations --
|
//pin configurations --
|
||||||
|
NRF_GPIO->OUT |= (1 << tx);
|
||||||
|
NRF_GPIO->OUT |= (1 << RTS_PIN_NUMBER);
|
||||||
NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER);
|
NRF_GPIO->DIR |= (1 << tx); //TX_PIN_NUMBER);
|
||||||
NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
|
NRF_GPIO->DIR |= (1 << RTS_PIN_NUMBER);
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue