summaryrefslogtreecommitdiff
path: root/nuttx/configs/arduino-due
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2013-10-09 07:35:00 -0600
committerGregory Nutt <gnutt@nuttx.org>2013-10-09 07:35:00 -0600
commit88786e6d5f0192821717a5234180291f4a6fef5c (patch)
tree157ad62e6669728f3c22793499fb59d3c5577fd8 /nuttx/configs/arduino-due
parent889d6d8ceb26b624f4cdfb4207d8e689b1a8f796 (diff)
downloadpx4-nuttx-88786e6d5f0192821717a5234180291f4a6fef5c.tar.gz
px4-nuttx-88786e6d5f0192821717a5234180291f4a6fef5c.tar.bz2
px4-nuttx-88786e6d5f0192821717a5234180291f4a6fef5c.zip
Add option to enable Aduino Due specific logic, like pull-up on UART0 RXD. Suggested by gdi@embedders.org
Diffstat (limited to 'nuttx/configs/arduino-due')
-rw-r--r--nuttx/configs/arduino-due/Kconfig8
-rw-r--r--nuttx/configs/arduino-due/README.txt12
-rw-r--r--nuttx/configs/arduino-due/include/board.h26
3 files changed, 46 insertions, 0 deletions
diff --git a/nuttx/configs/arduino-due/Kconfig b/nuttx/configs/arduino-due/Kconfig
index 5330ae2a4..7fdfd6f36 100644
--- a/nuttx/configs/arduino-due/Kconfig
+++ b/nuttx/configs/arduino-due/Kconfig
@@ -5,6 +5,14 @@
if ARCH_BOARD_ARDUINO_DUE
+config ADRUINO_DUE_REV3
+ bool "Rev 3"
+ default n
+ ---help---
+ This port was performed on the Aduino Due Rev 2 board. Differences
+ with the Arduino Due Rev 3 board have been reported. This selection
+ will enable work arounds specifically for the Rev 3 board.
+
config ARDUINO_ITHEAD_TFT
bool "ITEAD 2.4 inch TFT w/Touch"
default n
diff --git a/nuttx/configs/arduino-due/README.txt b/nuttx/configs/arduino-due/README.txt
index 1fbde5ea3..923db5054 100644
--- a/nuttx/configs/arduino-due/README.txt
+++ b/nuttx/configs/arduino-due/README.txt
@@ -13,6 +13,7 @@ Contents
^^^^^^^^
- PIO Pin Usage
+ - Rev 2 vs. Rev 3
- ITEAD 2.4" TFT with Touch
- Development Environment
- GNU Toolchain Options
@@ -105,6 +106,17 @@ PIO Pin Usage
PD31 N/A5 N/A PE31 N/A N/A PF31 N/A N/A
----- ---------- ---- -------- ----- ------------ ---- ------ ----- ----------- ---- ---------
+Rev 2 vs. Rev 3
+^^^^^^^^^^^^^^^
+
+ This port was performed on the Arduino Due Rev 2 board. NuttX users
+ have reported issues with the serial port on his Aduino Due Rev 3 board.
+ That problem was resolved as by configuring the UART0 RXD with a pull-up
+ (see include/board.h). That fix as well as any others that we may find
+ will be enabled by selecting
+
+ CONFIG_ADRUINO_DUE_REV3=y
+
ITEAD 2.4" TFT with Touch
^^^^^^^^^^^^^^^^^^^^^^^^^
diff --git a/nuttx/configs/arduino-due/include/board.h b/nuttx/configs/arduino-due/include/board.h
index 43d3fe016..b9059131e 100644
--- a/nuttx/configs/arduino-due/include/board.h
+++ b/nuttx/configs/arduino-due/include/board.h
@@ -195,6 +195,32 @@
/* Button definitions ***************************************************************/
/* There are no buttons on the Arduino Due board. */
+/* GPIO pin configurations **********************************************************/
+
+#ifdef CONFIG_ADRUINO_DUE_REV3
+/* This port was performed on the Arduino Due Rev 2 board. A NuttX user reported
+ * issues with the serial port on his Aduino Due Rev 3 board. That problem was
+ * resolved as follows:
+ *
+ * "... The issue was in my hardware. I found the difference between Arduino
+ * Due shematics (revision R2) and actual PCB layout of my Arduino (revision
+ * R3). On a schematics which I download from arduino.cc was shown that 2nd
+ * pin of IC10 is connected to the ground, but on my Arduino the 2nd pin
+ * of IC10 was connected to its 1st pin instead of ground and in my case
+ * IC10 works in open-drain mode, but RX0 pin on SAM3x doesn't have pull-up
+ * and thus TX signal from AtMega16U2 can't reach the SAM3x input pin, on
+ * this pin always '0'.
+ *
+ * "My solution is to enable internal pull-up in SAM3x. ...
+ * Now shell console on UART0 (via USB programming connector) of Arduino Due
+ * Due works as expected."
+ */
+
+# undef GPIO_UART0_RXD
+# define GPIO_UART0_RXD (GPIO_PERIPHA | GPIO_CFG_DEFAULT | GPIO_PORT_PIOA | \
+ GPIO_PIN8 | GPIO_CFG_PULLUP)
+#endif
+
/************************************************************************************
* Public Data
************************************************************************************/