SAMA5: Add support for DBGU. Xplained board now uses DBGU for the serial console

This commit is contained in:
Gregory Nutt 2014-04-01 11:24:15 -06:00
parent eb74d08118
commit dd094828ec
3 changed files with 127 additions and 86 deletions

View File

@ -483,7 +483,7 @@ Programming U-Boot
- Press the "Send File Name" Browse button
- Choose u-boot.bin binary file and press Open
- Enter the proper address on media in the Address text field:
0x00200000
0x00040000
- Press the "Send File" button
- Close SAM-BA, remove the USB Device cable.
@ -660,10 +660,6 @@ Serial Console
J20 SDA 20 PE19 USART3 TXD3
J20 SCL 21 PE18 USART3 RXD3
By default USART1 is used as the NuttX serial console in all
configurations (unless otherwise noted). USART1 is provided at TTL
levels at pins TXD0 and TXD1 of J20.
DBGU Interface
--------------
@ -679,7 +675,10 @@ Serial Console
5 PE14 (available)
6 GND
The DBGU is not used by NuttX.
By default the DBUG is used as the NuttX serial console in all
configurations (unless otherwise noted). The DBGU is available at
logic levels at pins RXD and TXD of the DEBUG connector (J23). GND
is available at J23 and +3.3V is available from J14
Networking
==========
@ -855,15 +854,21 @@ AT25 Serial FLASH
Connections
-----------
Both the SAMA5D3-Xplained board supports an options Serial DataFlash. The
SPI connection is as follows:
The SAMA5D3-Xplained board supports an options Serial DataFlash connected
at MN8. The SPI connection is as follows:
AT25DF321A SAMA5
--------------- -----------------------------------------------
SI PD11 SPI0_MOSI
SO PD10 SPI0_MIS0
SCK PD12 SPI0_SPCK
/CS PD13 if jumper JP6 is closed.
MN8 SAMA5
------------- -----------------------------------------------
PIN FUNCTION PIO FUNCTION
--- --------- ----- -----------------------------------------
5 SI PD11 SPI0_MOSI
2 SO PD10 SPI0_MIS0
6 SCK PD12 SPI0_SPCK
1 /CS PD13 if jumper JP6 is closed.
NOTE: The MN8 is not populated on my SAMAD3 Xplained board. So, as a
result, these instructions would only apply if you were to have an AT25
Serial DataFlash installed in MN8.
Configuration
-------------
@ -897,7 +902,7 @@ AT25 Serial FLASH
CONFIG_SAMA5D3XPLAINED_AT25_AUTOMOUNT=y : Mounts AT25 for NSH
CONFIG_SAMA5D3XPLAINED_AT25_FTL=y : Create block driver for FAT
NOTE that you must close JP6 in order to enable the AT25 FLASH chip select.
NOTE: that you must close JP6 in order to enable the AT25 FLASH chip select.
You can then format the AT25 FLASH for a FAT file system and mount the
file system at /mnt/at25 using these NSH commands:
@ -914,9 +919,6 @@ AT25 Serial FLASH
nsh> cat /mnt/at25/atest.txt
This is a test
NOTE: It appears that if Linux runs out of NAND, it will destroy the
contents of the AT25.
HSMCI Card Slots
================
@ -2391,10 +2393,10 @@ SAMA5D3-Xplained Configuration Options
Individual subsystems can be enabled:
CONFIG_SAMA5_DBGU - Debug Unit Interrupt
CONFIG_SAMA5_PIT - Periodic Interval Timer Interrupt
CONFIG_SAMA5_WDT - Watchdog timer Interrupt
CONFIG_SAMA5_HSMC - Multi-bit ECC Interrupt
CONFIG_SAMA5_DBGU - Debug Unit
CONFIG_SAMA5_PIT - Periodic Interval Timer
CONFIG_SAMA5_WDT - Watchdog timer
CONFIG_SAMA5_HSMC - Multi-bit ECC
CONFIG_SAMA5_SMD - SMD Soft Modem
CONFIG_SAMA5_USART0 - USART 0
CONFIG_SAMA5_USART1 - USART 1
@ -2448,17 +2450,26 @@ SAMA5D3-Xplained Configuration Options
CONFIG_USART2_ISUART - USART2 is configured as a UART
CONFIG_USART3_ISUART - USART3 is configured as a UART
ST91SAMA5 specific device driver settings
AT91SAMA5 specific device driver settings
CONFIG_SAMA5_DBGU_SERIAL_CONSOLE - selects the DBGU
for the console and ttyDBGU
CONFIG_SAMA5_DBGU_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer
CONFIG_SAMA5_DBGU_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_SAMA5_DBGU_BAUD - The configure BAUD of the DBGU.
CONFIG_SAMA5_DBGU_PARITY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=0,1,2,3) or UART
m (m=4,5) for the console and ttys0 (default is the USART1).
m (m=4,5) for the console and ttys0 (default is the DBGU).
CONFIG_U[S]ARTn_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer
CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be
CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8.
CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_PARITY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_2STOP - Two stop bits
AT91SAMA5 USB Host Configuration
@ -2526,7 +2537,7 @@ Configurations
reconfiguration process.
2. Unless stated otherwise, all configurations generate console
output on USART1 (J20).
output on the DBGU (J23).
3. All of these configurations use the Code Sourcery for Windows toolchain
(unless stated otherwise in the description of the configuration). That
@ -2586,7 +2597,7 @@ Configurations
together.
NOTES:
1. This configuration uses the default USART1 serial console. That
1. This configuration uses the default DBGU serial console. That
is easily changed by reconfiguring to (1) enable a different
serial peripheral, and (2) selecting that serial peripheral as
the console device.

