Fix a few more EFM32 integration bugs

This commit is contained in:
Gregory Nutt
2014-10-28 19:02:21 -06:00
parent 761059aee2
commit 8a17a264ff
3 changed files with 19 additions and 14 deletions
+1 -2
View File
@@ -161,7 +161,7 @@ static void efm32_uart_setbaud(uintptr_t base, uint32_t baud)
* baud = 2400.0 * baud = 2400.0
*/ */
maxover = ((BOARD_HFPERCLK_FREQUENCY << 8) / 280) / baud; maxover = (((uint64_t)BOARD_HFPERCLK_FREQUENCY << 8) / 280) / baud;
if (maxover >= 16) if (maxover >= 16)
{ {
DEBUGASSERT(baud <= (BOARD_HFPERCLK_FREQUENCY / 16)); DEBUGASSERT(baud <= (BOARD_HFPERCLK_FREQUENCY / 16));
@@ -612,7 +612,6 @@ void efm32_uartconfigure(uintptr_t base, uint32_t baud, unsigned int parity,
case 2: case 2:
regval |= USART_FRAME_PARITY_EVEN; regval |= USART_FRAME_PARITY_EVEN;
break; break;
} }
/* Configure stop bits */ /* Configure stop bits */
+10 -10
View File
@@ -100,7 +100,7 @@
#elif defined(CONFIG_UART0_SERIAL_CONSOLE) #elif defined(CONFIG_UART0_SERIAL_CONSOLE)
# define CONSOLE_DEV g_uart0port /* UART0 is console */ # define CONSOLE_DEV g_uart0port /* UART0 is console */
# define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */ # define TTYS0_DEV g_uart0port /* UART0 is ttyS0 */
# define UART1_ASSIGNED 1 # define UART0_ASSIGNED 1
#elif defined(CONFIG_UART1_SERIAL_CONSOLE) #elif defined(CONFIG_UART1_SERIAL_CONSOLE)
# define CONSOLE_DEV g_uart1port /* UART1 is console */ # define CONSOLE_DEV g_uart1port /* UART1 is console */
# define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */ # define TTYS0_DEV g_uart1port /* UART1 is ttyS0 */
@@ -359,15 +359,15 @@ static struct uart_dev_s g_usart0port =
.recv = .recv =
{ {
.size = CONFIG_USART0_RXBUFSIZE, .size = CONFIG_USART0_RXBUFSIZE,
.buffer = g_uart0rxbuffer, .buffer = g_usart0rxbuffer,
}, },
.xmit = .xmit =
{ {
.size = CONFIG_USART0_TXBUFSIZE, .size = CONFIG_USART0_TXBUFSIZE,
.buffer = g_uart0txbuffer, .buffer = g_usart0txbuffer,
}, },
.ops = &g_uart_ops, .ops = &g_uart_ops,
.priv = &g_uart0priv, .priv = &g_usart0priv,
}; };
#endif #endif
@@ -397,15 +397,15 @@ static struct uart_dev_s g_usart1port =
.recv = .recv =
{ {
.size = CONFIG_USART1_RXBUFSIZE, .size = CONFIG_USART1_RXBUFSIZE,
.buffer = g_uart1rxbuffer, .buffer = g_usart1rxbuffer,
}, },
.xmit = .xmit =
{ {
.size = CONFIG_USART1_TXBUFSIZE, .size = CONFIG_USART1_TXBUFSIZE,
.buffer = g_uart1txbuffer, .buffer = g_usart1txbuffer,
}, },
.ops = &g_uart_ops, .ops = &g_uart_ops,
.priv = &g_uart1priv, .priv = &g_usart1priv,
}; };
#endif #endif
@@ -435,15 +435,15 @@ static struct uart_dev_s g_usart2port =
.recv = .recv =
{ {
.size = CONFIG_USART2_RXBUFSIZE, .size = CONFIG_USART2_RXBUFSIZE,
.buffer = g_uart2rxbuffer, .buffer = g_usart2rxbuffer,
}, },
.xmit = .xmit =
{ {
.size = CONFIG_USART2_TXBUFSIZE, .size = CONFIG_USART2_TXBUFSIZE,
.buffer = g_uart2txbuffer, .buffer = g_usart2txbuffer,
}, },
.ops = &g_uart_ops, .ops = &g_uart_ops,
.priv = &g_uart2priv, .priv = &g_usart2priv,
}; };
#endif #endif
+8 -2
View File
@@ -28,8 +28,14 @@ CONTENTS
STATUS STATUS
====== ======
Testing has just begun. So the status is code-complete but only 2014-10-28. Testing is still in progress. At this point all basic boot
partially tested. operations are successful: The LEDs work and the application tasks appear
to be successfully started. LED2 is on and LED0 is glowing (meaning that
interrupts are being processed). However, I get no output on PE0. Data
appears to be sent (at least by efm32_lowputc()). However, no signal
activity is present on PE0.
I am, of course, thinking that this is a pin configuration issue.
LEDs LEDs
==== ====