Add support for a serial console on UART1 for the Open1788 board
This commit is contained in:
parent
2a58da6eb8
commit
f6e731ad50
@ -11,6 +11,7 @@ CONTENTS
|
||||
o LEDs
|
||||
o Buttons
|
||||
o FPU
|
||||
o Serial Console
|
||||
o Using OpenOCD with the Olimex ARM-USB-OCD
|
||||
o Loading Code with the ISP Board
|
||||
o Configuration
|
||||
@ -154,6 +155,44 @@ See the section above on Toolchains, NOTE 2, for explanations for some of
|
||||
the configuration settings. Some of the usual settings are just not supported
|
||||
by the "Lite" version of the Atollic toolchain.
|
||||
|
||||
Serial Console
|
||||
==============
|
||||
|
||||
By Default, UART0 is used as the serial console in all configurations. This
|
||||
may be connected to your computer via an external RS-232 driver or via the
|
||||
WaveShare USB ISP/VCOM module.
|
||||
|
||||
As an option, UART1 can also be used for the serial console by reconfiguring
|
||||
as follows:
|
||||
|
||||
System Type:
|
||||
CONFIG_LPC17_UART0=n : Disable UART0 if it is no longer used
|
||||
CONFIG_LPC17_UART1=y : Enable UART1
|
||||
|
||||
Drivers:
|
||||
CONFIG_UART1_SERIAL_CONSOLE=y : Setup up the UART1 configuration
|
||||
CONFIG_UART1_RXBUFSIZE=256
|
||||
CONFIG_UART1_TXBUFSIZE=256
|
||||
CONFIG_UART1_BAUD=115200
|
||||
CONFIG_UART1_BITS=8
|
||||
CONFIG_UART1_PARITY=0
|
||||
CONFIG_UART1_2STOP=0
|
||||
|
||||
In this configuration using UART1, it is necessary to disable LED support
|
||||
on the board. That is because UART1 RXD is set for pin p0.16, but so it
|
||||
LED2. If you do not disable LED support then no incoming serial data will
|
||||
be recevied.
|
||||
|
||||
Common Board Options
|
||||
CONFIG_ARCH_LEDS=n : Disable LED support
|
||||
|
||||
You should also remove the LED2 jumper so that the RXD input does not
|
||||
attempt to drive LED2 as well (this this does not seem to interfere with
|
||||
data receipt).
|
||||
|
||||
NOTE: If you intend to use LEDs, then you might want to redesign some of
|
||||
the LED logic in the src/ subdirectory so that it does not use LED2.
|
||||
|
||||
Using OpenOCD with the Olimex ARM-USB-OCD
|
||||
=========================================
|
||||
|
||||
|
@ -219,7 +219,7 @@
|
||||
* any way. The following definitions are used to access individual LEDs.
|
||||
*
|
||||
* LED1 -- Connected to P1[14]
|
||||
* LED2 -- Connected to P0[16]
|
||||
* LED2 -- Connected to P0[16] (shared with UART1 RXD)
|
||||
* LED3 -- Connected to P1[13]
|
||||
* LED4 -- Connected to P4[27]
|
||||
*
|
||||
@ -310,6 +310,30 @@
|
||||
#define GPIO_UART0_TXD GPIO_UART0_TXD_2
|
||||
#define GPIO_UART0_RXD GPIO_UART0_RXD_2
|
||||
|
||||
/* UART1:
|
||||
*
|
||||
* All pin options are controlled by older briges on the bottom of the board. There
|
||||
* are the default settings on my board as it came out of the box:
|
||||
*
|
||||
* RTS --- Connected to P0[22]
|
||||
* RI --- Connected to P0[21]
|
||||
* DSR --- Connected to P0[19]
|
||||
* DCD --- Connected to P0[18]
|
||||
* CTS --- Connected to P0[17]
|
||||
* DTR --- Connected to P0[20]
|
||||
* TXD --- Connected to P0[15]
|
||||
* RXD --- Connected to P0[16] (Shared with LED2)
|
||||
*/
|
||||
|
||||
#define GPIO_UART1_RTS GPIO_UART1_RTS_2
|
||||
#define GPIO_UART1_RI GPIO_UART1_RI_1
|
||||
#define GPIO_UART1_DSR GPIO_UART1_DSR_1
|
||||
#define GPIO_UART1_DCD GPIO_UART1_DCD_1
|
||||
#define GPIO_UART1_CTS GPIO_UART1_CTS_1
|
||||
#define GPIO_UART1_DTR GPIO_UART1_DTR_1
|
||||
#define GPIO_UART1_TXD GPIO_UART1_TXD_1
|
||||
#define GPIO_UART1_RXD GPIO_UART1_RXD_1
|
||||
|
||||
/* MCI-SDIO:
|
||||
*
|
||||
* D0 --- Connected to P1[6]
|
||||
|
@ -132,7 +132,6 @@
|
||||
* Pins are configured as floating because there are pullups on the module.
|
||||
*/
|
||||
|
||||
#define GPIO_TC_PEN (GPIO_INPUT | GPIO_FLOAT | GPIO_PORT2 | GPIO_PIN15)
|
||||
#define GPIO_TC_PENIRQ (GPIO_INTBOTH | GPIO_FLOAT | GPIO_PORT2 | GPIO_PIN15)
|
||||
#define GPIO_TC_BUSY (GPIO_INPUT | GPIO_FLOAT | GPIO_PORT2 | GPIO_PIN14)
|
||||
#define GPIO_TC_CS (GPIO_OUTPUT | GPIO_VALUE_ONE | GPIO_PORT1 | GPIO_PIN8)
|
||||
|
Loading…
Reference in New Issue
Block a user