View File

@ -139,7 +139,7 @@ CONFIG_ARCH_CHIP_ATSAMA5D36=y
#
# SAMA5 Peripheral Support
#
# CONFIG_SAMA5_DBGU is not set
CONFIG_SAMA5_DBGU=y
# CONFIG_SAMA5_PIT is not set
# CONFIG_SAMA5_WDT is not set
# CONFIG_SAMA5_RTC is not set
@ -148,7 +148,7 @@ CONFIG_SAMA5_HSMC=y
# CONFIG_SAMA5_UART0 is not set
# CONFIG_SAMA5_UART1 is not set
# CONFIG_SAMA5_USART0 is not set
CONFIG_SAMA5_USART1=y
# CONFIG_SAMA5_USART1 is not set
# CONFIG_SAMA5_USART2 is not set
# CONFIG_SAMA5_USART3 is not set
# CONFIG_SAMA5_TWI0 is not set
@ -182,6 +182,15 @@ CONFIG_SAMA5_USART1=y
# CONFIG_SAMA5_MPDDRC is not set
# CONFIG_SAMA5_PIO_IRQ is not set
#
# DBGU Configuration
#
CONFIG_SAMA5_DBGU_CONSOLE=y
CONFIG_SAMA5_DBGU_RXBUFSIZE=256
CONFIG_SAMA5_DBGU_TXBUFSIZE=256
CONFIG_SAMA5_DBGU_BAUD=115200
CONFIG_SAMA5_DBGU_PARITY=0
#
# External Memory Configuration
#
@ -273,29 +282,6 @@ CONFIG_NSH_MMCSDMINOR=0
#
# RTOS Features
#
# CONFIG_BOARD_INITIALIZE is not set
CONFIG_MSEC_PER_TICK=10
# CONFIG_SYSTEM_TIME64 is not set
CONFIG_RR_INTERVAL=200
# CONFIG_SCHED_CPULOAD is not set
# CONFIG_SCHED_INSTRUMENTATION is not set
CONFIG_TASK_NAME_SIZE=32
# CONFIG_SCHED_HAVE_PARENT is not set
# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2014
CONFIG_START_MONTH=7
CONFIG_START_DAY=31
CONFIG_DEV_CONSOLE=y
# CONFIG_MUTEX_TYPES is not set
# CONFIG_PRIORITY_INHERITANCE is not set
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
CONFIG_SCHED_WAITPID=y
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_DISABLE_OS_API=y
# CONFIG_DISABLE_CLOCK is not set
# CONFIG_DISABLE_POSIX_TIMERS is not set
@ -304,6 +290,63 @@ CONFIG_DISABLE_OS_API=y
# CONFIG_DISABLE_MQUEUE is not set
CONFIG_DISABLE_ENVIRON=y
#
# Clocks and Timers
#
CONFIG_MSEC_PER_TICK=10
# CONFIG_SYSTEM_TIME64 is not set
# CONFIG_CLOCK_MONOTONIC is not set
# CONFIG_JULIAN_TIME is not set
CONFIG_START_YEAR=2014
CONFIG_START_MONTH=7
CONFIG_START_DAY=31
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=16
CONFIG_PREALLOC_TIMERS=4
#
# Tasks and Scheduling
#
CONFIG_USER_ENTRYPOINT="nsh_main"
CONFIG_RR_INTERVAL=200
CONFIG_TASK_NAME_SIZE=32
CONFIG_MAX_TASK_ARGS=4
CONFIG_MAX_TASKS=16
# CONFIG_SCHED_HAVE_PARENT is not set
CONFIG_SCHED_WAITPID=y
#
# Pthread Options
#
# CONFIG_MUTEX_TYPES is not set
CONFIG_NPTHREAD_KEYS=4
#
# Performance Monitoring
#
# CONFIG_SCHED_CPULOAD is not set
# CONFIG_SCHED_INSTRUMENTATION is not set
#
# Files and I/O
#
CONFIG_DEV_CONSOLE=y
# CONFIG_FDCLONE_DISABLE is not set
# CONFIG_FDCLONE_STDIO is not set
CONFIG_SDCLONE_DISABLE=y
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
# CONFIG_PRIORITY_INHERITANCE is not set
#
# RTOS hooks
#
# CONFIG_BOARD_INITIALIZE is not set
# CONFIG_SCHED_STARTHOOK is not set
# CONFIG_SCHED_ATEXIT is not set
# CONFIG_SCHED_ONEXIT is not set
#
# Signal Numbers
#
@ -313,19 +356,10 @@ CONFIG_SIG_SIGALARM=3
CONFIG_SIG_SIGCONDTIMEDOUT=16
#
# Sizes of configurable things (0 disables)
# POSIX Message Queue Options
#
CONFIG_MAX_TASKS=16
CONFIG_MAX_TASK_ARGS=4
CONFIG_NPTHREAD_KEYS=4
CONFIG_NFILE_DESCRIPTORS=8
CONFIG_NFILE_STREAMS=8
CONFIG_NAME_MAX=32
CONFIG_PREALLOC_MQ_MSGS=4
CONFIG_MQ_MAXMSGSIZE=32
CONFIG_MAX_WDOGPARMS=2
CONFIG_PREALLOC_WDOGS=16
CONFIG_PREALLOC_TIMERS=4
#
# Stack and heap information
@ -381,7 +415,7 @@ CONFIG_SERIAL=y
# CONFIG_ARCH_HAVE_SCI0 is not set
# CONFIG_ARCH_HAVE_SCI1 is not set
# CONFIG_ARCH_HAVE_USART0 is not set
CONFIG_ARCH_HAVE_USART1=y
# CONFIG_ARCH_HAVE_USART1 is not set
# CONFIG_ARCH_HAVE_USART2 is not set
# CONFIG_ARCH_HAVE_USART3 is not set
# CONFIG_ARCH_HAVE_USART4 is not set
@ -393,23 +427,10 @@ CONFIG_ARCH_HAVE_USART1=y
#
# USART Configuration
#
CONFIG_USART1_ISUART=y
CONFIG_MCU_SERIAL=y
# CONFIG_MCU_SERIAL is not set
CONFIG_STANDARD_SERIAL=y
CONFIG_USART1_SERIAL_CONSOLE=y
# CONFIG_USART1_SERIAL_CONSOLE is not set
# CONFIG_NO_SERIAL_CONSOLE is not set
#
# USART1 Configuration
#
CONFIG_USART1_RXBUFSIZE=256
CONFIG_USART1_TXBUFSIZE=256
CONFIG_USART1_BAUD=115200
CONFIG_USART1_BITS=8
CONFIG_USART1_PARITY=0
CONFIG_USART1_2STOP=0
# CONFIG_USART1_IFLOWCONTROL is not set
# CONFIG_USART1_OFLOWCONTROL is not set
# CONFIG_SERIAL_IFLOWCONTROL is not set
# CONFIG_SERIAL_OFLOWCONTROL is not set
# CONFIG_USBDEV is not set

