summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-01-10 15:32:42 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-01-10 15:32:42 -0600
commit4cf3e82f22299c52b74d1330c7a5a38ef2d9ce7f (patch)
tree161eb9c0123650ce3a9985e13163867ce3b06d99 /nuttx
parente1de0b9e18e8224a156a16a9ec43ae4441f11f81 (diff)
downloadnuttx-4cf3e82f22299c52b74d1330c7a5a38ef2d9ce7f.tar.gz
nuttx-4cf3e82f22299c52b74d1330c7a5a38ef2d9ce7f.tar.bz2
nuttx-4cf3e82f22299c52b74d1330c7a5a38ef2d9ce7f.zip
A10: Serial clock is OSC24M. From Alan Carvalho de Assis
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/ChangeLog3
-rw-r--r--nuttx/arch/arm/src/a1x/a1x_lowputc.c9
-rw-r--r--nuttx/arch/arm/src/a1x/a1x_serial.c9
-rw-r--r--nuttx/configs/pcduino-a10/README.txt5
-rw-r--r--nuttx/configs/pcduino-a10/nsh/pcduino-140107.patch13
5 files changed, 15 insertions, 24 deletions
diff --git a/nuttx/ChangeLog b/nuttx/ChangeLog
index dbbd9f7f1..43b14ddb3 100644
--- a/nuttx/ChangeLog
+++ b/nuttx/ChangeLog
@@ -6409,3 +6409,6 @@
the Viewtool LCD module connected to the Viewtool STM32F103
board (2014-1-9).
* libc/strings/lib_stpcpy.c: Add stpcpy() (2014-1-9).
+ * arch/arm/src/a1x/a1x_lowputc.c and a1x_serial.c: Mystery
+ finally solved: The A10 serial clock is the OSC24M clock.
+ Thanks to Alan Carvalho de Assis (2014-1-10)
diff --git a/nuttx/arch/arm/src/a1x/a1x_lowputc.c b/nuttx/arch/arm/src/a1x/a1x_lowputc.c
index 1c10464ba..37bd3bea5 100644
--- a/nuttx/arch/arm/src/a1x/a1x_lowputc.c
+++ b/nuttx/arch/arm/src/a1x/a1x_lowputc.c
@@ -150,10 +150,13 @@
#define CONSOLE_FCR_VALUE (UART_FCR_RT_HALF | UART_FCR_XFIFOR |\
UART_FCR_RFIFOR | UART_FCR_FIFOE)
-/* SCLK is the UART input clock */
+/* SCLK is the UART input clock.
+ *
+ * Through experimentation, it has been found that the serial clock is
+ * OSC24M
+ */
-#define A1X_SCLK 0
-#warning What is the correct value of SCLK
+#define A1X_SCLK 24000000
/* The output baud rate is equal to the serial clock (SCLK) frequency divided
* by sixteen times the value of the baud rate divisor, as follows:
diff --git a/nuttx/arch/arm/src/a1x/a1x_serial.c b/nuttx/arch/arm/src/a1x/a1x_serial.c
index e23a39e6c..924534082 100644
--- a/nuttx/arch/arm/src/a1x/a1x_serial.c
+++ b/nuttx/arch/arm/src/a1x/a1x_serial.c
@@ -77,10 +77,13 @@
#if defined(USE_SERIALDRIVER) && defined(HAVE_UART_DEVICE)
-/* SCLK is the UART input clock */
+/* SCLK is the UART input clock.
+ *
+ * Through experimentation, it has been found that the serial clock is
+ * OSC24M
+ */
-#define A1X_SCLK 0
-#warning What is the correct value of SCLK
+#define A1X_SCLK 24000000
/****************************************************************************
* Private Types
diff --git a/nuttx/configs/pcduino-a10/README.txt b/nuttx/configs/pcduino-a10/README.txt
index 079994292..9515d49ef 100644
--- a/nuttx/configs/pcduino-a10/README.txt
+++ b/nuttx/configs/pcduino-a10/README.txt
@@ -404,8 +404,3 @@ Configurations
the pcDuino, we are executing out of SDRAM so when the TLBs for the SDRAM
region are invalidated that cause a crash. That has not been proven,
however.
-
- d) nuttx/arch/arm/src/common/up_internal.h: One of the values need for UART
- baud calculation is missing (the frequency of SCLK, the UART input clock).
- As a result, UART configuration is currently suppressed by a setting in
- this file.
diff --git a/nuttx/configs/pcduino-a10/nsh/pcduino-140107.patch b/nuttx/configs/pcduino-a10/nsh/pcduino-140107.patch
index 470bf0917..b5df28eb8 100644
--- a/nuttx/configs/pcduino-a10/nsh/pcduino-140107.patch
+++ b/nuttx/configs/pcduino-a10/nsh/pcduino-140107.patch
@@ -91,16 +91,3 @@ index f82490c..5c16e48 100644
}
#endif
-diff --git a/nuttx/arch/arm/src/common/up_internal.h b/nuttx/arch/arm/src/common/up_internal.h
-index eb3ca89..8310d8a 100644
---- a/nuttx/arch/arm/src/common/up_internal.h
-+++ b/nuttx/arch/arm/src/common/up_internal.h
-@@ -60,7 +60,7 @@
- #undef CONFIG_SUPPRESS_INTERRUPTS /* DEFINED: Do not enable interrupts */
- #undef CONFIG_SUPPRESS_TIMER_INTS /* DEFINED: No timer */
- #undef CONFIG_SUPPRESS_SERIAL_INTS /* DEFINED: Console will poll */
--#undef CONFIG_SUPPRESS_UART_CONFIG /* DEFINED: Do not reconfig UART */
-+#define CONFIG_SUPPRESS_UART_CONFIG 1 /* DEFINED: Do not reconfig UART */
- #undef CONFIG_DUMP_ON_EXIT /* DEFINED: Dump task state on exit */
-
- /* Determine which (if any) console driver to use. If a console is enabled