CoreWind Technology SBC-SAM9G20 User manual

SBC-SAM9G20 User manual
Ver 1.0
Date: 2010-10-20
CoreWind Technology
Tel : +86-755-29638421
Email : [email protected]
Web : www.armdevs.com
SBC-SAM9G20 User manual
www.armdevs.com

hange History
Rev Date Description
V1.0 2010-10-20 The initial released Version
V2.0 2011-4-1 Rename the W9G20 to SB -SAM9G20
V2.1 2011-5-10 Support character L D by GPIO extended
SBC-SAM9G20 User manual
www.armdevs.com

Catalogue
SBC-SAM9G20 User manual........................................................... 1
atalogue ........................................................................................ 3
hapter 1 Introduction.................................................................... 5
1.1 SB -SAM9G20 OverView ..................................................... 5
1.2 SB -SAM9G20 Features ...................................................... 5
1.3 SB -SAM9G20 Kit Deliverables............................................ 6
1.4 Support .................................................................................. 6
hapter 2 Getting Started .............................................................. 8
2.1 Assembly and onnections ................................................... 8
2.2 Operation ............................................................................... 8
2.3 onfigurations........................................................................ 8
hapter 3 HardWare ...................................................................... 9
3.1 SB -SAM9G20 OverView ..................................................... 9
3.3 SDRAM(U1,U2) ................................................................... 11
3.4 FLASH(U9) .......................................................................... 11
3.5 Power Supply(J4) ................................................................ 11
3.6 10/100M Net(J22) ................................................................ 11
3.7 RS232 Serial Ports( OM1, J23).......................................... 12
3.8 RS485 Serial Ports(J5) ........................................................ 13
3.9 AN 2.0 BUS(J5)................................................................. 13
3.10 NET(J22) ........................................................................... 13
3.11 USB(J7,J9) ........................................................................ 14
3.12 SD ard ............................................................................. 14
3.13 haracter L D interface .................................................... 14
3.14 SPI, GPIO, AD (J3, J10, J13)........................................... 14
3.15 Watchdog........................................................................... 17
3.16 RT ................................................................................... 17
3.17 jumper................................................................................ 17
3.18 Buzzer and LED................................................................. 17
hapter 4 Software Description ................................................... 19
4.1 Overview.............................................................................. 19
4.2 Data Storage on SB -SAM9G20 ........................................ 19
4.2 SB -SAM9G20 Linux Burning and application test............. 19
hapter 5 Linux System Development......................................... 20
5.1 Install the ross ompiler Tools ...................................... 20
5.1.1 Uncompress the tools................................................ 20
5.1.2 Add Path in your environment file.............................. 20
5.1.3 heck the tool-chain path to see if it is set up correctly
or not .................................................................................. 20
5.2 Linux System ompile ..................................................... 20
5.2.1 AT91Bootstarp compile ............................................ 20
5.2.2 Boot-loader compile................................................... 21
5.2.3 Kernel compile........................................................... 21
SBC-SAM9G20 User manual
www.armdevs.com

5.2.4 Root Filesystem Build................................................ 21
5.2.5 Kernel config.............................................................. 22
SBC-SAM9G20 User manual
www.armdevs.com

Chapter 1 Introduction
1.1 SBC-SAM9G20 OverView
The SB -SAM9G20 is Based on the Atmel ARM9 AT91SAM9G20 processor. This
AT91SAM9G20 processor has an Ethernet MA built-in along with 7 serial ports. It
utilizes external SDRAM and includes an MMU which allows it to run Linux Operating
Systems. A SB (Single Board omputer) is a small embedded module that
contains the core of a microprocessor system.
The SB -SAM9G20 is the ideal processor engine for your next design. All of the
ARM processor core functionality is included on this board including: Flash, Memory,
Serial Ports, Ethernet, AN bus, USB Host, USB Device, I2S, SPI, A/D, RT , digital
I/O lines, and more.
oreWind also offers a complete software development package to customers. The
board supports linux 2.6.30 operating system and is provided with complete basic
drivers which enable a quick channel to evaluate the Atmel AT91SAM9G20
processor and customize application software. It would be an ideal development
platform for multimedia and communication applications.
1.2 SBC-SAM9G20 Features
The board is equipped with an AT91SAM9G20 microcontroller together with the following:
•400MHz Atmel AT91SAM9G20 ARM core processor
SBC-SAM9G20 User manual
www.armdevs.com

