Use UART1 for the console on the SAM4S-Xplained not USART0
This commit is contained in:
parent
1a4c704efd
commit
a2a91bf8d6
@ -243,7 +243,7 @@ config SAM34_UART0
|
||||
depends on ARCH_CHIP_SAM3U || ARCH_CHIP_SAM4S
|
||||
select ARCH_HAVE_UART0
|
||||
|
||||
config SAM43_UART1
|
||||
config SAM34_UART1
|
||||
bool "UART 1"
|
||||
default n
|
||||
depends on ARCH_CHIP_SAM4S
|
||||
|
@ -181,7 +181,7 @@
|
||||
* Peripheral Clock Status Register common bit-field definitions.
|
||||
*/
|
||||
|
||||
#define PMC_PID(n) (1 << (n))
|
||||
#define PMC_PIDL(n) (1 << (n))
|
||||
#define PMC_PID2 (1 << 2) /* Bit 2: Peripheral Clock 2 Enable */
|
||||
#define PMC_PID3 (1 << 3) /* Bit 3: Peripheral Clock 3 Enable */
|
||||
#define PMC_PID4 (1 << 4) /* Bit 4: Peripheral Clock 4 Enable */
|
||||
@ -443,9 +443,10 @@
|
||||
/* Peripheral Clock Status Register 1 */
|
||||
|
||||
#if defined(CONFIG_ARCH_CHIP_SAM4S)
|
||||
# define PMC_PIC32 (1 << 0) /* Bit 0: PID32 */
|
||||
# define PMC_PIC33 (1 << 1) /* Bit 1: PID33 */
|
||||
# define PMC_PIC34 (1 << 2) /* Bit 2: PID34 */
|
||||
# define PMC_PIDH(n) (1 << ((n) - 32))
|
||||
# define PMC_PID32 (1 << 0) /* Bit 0: PID32 */
|
||||
# define PMC_PID33 (1 << 1) /* Bit 1: PID33 */
|
||||
# define PMC_PID34 (1 << 2) /* Bit 2: PID34 */
|
||||
#endif
|
||||
|
||||
/* Oscillator Calibration Register */
|
||||
|
@ -318,8 +318,24 @@ Serial Consoles
|
||||
------
|
||||
|
||||
If you have a TTL to RS-232 convertor 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. UART1 is the default in all of these
|
||||
configurations.
|
||||
|
||||
UART1 RXD PB2 J1 pin 3 J4 pin 3
|
||||
UART1 TXD PB3 J1 pin 4 J4 pin 4
|
||||
GND J1 pin 9 J4 pin 9
|
||||
Vdd J1 pin 10 J4 pin 10
|
||||
|
||||
USART1 is another option:
|
||||
|
||||
USART1 RXD PA21 J2 pin 6
|
||||
USART1 TXD PA22 J2 pin 1
|
||||
GND J2 pin 9
|
||||
Vdd J2 pin 10
|
||||
|
||||
Yet another option is to use UART0 and the virtual COM port. This
|
||||
option may be more convenient for long term development, but was
|
||||
painful to use during board bring-up.
|
||||
|
||||
Virtual COM Port
|
||||
----------------
|
||||
@ -516,25 +532,25 @@ Configurations
|
||||
|
||||
NOTES:
|
||||
|
||||
1. This configuration provides test output on USART0 which is available
|
||||
on EXT1 or EXT4 (see the section "Serial Consoles" above). The
|
||||
1. This configuration provides test output on UART1 which is available
|
||||
on J3 or J4 (see the section "Serial Consoles" above). The
|
||||
virtual COM port could be used, instead, by reconfiguring to use
|
||||
USART1 instead of USART0:
|
||||
UART0 instead of UART1:
|
||||
|
||||
System Type -> AT91SAM3/4 Peripheral Support
|
||||
CONFIG_SAM_USART0=y
|
||||
CONFIG_SAM_USART1=n
|
||||
CONFIG_SAM_UART0=y
|
||||
CONFIG_SAM_UART1=n
|
||||
|
||||
Device Drivers -> Serial Driver Support -> Serial Console
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
CONFIG_UART0_SERIAL_CONSOLE=y
|
||||
|
||||
Device Drivers -> Serial Driver Support -> USART0 Configuration
|
||||
CONFIG_USART0_2STOP=0
|
||||
CONFIG_USART0_BAUD=115200
|
||||
CONFIG_USART0_BITS=8
|
||||
CONFIG_USART0_PARITY=0
|
||||
CONFIG_USART0_RXBUFSIZE=256
|
||||
CONFIG_USART0_TXBUFSIZE=256
|
||||
CONFIG_UART0_2STOP=0
|
||||
CONFIG_UART0_BAUD=115200
|
||||
CONFIG_UART0_BITS=8
|
||||
CONFIG_UART0_PARITY=0
|
||||
CONFIG_UART0_RXBUFSIZE=256
|
||||
CONFIG_UART0_TXBUFSIZE=256
|
||||
|
||||
2. This configuration is set up to use the NuttX OABI toolchain (see
|
||||
above). Of course this can be reconfigured if you prefer a different
|
||||
|
@ -139,8 +139,8 @@ CONFIG_ARCH_CHIP_SAM4S=y
|
||||
# CONFIG_SAM34_TWIM1 is not set
|
||||
# CONFIG_SAM34_TWIS1 is not set
|
||||
# CONFIG_SAM34_UART0 is not set
|
||||
# CONFIG_SAM43_UART1 is not set
|
||||
CONFIG_SAM34_USART0=y
|
||||
CONFIG_SAM34_UART1=y
|
||||
# CONFIG_SAM34_USART0 is not set
|
||||
# CONFIG_SAM34_USART1 is not set
|
||||
# CONFIG_SAM34_ADC12B is not set
|
||||
# CONFIG_SAM34_DACC is not set
|
||||
@ -157,7 +157,6 @@ CONFIG_SAM34_USART0=y
|
||||
#
|
||||
# AT91SAM3/4 USART Configuration
|
||||
#
|
||||
CONFIG_USART0_ISUART=y
|
||||
|
||||
#
|
||||
# AT91SAM3/4 GPIO Interrupt Configuration
|
||||
@ -318,22 +317,23 @@ CONFIG_DEV_NULL=y
|
||||
CONFIG_SERIAL=y
|
||||
CONFIG_DEV_LOWCONSOLE=y
|
||||
# CONFIG_16550_UART is not set
|
||||
CONFIG_ARCH_HAVE_USART0=y
|
||||
CONFIG_ARCH_HAVE_UART1=y
|
||||
CONFIG_MCU_SERIAL=y
|
||||
CONFIG_USART0_SERIAL_CONSOLE=y
|
||||
# CONFIG_USART0_SERIAL_CONSOLE is not set
|
||||
CONFIG_UART1_SERIAL_CONSOLE=y
|
||||
# CONFIG_NO_SERIAL_CONSOLE is not set
|
||||
|
||||
#
|
||||
# USART0 Configuration
|
||||
# UART1 Configuration
|
||||
#
|
||||
CONFIG_USART0_RXBUFSIZE=256
|
||||
CONFIG_USART0_TXBUFSIZE=256
|
||||
CONFIG_USART0_BAUD=115200
|
||||
CONFIG_USART0_BITS=8
|
||||
CONFIG_USART0_PARITY=0
|
||||
CONFIG_USART0_2STOP=0
|
||||
# CONFIG_USART0_IFLOWCONTROL is not set
|
||||
# CONFIG_USART0_OFLOWCONTROL is not set
|
||||
CONFIG_UART1_RXBUFSIZE=256
|
||||
CONFIG_UART1_TXBUFSIZE=256
|
||||
CONFIG_UART1_BAUD=115200
|
||||
CONFIG_UART1_BITS=8
|
||||
CONFIG_UART1_PARITY=0
|
||||
CONFIG_UART1_2STOP=0
|
||||
# CONFIG_UART1_IFLOWCONTROL is not set
|
||||
# CONFIG_UART1_OFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_IFLOWCONTROL is not set
|
||||
# CONFIG_SERIAL_OFLOWCONTROL is not set
|
||||
# CONFIG_USBDEV is not set
|
||||
|
Loading…
Reference in New Issue
Block a user