diff --git a/ChangeLog b/ChangeLog index db7917a23d..32da72a42e 100644 --- a/ChangeLog +++ b/ChangeLog @@ -4484,3 +4484,6 @@ sleep mode (2013-03-31). * arch/arm/src/stm32: Add architecure support for the STM32 F427/F437 chips. Contributed by Mike Smith (2014-4-01). + * configs/zkit-arm-1769/src/up_can.c: Add support for both CAN1 + and CAN2. Contributed by M.Kannan (2014-4-01). + diff --git a/Documentation/NuttX.html b/Documentation/NuttX.html index d7b797e83a..6ba0c95a00 100644 --- a/Documentation/NuttX.html +++ b/Documentation/NuttX.html @@ -8,7 +8,7 @@
Last Updated: March 15, 2013
+Last Updated: April 1, 2013
+ STMicro STM32 F427/437. + General architectural support was provided for the F427/437 family in NuttX 4.27. + Specific support includes the STM32F427I, STM32F427Z, and STM32F427V chips. + This is architecture-only support, meaning that support for the boards with these chips is available, but not support for any publically available boards is included.. + This support was contributed by Mike Smith. +
++ The F427/f37 port adds (1) additional SPI ports, (2) additional UART ports, (3) analog and digital noise filters on the I2C ports, (4) up to 2MB of flash, (5) an additional lower-power mode for the internal voltage regulator, (6) a new prescaling option for timer clock, (7) a larger FSMSC write FIFO, and (8) additional crypto modes (F437 only). +
+
*
- * Based on configs/olimex-lpc1766stk/src/up_can.c
+ * Based on configs/olimex-lpc1766stk/src/up_can.c
*
* Copyright (C) 2012 Gregory Nutt. All rights reserved.
* Author: Gregory Nutt
@@ -63,21 +63,9 @@
* Pre-processor Definitions
************************************************************************************/
/* Configuration ********************************************************************/
+#define CAN_PORT1 1
+#define CAN_PORT2 2
-#if defined(CONFIG_LPC17_CAN1) && defined(CONFIG_LPC17_CAN2)
-# warning "Both CAN1 and CAN2 are enabled. Assuming only CAN1."
-# undef CONFIG_LPC17_CAN2
-#endif
-
-#ifdef CONFIG_LPC17_CAN2
-# warning "CAN2 is not connected on the ZKIT-ARM-1769"
-#endif
-
-#ifdef CONFIG_LPC17_CAN1
-# define CAN_PORT 1
-#else
-# define CAN_PORT 2
-#endif
/* Debug ***************************************************************************/
/* Non-standard debug that may be enabled just for testing CAN */
@@ -121,23 +109,45 @@ int can_devinit(void)
if (!initialized)
{
- /* Call lpc17_caninitialize() to get an instance of the CAN interface */
+#ifdef CONFIG_LPC17_CAN1
+ /* Call lpc17_caninitialize() to get an instance of the CAN1 interface */
- can = lpc17_caninitialize(CAN_PORT);
+ can = lpc17_caninitialize(CAN_PORT1);
if (can == NULL)
{
- candbg("ERROR: Failed to get CAN interface\n");
+ candbg("ERROR: Failed to get CAN1 interface\n");
return -ENODEV;
}
- /* Register the CAN driver at "/dev/can0" */
+ /* Register the CAN1 driver at "/dev/can0" */
ret = can_register("/dev/can0", can);
if (ret < 0)
{
- candbg("ERROR: can_register failed: %d\n", ret);
+ candbg("ERROR: CAN1 register failed: %d\n", ret);
return ret;
}
+#endif
+
+#ifdef CONFIG_LPC17_CAN2
+ /* Call lpc17_caninitialize() to get an instance of the CAN2 interface */
+
+ can = lpc17_caninitialize(CAN_PORT2);
+ if (can == NULL)
+ {
+ candbg("ERROR: Failed to get CAN2 interface\n");
+ return -ENODEV;
+ }
+
+ /* Register the CAN2 driver at "/dev/can1" */
+
+ ret = can_register("/dev/can1", can);
+ if (ret < 0)
+ {
+ candbg("ERROR: CAN2 register failed: %d\n", ret);
+ return ret;
+ }
+#endif
/* Now we are initialized */