Skip to content
Snippets Groups Projects
Commit ce0b2cac authored by George Oikonomou's avatar George Oikonomou
Browse files

Merge pull request #365 from g-oikonomou/cc2538-uart-init-fix

Set peripheral mode for the correct CC2538 UART TX/RX pins
parents 4fd529ee e4a454b2
No related branches found
No related tags found
No related merge requests found
......@@ -125,8 +125,9 @@ uart_init(void)
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);
/* Set PA[1:0] to peripheral mode */
REG(GPIO_A_BASE | GPIO_AFSEL) |= (0x00000002 | 0x00000001);
/* Set RX and TX pins to peripheral mode */
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:
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment