diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html
index 2d7c341f341..5e2fbbdaadc 100644
--- a/Documentation/NuttX.html
+++ b/Documentation/NuttX.html
@@ -8,7 +8,7 @@
NuttX RTOS
- Last Updated: October 24, 2009
+ Last Updated: October 28, 2009
|
@@ -1577,6 +1577,10 @@ nuttx-0.4.13 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
context switches and background/user context switches. This change should
improve the performance of those background/user context switches by a factor
of about two.
+ * arch/arm/src/stm32/ - fix several typos in the serial logic. It turns out
+ that these typose don't make any difference as long as you use only one
+ serial port and all uarts are configured the same. But the typos are bugs
+ waiting to happen in any other configuration.
pascal-0.1.3 2009-xx-xx Gregory Nutt <spudmonkey@racsa.co.cr>
diff --git a/arch/arm/src/stm32/stm32_lowputc.c b/arch/arm/src/stm32/stm32_lowputc.c
index 05e9d412e28..e2ead3772ce 100644
--- a/arch/arm/src/stm32/stm32_lowputc.c
+++ b/arch/arm/src/stm32/stm32_lowputc.c
@@ -95,27 +95,27 @@
# define STM32_CONSOLE_PARITY CONFIG_USART2_PARITY
# define STM32_CONSOLE_2STOP CONFIG_USART2_2STOP
#elif defined(CONFIG_USART3_SERIAL_CONSOLE)
-# define STM32_CONSOLE_BASE STM32_USART2_BASE
+# define STM32_CONSOLE_BASE STM32_USART3_BASE
# define STM32_APBCLOCK STM32_PCLK1_FREQUENCY
-# define STM32_CONSOLE_BAUD CONFIG_USART2_BAUD
-# define STM32_CONSOLE_BITS CONFIG_USART2_BITS
-# define STM32_CONSOLE_PARITY CONFIG_USART2_PARITY
-# define STM32_CONSOLE_2STOP CONFIG_USART2_2STOP
+# define STM32_CONSOLE_BAUD CONFIG_USART3_BAUD
+# define STM32_CONSOLE_BITS CONFIG_USART3_BITS
+# define STM32_CONSOLE_PARITY CONFIG_USART3_PARITY
+# define STM32_CONSOLE_2STOP CONFIG_USART3_2STOP
#else
# error "No CONFIG_USARTn_SERIAL_CONSOLE Setting"
#endif
/* CR1 settings */
-#if CONFIG_USART2_BITS == 9
+#if STM32_CONSOLE_BITS == 9
# define USART_CR1_M_VALUE USART_CR1_M
#else
# define USART_CR1_M_VALUE 0
#endif
-#if CONFIG_USART2_PARITY == 1
+#if STM32_CONSOLE_PARITY == 1
# define USART_CR1_PARITY_VALUE (USART_CR1_PCE|USART_CR1_PS)
-#elif CONFIG_USART2_PARITY == 2
+#elif STM32_CONSOLE_PARITY == 2
# define USART_CR1_PARITY_VALUE USART_CR1_PCE
#else
# define USART_CR1_PARITY_VALUE 0
@@ -126,7 +126,7 @@
/* CR2 settings */
-#if CONFIG_USART2_2STOP != 0
+#if STM32_CONSOLE_2STOP != 0
# define USART_CR2_STOP2_VALUE USART_CR2_STOP2
#else
# define USART_CR2_STOP2_VALUE 0
diff --git a/arch/arm/src/stm32/stm32_serial.c b/arch/arm/src/stm32/stm32_serial.c
index 5d946c7c819..a702b1b5c56 100644
--- a/arch/arm/src/stm32/stm32_serial.c
+++ b/arch/arm/src/stm32/stm32_serial.c
@@ -81,7 +81,7 @@
# define HAVE_CONSOLE 1
#elif defined(CONFIG_USART3_SERIAL_CONSOLE) && defined(CONFIG_STM32_USART3)
# undef CONFIG_USART1_SERIAL_CONSOLE
-# undef CONFIG_USART3_SERIAL_CONSOLE
+# undef CONFIG_USART2_SERIAL_CONSOLE
# define HAVE_CONSOLE 1
#else
# warning "No valid CONFIG_USARTn_SERIAL_CONSOLE Setting"
@@ -508,7 +508,7 @@ static int up_setup(struct uart_dev_s *dev)
fraction = (usartdiv32 - (mantissa << 5) + 1) >> 1;
brr |= fraction << USART_BRR_FRAC_SHIFT;
- up_serialout(priv, STM32_USART1_BRR, brr);
+ up_serialout(priv, STM32_USART_BRR_OFFSET, brr);
/* Enable Rx, Tx, and the USART */