•64MB 133MHz high speed SDRAM
•256MB NAND FLASH
•10/100 baseT Ethernet
•SD/MM with SDH support
•2 USB Host port
•1 USB device port
•1-channel AN2.0 Bus
•6 RS-232
•1 RS-485
•1 x 4-channel 10-bit AD
•Real-time clock and watch-dog timer
•Digital I/O
1.3 SBC-SAM9G20 Kit Deliverables
The SB -SAM9G20 Single Board omputer comes with all of the necessary
hardware and software to quickly develop applications. The kit includes the following:
• One SB -SAM9G20 Board
• One Serial cable
• One net cable
• One USB cable
• One 12V@2A Power adapter
• One DVD
1.4 Support
When you don't know what's wrong or what to do next, let us help you! We supports
what is sells. Our engineering staff is here to help you with your application. Our
technical support department assists you in getting your project rolling and helps you
if it stops.
You can get help by the follow method:
SBC-SAM9G20 User manual
www.armdevs.com

•Forum
When you have some questions, you can search the Forum, maybe you can
find the right method to solve the board problem, Or you can ask your
questions in the Forum.
The Forum website: http://www.at91sam.org/forum
•Email Support
Send E-mail to [email protected] and our Technical Support staff will
respond as soon as possible to help you get your board working.
SBC-SAM9G20 User manual
www.armdevs.com

Chapter 2 Getting Started
This chapter describes the SB -SAM9G20 working environment and familiarizes the
user with its components and functionality.
2.1 Assembly and Connections
In order to use the SB -SAM9G20 the user must first assemble and connect the
peripherals to the SB -SAM9G20, as described in the following procedure.
1. Place the SB -SAM9G20 on a static free surface.
2. Make sure all of the jumpers are in the factory default position. The unit is
shipped in a factory default configuration. If the user is uncertain that the
SB -SAM9G20 has the jumpers in the factory default configuration, please
see the next section(2.3 Configurations) regarding board configuration.
3. onnect 12V regulated power supply to the board.
4. onnect serial cable between SB -SAM9G20 debug port and P /terminal
serial port.
5. Launch a terminal emulator, such as HyperTerminal, or minicom, on the P
configured to connect to the serial port of the SB -SAM9G20.
onfigure the serial port with the following parameters:
115200 bits per second, 8 data bits, no parity, 1 stop bit, no flow control.
6. onnect the board to a local area network (optional)
2.2 Operation
A few seconds after applying power to the SB -SAM9G20, debug information will be
displayed on the terminal program. The following figures show what this should look
like.
2.3 Configurations
Jumpers are used to configure the SB -SAM9G20 to operate in different mode. The
following table lists all the settings for each jumper.
Jumper Function Description
J8
(Defualt: close) Nand S open – Nand hips not select
close – Nand hips select
SBC-SAM9G20 User manual
www.armdevs.com

Chapter 3 HardWare
The following image shows where some of the hardware components are located.
3.1 SBC-SAM9G20 OverView
System
•CPU: Atmel AT91SAM9G20 (ARM926EJ core with MMU capable of 400MHz operation)
•RAM: 64Mbyte SDRAM
•Flash: 256Mbyte Nand Flash
•RTC: Battery backed Real Time lock/ alendar
•EEPROM: 4kbit EEPROM
•Watch-Dog: On chip watch-dog timer
Data Transfer Interface
•UARTS: 7 serial Port(6 RS232 serial port, 1 RS485 Serial port)
◦Debug: 3-wire RS232 serial port,
◦OM0: 5-wire RS232/TTL serial port,
◦OM2: 5-wire RS232/TTL serial port,
SBC-SAM9G20 User manual
www.armdevs.com

◦OM3: 3-wire RS232/TTL serial port
◦OM4: 3-wire RS232/TTL serial port
◦OM5: 3-wire RS232/TTL serial port
•RS485: 5-wire RS485/TTL serial port
•Net: 10/100M Ethernet interface(MA was on AT91SAM9G20 chips)
•USB: 2 USB 2.0 Full Speed Host & 1 USB 2.0 Full Speed Device ports
•CAN: 1-channel AN2.0 Bus
•SD: 1 SD/MM card slot
•SPI: 1 High-Speed SPI ports
•IIC: Hardware I2 port
•A/D: 1 x 4-channel 10-bit AD
Others
•Button: 1 Reset button
•LED: 1 battle LED, 1 user LED
•Buzzer: 1 Buzzer
Mechanical
•Dimensions:
•Temperature: -10° to 70°
•Power supply: 12V
3.2 AT91SAM9G20(U7)
The SB -SAM9G20 Single Board omputer uses the Atmel AT91SAM9G20 as the
core processor on this development board. The top-level features of AT91SAM9G20
processor are the following:
• ARM926EJ-S RIS ore Processor
SBC-SAM9G20 User manual
www.armdevs.com

• 400 MHz / 400 MIPS Performance
• 32Kbyte Instruction ache
• 32Kbyte Data ache
• Linux and Windows E enabled MMU
• 100 MHz System Bus
• 32 bit SDRAM Interface
• 32 bit SRAM / FLASH / ROM Interface
• Serial EEPROM Interface
• 10 / 100 Mbps Ethernet MA
• 6 UART
• Two-port USB Host
• 4 channel 10 bit AD
• 2 SPI Port
• Serial Audio Interface
• JTAG Interface
More detailed information regarding the AT91SAM9G20 processor can be found at
www.atmel.com
3.3 SDRAM(U1,U2)
The AT91SAM9G20 features a unified memory address model where all memory
devices are accessed over a common address and data bus. The SB -SAM9G20
supports 64MB SDRAM.
SDRAM chip name: MT48LC32M16A2P
3.4 FLASH(U9)
The SB -SAM9G20 is shipped with 256 Mbytes of NAND FLASH memory. The
SB -SAM9G20 can be also ordered with optional 512MB ~ 1GB NAND FLASH.
Nand Flash chip name: K9F2G08UOA
3.5 Power Supply(J4)
The SB -SAM9G20 board requires a regulated +12VD at 1A power supply applied
to J4. The power can be protected by fuse 0.75A limited. When power is applied
LED(D22) will illuminate.
3.6 10/100M Net(J22)
The SB -SAM9G20 Single Board omputer is shipped with support for a complete
Ethernet interface. The AT91SAM9G20 contains a MA subsystem that is compliant
with the ISO/TE 802.3 topology for a single shared medium with several stations.
The Media Access ontroller (MA ) within the AT91SAM9G20 supports 1/10/100
Mbps transfer rates and interfaces to industry standard physical layer devices. The
SB -SAM9G20 is shipped with the DM9161 100Base-X / 10Base-T Transceiver
device which, along with a RJ45 connector, provides the physical layer interface.
SBC-SAM9G20 User manual
www.armdevs.com

3.7 RS232 Serial Ports(COM1, J23)
Both Universal Asynchronous Receivers/Transmitters (UARTs) are level shifted to
RS-232 levels.
The OM1 is the debug USART port of the AT91SAM9G20, that reaches the
external world through a male DB9 connector.
The others serial (UART0, UART2, UART3, UART4, UART5) reaches the external
world through a 2x10 pin berg header(J23). Please see follow table for the pin outs
of Serial connectors. The OM2, OM3 are 5-wire serial, and the others is 3-wire
serial serial.
Table J23 (USART0 - USART5) Connector
Pin Signal Name Function
1GND GND
2 GND GND
3 RTXD0 UART0 TX
4 RTXD2 UART2 TX
5RRXD0 UART0 RX
6 RRXD2 UART2 RX
7 RRTS0 UART0 RTS
8 RRTS2 UART2 RTS
9 R TS0 UART0 TS
10 R TS2 UART2 TS
11 RTXD4 UART4 TX
12 RTXD3 UART3 TX
13 RRXD4 UART4 RX
14 RRXD3 UART3 RX
15 RTXD5 UART5 TX
16 N
17 RRXD5 UART5 RX
SBC-SAM9G20 User manual
www.armdevs.com

18 N
19 GND GND
20 GND GND
3.8 RS485 Serial Ports(J5)
The SB -SAM9G20 Single Board omputer provides one half duplex RS-485 port.
The RS-485 port is connected to UART1 with RTS signal for RS-485 driver direction
control. The RS-485 signal is provided via a 1x4 spacing header J5 (For Pin3 and
Pin4).
It use the chips: ADM2483BRWZ
J5(RS-485 Port )
Pin Signal Name
3 A
4 B
3.9 CAN 2.0 BUS(J5)
AN2.0 is extended through M P2515 and led out through connector J5. It is with
isolated resource and digital signal isolator. Pin definition is as below:
J5( AN bus )
Pin Signal Name
1 AN_H
2 AN_L
3.10 NET(J22)
The SB -SAM9G20 Single Board omputer is shipped with support for a complete
Ethernet interface. The AT91SAM9G20 contains a MA subsystem that is compliant
with the ISO/TE 802.3 topology for a single shared medium with several stations.
The Media Access ontroller (MA ) within the AT91SAM9G20 supports 1/10/100
Mbps transfer rates and interfaces to industry standard physical layer devices. The
SB -SAM9G20 is shipped with the DM9161 100Base-X / 10Base-T Transceiver
device which, along with a RJ45 connector, provides the physical layer interface.
SBC-SAM9G20 User manual
www.armdevs.com

3.11 USB(J7,J9)
The SB -SAM9G20 Single Board omputer is shipped with 2 USB host port(J7) on
standard USB type-A double deck connector.
The SB -SAM9G20 Single Board omputer is shipped with one USB device port J9.
The USB device port signal assignment is listed in the following table.
Table J7(USB Host)
Pin Signal Name Function
1VDD5V Power supply (+5V)
2 D+ USB1 signal
3 D- USB1 signal
4 GND Power supply (GND)
5VDD5V Power supply (+5V)
6 D+ USB1 signal
7 D- USB1 signal
8 GND Power supply (GND)
Table J9(USB device )
Pin Signal Name Function
1VBUS Power supply (+5V)
2 D+ USB signal
3 D- USB signal
4 GND Power supply (GND)
3.12 SD Card
SD ( Security Digital ) card is a kind of widely applied card. A specified interface
circuit on platform supports reading and writing function of SD card. AT91SAM9G20
integrates SD module in itself.
3.13 Character LCD interface
We can use the GPIO interface to extended L D interface, it support resolution:
320*240.
More interface info, refer to the 3.14 GPIO(J10)
3.14 SPI, GPIO, ADC(J3, J10, J13)
The AT91SAM9G20 contains very rich set of peripherals that are multiplex into 2
groups, Peripheral A and Peripheral B, with individually programmable pins. The SPI
bus, A/D and GPIO are provided together with other functions on the I/O expansion
port. The I/O expansion port is a 2x10 2.54mm spacing header. The following table
lists signals available on the I/O expansion connector with their corresponding
SBC-SAM9G20 User manual
www.armdevs.com

multiplexed functions and default usage on the SB -SAM9G20 Single Board
omputer.
J3(GPIO, IIC interface)
Pin I/O Line Peripheral A Peripheral B Function
1 PA25 GPIO
2 PA29 GPIO
3 PA26 GPIO
4 PA22 GPIO
5 PA27 GPIO
6 PB21 GPIO
7 PA28 GPIO
8 N N
9 PA23 SDA II interface
10 PA24 S L II interface
11 VDD5V POWER out
12 VDD33 POWER out
13 NRST Reset I/O
14 GND GND
15 WKUP WakeUp
16 GND GND
17 VDD33 470R pullup
18 P 9 GPIO GPIO for state LED
19 P 12 GPIO GPIO(470R)
20 GND GND
J10(GPIO)
Pin I/O Line Peripheral A Peripheral B Function
SBC-SAM9G20 User manual
www.armdevs.com

1 GND GND
2 GND GND
3 PB17 GPIO
4 PB18 GPIO
5 PB22 GPIO
6 PB23 GPIO
7 PB24 GPIO
8 PB29 GPIO
9 PB3 GPIO
10 PB30 GPIO
11 PB31 GPIO
12 P 10 GPIO
13 P 15 GPIO
14 P 6 GPIO
15 P 7 GPIO
16 P 8 GPIO
17 N
18 N
19 VDD33 VDD33 Power
20 VDD33 VDD33 Power
J13(GPIO, ADC)
Pin I/O Line Peripheral A Peripheral B Function
1 GND
2 GND
3 PA0 SPI0_MISO SPI interface
4 PA2 SPI0_SP K SPI interface
5 PA1 SPI0_MOSI SPI interface
6 PA3 SPI0_NP S0 SPI interface
7 N
8 N
9 N
10 N
11 GND GND
12 VDD33 VDD33
SBC-SAM9G20 User manual
www.armdevs.com

13 VDD5v VDD5v
14 VREFP VREFP
15 AVDD AVDD
16 AGND AGND
17 P 0 AD0 AD interface
18 P 1 AD1 AD interface
19 P 2 AD2 AD interface
20 P 3 AD3 AD interface
3.15 Watchdog
The SB -SAM9G20 uses the AT91SAM9G20 on-chip Watchdog, it will output reset
signal if it can not generate external clock,so it can be used to reset system when
system hang.
3.16 RTC
The SB -SAM9G20 uses the external RT chips DS3231SN with battery hook-up
to provide accurate time keeping.
3.17 jumper
Jumper Function Description
J8
(Defualt: close) Nand S open – Nand hips not select
close – Nand hips select
J20 N N
J6
J24 120R resistor for
3.18 Buzzer and LED
The SB -SAM9G20 have a buzzer and 2 LED in the board.
The Buzzer can be controlled by PB19.
Item Function
PB19 ontrol Out =0 Buzz
Out =1 No Buzz
The Led control method:
Item Function
D3 P 12 Out = 1 No light
P 12 Out = 0 Light
SBC-SAM9G20 User manual
www.armdevs.com

D22 Power LED
SBC-SAM9G20 User manual
www.armdevs.com

Chapter 4 Software Description
4.1 Overview
This chapter provides information regarding the software that is shipped with the
SB -SAM9G20 Board. The software included with the board is U-boot boot loader,
Linux kernel 2.6.30, and root file system. The applications included provide access
to all hardware functions on the SB -SAM9G20 board.
4.2 Data Storage on SBC-SAM9G20
The default configuration of the SB -SAM9G20 Single Board omputer uses on
board NAND
FLASH for all data storage requirements, including boot strap code, boot loader,
Linux kernel, and Linux file system.
The following table is the factory default storage map on the NAND FLASH.
Table NAND FLASH Storage Map
Start Address Size Usage
0x00000000 0x20000 Boot strap code
0x00020000 0x40000 U-boot
0x00060000 0x40000 U-boot environment storage range
0x000a0000 0x200000 Linux kernel
0x002a0000 -- Root file system
4.2 SBC-SAM9G20 Linux Burning and application test.
See the user manual of "SBC-SAM9G20 Getting Start:
SBC-SAM9G20 User manual
www.armdevs.com

Chapter 5 Linux System Development
5.1 Install the Cross Compiler Tools
5.1.1 Uncompress the tools
opy the arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 to
/opt/codesourcery folder (arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-
gnu.tar.bz2 position: D:/linux/tools)
# sudo mkdir /opt/codesourcery/
# sudo tar xvjf arm-2007q1-10-arm-none-linux-gnueabi-i686-pc-linux-gnu.tar.bz2 -C /opt/
codesourcery/
# sudo cp /media/cdrom/linux/tools/mkyaffs2image /bin/
Then we can get the folder :arm-2008q3 in the /root/
5.1.2 Add Path in your environment file
Modify your ~/.bashrc file to add a new path with editor (gedit or vi)
export PATH=/opt/codesourcery/arm-2007q1/bin:$PATH
To apply this change, login again or restart the .bashrc
# source .bashrc
5.1.3 Check the tool-chain path to see if it is set up correctly or not
~$ arm-none-linux-gnueabi-gcc -v
5.2 Linux System Compile
5.2.1 AT91Bootstarp compile
copy the file Bootstrap-v1.14.tar.bz2 From D to ubuntu system in P .
•Bootstrap-v1.14.tar.bz2 position: CD:\linux\code
# mkdir bootloader
# cd bootloader
# cp -a /media/cdrom/linux/code/Bootstrap-v1.14.tar.bz2 .
# tar xvf Bootstrap-v1.14.tar.bz2
# cd Bootstrap-v1.14.tar
Then we can get the Bootstrap-v1.14.tar.bz2 folders in bootloader folder, run
the command to compile it:
SBC-SAM9G20 User manual
www.armdevs.com
Table of contents