summaryrefslogtreecommitdiff
path: root/nuttx/configs
diff options
context:
space:
mode:
authorpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-03 01:03:56 +0000
committerpatacongo <patacongo@42af7a65-404d-4744-a932-0658087f49c3>2012-01-03 01:03:56 +0000
commit7783b262aa5bc4473619f44a963c5bd63f4e5180 (patch)
tree4f493751a6deddb65b92c4eff5cb2abf40822e25 /nuttx/configs
parent227420dd5ecb981092e5db9340c6c7f081afbcf3 (diff)
downloadpx4-nuttx-7783b262aa5bc4473619f44a963c5bd63f4e5180.tar.gz
px4-nuttx-7783b262aa5bc4473619f44a963c5bd63f4e5180.tar.bz2
px4-nuttx-7783b262aa5bc4473619f44a963c5bd63f4e5180.zip
LPC17xx CAN driver now supports all 3 transmit buffers and loopback mode; LCP1766-STK NSH configuration will support the CAN loopback test
git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4253 42af7a65-404d-4744-a932-0658087f49c3
Diffstat (limited to 'nuttx/configs')
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/README.txt14
-rw-r--r--nuttx/configs/olimex-lpc1766stk/nsh/appconfig5
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/nsh/defconfig24
-rwxr-xr-xnuttx/configs/olimex-lpc1766stk/src/Makefile6
-rw-r--r--nuttx/configs/stm3240g-eval/src/up_can.c2
5 files changed, 49 insertions, 2 deletions
diff --git a/nuttx/configs/olimex-lpc1766stk/README.txt b/nuttx/configs/olimex-lpc1766stk/README.txt
index 9edbfc513..4a00f0e36 100755
--- a/nuttx/configs/olimex-lpc1766stk/README.txt
+++ b/nuttx/configs/olimex-lpc1766stk/README.txt
@@ -879,6 +879,20 @@ Where <subdir> is one of the following:
+CONFIG_GPIO_IRQ=y
+CONFIG_ARCH_IRQBUTTONS=y
+ 4. This example supports the CAN loopback test (apps/examples/can) but this
+ must be manually enabled by selecting:
+
+ CONFIG_CAN=y : Enable the generic CAN infrastructure
+ CONFIG_LPC17_CAN1=y : Enable CAN1
+ CONFIG_CAN_LOOPBACK=y : Enable CAN loopback mode
+
+ See also apps/examples/README.txt
+
+ Special CAN-only debug options:
+
+ CONFIG_DEBUG_CAN
+ CONFIG_CAN_REGDEBUG
+
nx:
An example using the NuttX graphics system (NX). This example uses
the Nokia 6100 LCD driver. NOTE: The Nokia 6100 driver does not
diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/appconfig b/nuttx/configs/olimex-lpc1766stk/nsh/appconfig
index a2f7f9f26..e9af6d3b2 100644
--- a/nuttx/configs/olimex-lpc1766stk/nsh/appconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nsh/appconfig
@@ -55,3 +55,8 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CONFIGURED_APPS += examples/buttons
endif
+ifeq ($(CONFIG_CAN),y)
+CONFIGURED_APPS += examples/can
+endif
+
+
diff --git a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
index 404e7c7f3..fb163ef41 100755
--- a/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
+++ b/nuttx/configs/olimex-lpc1766stk/nsh/defconfig
@@ -337,6 +337,8 @@ CONFIG_DEBUG_VERBOSE=n
CONFIG_DEBUG_SYMBOLS=n
CONFIG_DEBUG_NET=n
CONFIG_DEBUG_USB=n
+CONFIG_DEBUG_GPIO=n
+CONFIG_DEBUG_CAN=n
CONFIG_MM_REGIONS=2
CONFIG_ARCH_LOWPUTC=y
CONFIG_RR_INTERVAL=200
@@ -625,6 +627,28 @@ CONFIG_NET_DHCP_LIGHT=n
CONFIG_NET_RESOLV_ENTRIES=4
#
+# CAN device driver settings
+#
+# CONFIG_CAN - Enables CAN support (one or both of CONFIG_LPC17_CAN1 or
+# CONFIG_LPC17_CAN2 must also be defined)
+# CONFIG_CAN_FIFOSIZE - The size of the circular buffer of CAN messages.
+# Default: 8
+# CONFIG_CAN_NPENDINGRTR - The size of the list of pending RTR requests.
+# Default: 4
+# CONFIG_CAN_LOOPBACK - A CAN driver may or may not support a loopback
+# mode for testing. The STM32 CAN driver does support loopback mode.
+# CONFIG_CAN1_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN1 is defined.
+# CONFIG_CAN2_BAUD - CAN1 BAUD rate. Required if CONFIG_LPC17_CAN2 is defined.
+#
+CONFIG_CAN=n
+#CONFIG_CAN_FIFOSIZE
+#CONFIG_CAN_NPENDINGRTR
+CONFIG_CAN_LOOPBACK=n
+CONFIG_CAN_REGDEBUG=n
+CONFIG_CAN1_BAUD=700000
+CONFIG_CAN2_BAUD=700000
+
+#
# USB Device Configuration
#
# CONFIG_USBDEV
diff --git a/nuttx/configs/olimex-lpc1766stk/src/Makefile b/nuttx/configs/olimex-lpc1766stk/src/Makefile
index f006461bc..a2bdab303 100755
--- a/nuttx/configs/olimex-lpc1766stk/src/Makefile
+++ b/nuttx/configs/olimex-lpc1766stk/src/Makefile
@@ -1,7 +1,7 @@
############################################################################
# configs/olimex-lpc1766stk/src/Makefile
#
-# Copyright (C) 2010 Gregory Nutt. All rights reserved.
+# Copyright (C) 2010, 2012 Gregory Nutt. All rights reserved.
# Author: Gregory Nutt <gnutt@nuttx.org>
#
# Redistribution and use in source and binary forms, with or without
@@ -56,6 +56,10 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CSRCS += up_buttons.c
endif
+ifeq ($(CONFIG_CAN),y)
+CSRCS += up_can.c
+endif
+
AOBJS = $(ASRCS:.S=$(OBJEXT))
COBJS = $(CSRCS:.c=$(OBJEXT))
diff --git a/nuttx/configs/stm3240g-eval/src/up_can.c b/nuttx/configs/stm3240g-eval/src/up_can.c
index eafcec0bf..713a5325a 100644
--- a/nuttx/configs/stm3240g-eval/src/up_can.c
+++ b/nuttx/configs/stm3240g-eval/src/up_can.c
@@ -139,4 +139,4 @@ int can_devinit(void)
return OK;
}
-#endif /* CONFIG_STM32_CAN || CONFIG_STM32_CAN2 || CONFIG_STM32_CAN3 */
+#endif /* CONFIG_CAN && (CONFIG_STM32_CAN2 || CONFIG_STM32_CAN3) */