summaryrefslogtreecommitdiff
path: root/nuttx
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-17 22:03:50 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-07-17 22:03:50 +0000
commitfda2d496b945cc01afec7f5fedb175ce0dcb0a27 (patch)
tree0e0b353812b19602224c4764f3017ca3d5d9a364 /nuttx
parent942e88ce3a1e8b5a5c58ba5578438b9df5a4b5c4 (diff)
downloadpx4-nuttx-fda2d496b945cc01afec7f5fedb175ce0dcb0a27.tar.gz
px4-nuttx-fda2d496b945cc01afec7f5fedb175ce0dcb0a27.tar.bz2
px4-nuttx-fda2d496b945cc01afec7f5fedb175ce0dcb0a27.zip
Drop SPIFI frequency.. spifi_init no longer reports errors
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4950 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx')
-rw-r--r--nuttx/configs/lpc4330-xplorer/include/board.h28
-rw-r--r--nuttx/configs/lpc4330-xplorer/src/up_nsh.c2
2 files changed, 16 insertions, 14 deletions
diff --git a/nuttx/configs/lpc4330-xplorer/include/board.h b/nuttx/configs/lpc4330-xplorer/include/board.h
index 052c1a97f..d98da7329 100644
--- a/nuttx/configs/lpc4330-xplorer/include/board.h
+++ b/nuttx/configs/lpc4330-xplorer/include/board.h
@@ -157,28 +157,30 @@
* for the selected divider
*/
-#if BOARD_FCLKOUT_FREQUENCY < 120000000
+#undef BOARD_SPIFI_PLL1 /* No division */
+#undef BOARD_SPIFI_DIVA /* Supports division by 1-4 */
+#undef BOARD_SPIFI_DIVB /* Supports division by 1-16 */
+#undef BOARD_SPIFI_DIVC /* Supports division by 1-16 */
+#undef BOARD_SPIFI_DIVD /* Supports division by 1-16 */
+#undef BOARD_SPIFI_DIVE /* Supports division by 1-256 */
+
+#if BOARD_FCLKOUT_FREQUENCY < 20000000
# define BOARD_SPIFI_PLL1 1 /* Use PLL1 directly */
-# undef BOARD_SPIFI_DIVA
#else
-# undef BOARD_SPIFI_PLL1
-# define BOARD_SPIFI_DIVA 1 /* Use IDIVA */
+# define BOARD_SPIFI_DIVB 1 /* Use IDIVB */
#endif
-#undef BOARD_SPIFI_DIVB
-#undef BOARD_SPIFI_DIVC
-#undef BOARD_SPIFI_DIVD
-#undef BOARD_SPIFI_DIVE
-/* We need to configure the divider so that its output is as close to 120MHz
- * without exceeding that value.
+/* We need to configure the divider so that its output is as close to the
+ * desired SCLK value. The peak data transfer rate will be about half of
+ * this frequency in bytes per second.
*/
-#if BOARD_FCLKOUT_FREQUENCY < 120000000
+#if BOARD_FCLKOUT_FREQUENCY < 20000000
# define BOARD_SPIFI_FREQUENCY BOARD_FCLKOUT_FREQUENCY /* 72Mhz? */
#else
-# define BOARD_SPIFI_DIVIDER (2) /* 204MHz / 2 = 102MHz */
-# define BOARD_SPIFI_FREQUENCY (102000000) /* 204MHz / 2 = 102MHz */
+# define BOARD_SPIFI_DIVIDER (14) /* 204MHz / 14 = 14.57MHz */
+# define BOARD_SPIFI_FREQUENCY (102000000) /* 204MHz / 14 = 14.57MHz */
#endif
/* UART clocking ***********************************************************/
diff --git a/nuttx/configs/lpc4330-xplorer/src/up_nsh.c b/nuttx/configs/lpc4330-xplorer/src/up_nsh.c
index 032c133f0..4656a43f8 100644
--- a/nuttx/configs/lpc4330-xplorer/src/up_nsh.c
+++ b/nuttx/configs/lpc4330-xplorer/src/up_nsh.c
@@ -88,7 +88,7 @@
#ifdef CONFIG_SPIFI_BLKDRVR
-# ifndef CONFIG_LPC43_SPIFI=n
+# ifndef CONFIG_LPC43_SPIFI
# error "SPIFI support is not enabled (CONFIG_LPC43_SPIFI)"
# endif