From 1bf745a841e87b111b0cdb549e82ce9497914199 Mon Sep 17 00:00:00 2001 From: Gregory Nutt Date: Sat, 2 Jul 2016 15:27:12 -0600 Subject: [PATCH] Freedom K64F: Add pin configuration to use a serial Shield as the Serial Console. --- configs/freedom-k64f/README.txt | 33 ++++++++++++++++++++++++++-- configs/freedom-k64f/include/board.h | 21 ++++++++++++++++++ 2 files changed, 52 insertions(+), 2 deletions(-) diff --git a/configs/freedom-k64f/README.txt b/configs/freedom-k64f/README.txt index 3a6184a138..40239fe15d 100644 --- a/configs/freedom-k64f/README.txt +++ b/configs/freedom-k64f/README.txt @@ -54,8 +54,34 @@ OpenSDAv2 Serial Console ============== + USB VCOM Console + ---------------- The primary serial port interface signals are PTB16 UART0_RX and PTB17 - UART0_TX. These signals are connected to the OpenSDAv2 circuit. + UART0_TX. These signals are connected to the OpenSDAv2 VCOM circuit. + + Serial Shield Console + --------------------- + An alternative serial port might use a standard serial shield mounted + on the Freedom Board. In this case, Arduino pin D1 provides UART TX and + pin D0 privides UART RX. + + The I/O headers on the FRDM-K64F board are arranged to enable + compatibility with Arduino shield. The outer rows of pins (even numbered + pins) on the headers, share the same mechanical spacing and placement with + the I/O headers on the Arduino Revision 3 (R3) standard. + + The Arduino D0 and D1 pins then correspond to pins 2 and 4 on the J1 I/O + connector: + + Arduino Pin FRDM-K64F J1 Connector + ------------------------ ----------------------- + UART TX, Arduino D1 pin Pin 4, PTC17, UART3_TX + UART RX, Arduino D0 pin Pin 2, PTC16, UART3_RX + + Default Serial Console + ---------------------- + By default, these configuration are setup to use the Serial Console on + UART3. That, however, is easily reconfigured. LEDs and Buttons ================ @@ -344,7 +370,10 @@ Where is one of the following: CONFIG_ARMV7M_OABI_TOOLCHAIN=y : The older OABI version CONFIG_RAW_BINARY=y : Output formats: ELF and raw binary - 3. An SDHC driver is under work and can be enabled in the NSH configuration + 3. The Serial Console is provided on UART3 with the correct pin + configuration for use with an Arduino Serial Shield. + + 4. An SDHC driver is under work and can be enabled in the NSH configuration for further testing be setting the following configuration values as follows: diff --git a/configs/freedom-k64f/include/board.h b/configs/freedom-k64f/include/board.h index 6581944190..07af717c70 100644 --- a/configs/freedom-k64f/include/board.h +++ b/configs/freedom-k64f/include/board.h @@ -205,6 +205,27 @@ #define PIN_UART0_RX PIN_UART0_RX_3 #define PIN_UART0_TX PIN_UART0_TX_3 +/* An alternative serial port might use a standard serial shield mounted + * on the Freedom Board. In this case, Arduino pin D1 provides UART TX and + * pin D0 privides UART RX. + * + * The I/O headers on the FRDM-K64F board are arranged to enable + * compatibility with Arduino shield. The outer rows of pins (even numbered + * pins) on the headers, share the same mechanical spacing and placement with + * the I/O headers on the Arduino Revision 3 (R3) standard. + * + * The Arduino D0 and D1 pins then correspond to pins 2 and 4 on the J1 I/O + * connector: + * + * Arduino Pin FRDM-K64F J1 Connector + * ------------------------ ----------------------- + * UART TX, Arduino D1 pin Pin 4, PTC17, UART3_TX + * UART RX, Arduino D0 pin Pin 2, PTC16, UART3_RX + */ + +#define PIN_UART3_RX PIN_UART3_RX_2 +#define PIN_UART3_TX PIN_UART3_TX_2 + /************************************************************************************ * Public Data ************************************************************************************/