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
This commit is contained in:
patacongo 2012-01-03 01:03:56 +00:00
parent 96d2702826
commit 272c35b00e
5 changed files with 49 additions and 2 deletions

View File

@ -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

View File

@ -55,3 +55,8 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
CONFIGURED_APPS += examples/buttons
endif
ifeq ($(CONFIG_CAN),y)
CONFIGURED_APPS += examples/can
endif

View File

@ -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
@ -624,6 +626,28 @@ CONFIG_NET_BROADCAST=n
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
#

View File

@ -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))

View File

@ -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) */