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:
commit
ce0b2cacac
@ -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:
|
||||
|
Loading…
Reference in New Issue
Block a user