View File

@ -604,7 +604,7 @@ Programming U-Boot
- Press the "Send File Name" Browse button
- Choose u-boot.bin binary file and press Open
- Enter the proper address on media in the Address text field:
0x00200000
0x00040000
- Press the "Send File" button
- Close SAM-BA, remove the USB Device cable.
@ -2722,10 +2722,10 @@ SAMA5D3x-EK Configuration Options
Individual subsystems can be enabled:
CONFIG_SAMA5_DBGU - Debug Unit Interrupt
CONFIG_SAMA5_PIT - Periodic Interval Timer Interrupt
CONFIG_SAMA5_WDT - Watchdog timer Interrupt
CONFIG_SAMA5_HSMC - Multi-bit ECC Interrupt
CONFIG_SAMA5_DBGU - Debug Unit
CONFIG_SAMA5_PIT - Periodic Interval Timer
CONFIG_SAMA5_WDT - Watchdog timer
CONFIG_SAMA5_HSMC - Multi-bit ECC
CONFIG_SAMA5_SMD - SMD Soft Modem
CONFIG_SAMA5_USART0 - USART 0
CONFIG_SAMA5_USART1 - USART 1
@ -2779,7 +2779,16 @@ SAMA5D3x-EK Configuration Options
CONFIG_USART2_ISUART - USART2 is configured as a UART
CONFIG_USART3_ISUART - USART3 is configured as a UART
ST91SAMA5 specific device driver settings
AT91SAMA5 specific device driver settings
CONFIG_SAMA5_DBGU_SERIAL_CONSOLE - selects the DBGU
for the console and ttyDBGU
CONFIG_SAMA5_DBGU_RXBUFSIZE - Characters are buffered as received.
This specific the size of the receive buffer
CONFIG_SAMA5_DBGU_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_SAMA5_DBGU_BAUD - The configure BAUD of the DBGU.
CONFIG_SAMA5_DBGU_PARITY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_SERIAL_CONSOLE - selects the USARTn (n=0,1,2,3) or UART
m (m=4,5) for the console and ttys0 (default is the USART1).
@ -2787,9 +2796,9 @@ SAMA5D3x-EK Configuration Options
This specific the size of the receive buffer
CONFIG_U[S]ARTn_TXBUFSIZE - Characters are buffered before
being sent. This specific the size of the transmit buffer
CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART. Must be
CONFIG_U[S]ARTn_BAUD - The configure BAUD of the UART.
CONFIG_U[S]ARTn_BITS - The number of bits. Must be either 7 or 8.
CONFIG_U[S]ARTn_PARTIY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_PARITY - 0=no parity, 1=odd parity, 2=even parity
CONFIG_U[S]ARTn_2STOP - Two stop bits
AT91SAMA5 USB Host Configuration