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

Set peripheral mode for the correct CC2538 UART TX/RX pins
This commit is contained in:
George Oikonomou 2013-10-23 07:10:41 -07:00
commit ce0b2cacac

View file

@ -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: