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:
parent
16b9d42729
commit
46fc72d1cb
@ -2328,4 +2328,9 @@
|
||||
loopback mode on the STM3240G-EVAL board.
|
||||
* configs/stm3240g-eval/src/up_adc.c: Complete coding of ADC support for the
|
||||
potentiometer on board the STM3240G-EVAL.
|
||||
* arch/arm/src/lpc17_can.c: Several CAN driver improvements. Adds support for
|
||||
testing in loopback mode. now uses all three transmit buffers for better
|
||||
performance.
|
||||
* confgs/olimex-lpc1766stk/nsh: Now supports the CAN loopback test as an
|
||||
optional "built-in" application.
|
||||
|
||||
|
File diff suppressed because it is too large
Load Diff
File diff suppressed because it is too large
Load Diff
@ -708,7 +708,7 @@ static int can_ioctl(FAR struct can_dev_s *dev, int cmd, unsigned long arg)
|
||||
*
|
||||
****************************************************************************/
|
||||
|
||||
static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
|
||||
static int can_remoterequest(FAR struct can_dev_s *dev, uint16_t id)
|
||||
{
|
||||
#warning "Remote request not implemented"
|
||||
return -ENOSYS;
|
||||
@ -918,7 +918,8 @@ static bool can_txempty(FAR struct can_dev_s *dev)
|
||||
* CAN RX FIFO 0 interrupt handler
|
||||
*
|
||||
* Input Parameters:
|
||||
* dev - An instance of the "upper half" can driver state structure.
|
||||
* irq - The IRQ number of the interrupt.
|
||||
* context - The register state save array at the time of the interrupt.
|
||||
*
|
||||
* Returned Value:
|
||||
* Zero on success; a negated errno on failure
|
||||
|
@ -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
|
||||
|
@ -55,3 +55,8 @@ ifeq ($(CONFIG_ARCH_BUTTONS),y)
|
||||
CONFIGURED_APPS += examples/buttons
|
||||
endif
|
||||
|
||||
ifeq ($(CONFIG_CAN),y)
|
||||
CONFIGURED_APPS += examples/can
|
||||
endif
|
||||
|
||||
|
||||
|
@ -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
|
||||
#
|
||||
|
@ -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))
|
||||
|
||||
|
@ -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) */
|
||||
|
Loading…
Reference in New Issue
Block a user