summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGregory Nutt <gnutt@nuttx.org>2014-02-17 14:52:14 -0600
committerGregory Nutt <gnutt@nuttx.org>2014-02-17 14:52:14 -0600
commit4227604c17a8dc26c8b0f679b79945eabb090e9f (patch)
treec190efccdc735e7bafc653c00bf3b84782cda75e
parent11e9d1177f46c11cba6d27da78a5c92368d8e349 (diff)
downloadnuttx-4227604c17a8dc26c8b0f679b79945eabb090e9f.tar.gz
nuttx-4227604c17a8dc26c8b0f679b79945eabb090e9f.tar.bz2
nuttx-4227604c17a8dc26c8b0f679b79945eabb090e9f.zip
SAMD20: Fix some confusion what which pins are on which connectors
-rw-r--r--nuttx/configs/samd20-xplained/Kconfig9
-rw-r--r--nuttx/configs/samd20-xplained/README.txt23
-rw-r--r--nuttx/configs/samd20-xplained/include/board.h8
3 files changed, 29 insertions, 11 deletions
diff --git a/nuttx/configs/samd20-xplained/Kconfig b/nuttx/configs/samd20-xplained/Kconfig
index a5273229e..6e3bbbd0e 100644
--- a/nuttx/configs/samd20-xplained/Kconfig
+++ b/nuttx/configs/samd20-xplained/Kconfig
@@ -63,11 +63,18 @@ config SAMD20_XPLAINED_USART4_EXT1
Select this option if the serial console is on SERCOM4 connected via
EXT1. The RX will be on PB9 and TX signal will be on PB8.
+config SAMD20_XPLAINED_USART4_EXT2
+ bool "EXT2"
+ depends on !SAMD20_XPLAINED_OLED1MODULE_EXT2 && !SAMD20_XPLAINED_IOMODULE_EXT2
+ ---help---
+ Select this option if the serial console is on SERCOM4 connected via
+ EXT2. The RX will be on PB13 and TX signal will be on PB12.
+
config SAMD20_XPLAINED_USART4_EXT3
bool "EXT3"
---help---
Select this option if the serial console is on SERCOM4 connect via
- EXT3. The RX will be on PB13 and TX signal will be on PB12.
+ EXT3. The RX will be on PB11 and TX signal will be on PB10.
endchoice
endif
diff --git a/nuttx/configs/samd20-xplained/README.txt b/nuttx/configs/samd20-xplained/README.txt
index c968c214f..86e7966da 100644
--- a/nuttx/configs/samd20-xplained/README.txt
+++ b/nuttx/configs/samd20-xplained/README.txt
@@ -403,18 +403,23 @@ Serial Consoles
SERCOM4
------
- SERCOM4 is available on connectors EXT1 and EXT3
+ SERCOM4 is available on connectors EXT1, EXT2, and EXT3, but using
+ different PORT pins:
- PIN EXT1 EXT3 GPIO Function
- ---- ---- ---- ------------------
- 13 PB09 PB13 SERCOM4 / USART RX
- 14 PB08 PB12 SERCOM4 / USART TX
- 19 19 GND
- 20 20 VCC
+ PIN EXT1 EXT2 EXT3 GPIO Function
+ ---- ---- ---- ---- ------------------
+ 13 PB09 PB13 PB11 SERCOM4 / USART RX
+ 14 PB08 PB12 PB12 SERCOM4 / USART TX
+ 19 GND GND GND N/A
+ 20 VCC VCC VCC N/A
+
+ There are options available in the NuttX configuration to select which
+ connector SERCOM4 is on: SAMD20_XPLAINED_USART4_EXTn, where n=1, 2, or 3.
If you have a TTL to RS-232 converter then this is the most convenient
- serial console to use. It is the default in all of these configurations.
- An option is to use the virtual COM port.
+ serial console to use (because you don't lose the console device each time
+ you lose the USB connection). It is the default in all of these
+ configurations. An option is to use the virtual COM port.
Virtual COM Port
----------------
diff --git a/nuttx/configs/samd20-xplained/include/board.h b/nuttx/configs/samd20-xplained/include/board.h
index 216e38c0b..c7956e8ba 100644
--- a/nuttx/configs/samd20-xplained/include/board.h
+++ b/nuttx/configs/samd20-xplained/include/board.h
@@ -372,12 +372,18 @@
# define BOARD_SERCOM4_PINMAP_PAD1 PORT_SERCOM4_PAD1_3
# define BOARD_SERCOM4_PINMAP_PAD2 0
# define BOARD_SERCOM4_PINMAP_PAD3 0
-#else /* if defined(CONFIG_SAMD20_XPLAINED_USART4_EXT3) */
+#elif defined(CONFIG_SAMD20_XPLAINED_USART4_EXT2)
# define BOARD_SERCOM4_MUXCONFIG (USART_CTRLA_RXPAD1 | USART_CTRLA_TXPAD0)
# define BOARD_SERCOM4_PINMAP_PAD0 PORT_SERCOM4_PAD0_1
# define BOARD_SERCOM4_PINMAP_PAD1 PORT_SERCOM4_PAD1_1
# define BOARD_SERCOM4_PINMAP_PAD2 0
# define BOARD_SERCOM4_PINMAP_PAD3 0
+#else /* if defined(CONFIG_SAMD20_XPLAINED_USART4_EXT3) */
+# define BOARD_SERCOM4_MUXCONFIG (USART_CTRLA_RXPAD3 | USART_CTRLA_TXPAD2)
+# define BOARD_SERCOM4_PINMAP_PAD0 0
+# define BOARD_SERCOM4_PINMAP_PAD1 0
+# define BOARD_SERCOM4_PINMAP_PAD2 PORT_SERCOM4_PAD2_3
+# define BOARD_SERCOM4_PINMAP_PAD3 PORT_SERCOM4_PAD3_3
#endif
#define BOARD_SERCOM4_FREQUENCY BOARD_GCLK0_FREQUENCY