Set peripheral mode for the correct UART TX/RX pins
This commit is contained in:
parent
1698c439c5
commit
e4a454b284
|
@ -125,8 +125,9 @@ uart_init(void)
|
||||||
ioc_set_sel(UART_TX_PORT, UART_TX_PIN, IOC_PXX_SEL_UART_TXD);
|
ioc_set_sel(UART_TX_PORT, UART_TX_PIN, IOC_PXX_SEL_UART_TXD);
|
||||||
ioc_set_over(UART_TX_PORT, UART_TX_PIN, IOC_OVERRIDE_OE);
|
ioc_set_over(UART_TX_PORT, UART_TX_PIN, IOC_OVERRIDE_OE);
|
||||||
|
|
||||||
/* Set PA[1:0] to peripheral mode */
|
/* Set RX and TX pins to peripheral mode */
|
||||||
REG(GPIO_A_BASE | GPIO_AFSEL) |= (0x00000002 | 0x00000001);
|
GPIO_PERIPHERAL_CONTROL(GPIO_PORT_TO_BASE(UART_TX_PORT), GPIO_PIN_MASK(UART_TX_PIN));
|
||||||
|
GPIO_PERIPHERAL_CONTROL(GPIO_PORT_TO_BASE(UART_RX_PORT), GPIO_PIN_MASK(UART_RX_PIN));
|
||||||
|
|
||||||
/*
|
/*
|
||||||
* UART Interrupt Masks:
|
* UART Interrupt Masks:
|
||||||
|
|
Loading…
Reference in a new issue