View detail for Atmel AT03293: Getting started with SAM D20

APPLICATION NOTE
Atmel AT03293: Getting started with SAM D20
Atmel 32-bit Microcontrollers
Features
•
•
Getting started with Atmel® SAM D20 microcontrollers and tools
Atmel SAM D20 Xplained PRO and Atmel Studio 6.1 getting started
Description
This application note aims at helping the reader to get started with the
Atmel SAM D20 ARM® Cortex®-M0+ based microcontroller.
42147A−SAM−06/2013
1.
Getting the Device Datasheet
Web page: http://www.atmel.com/products/microcontrollers/arm/sam_d20.aspx?tab=documents
Document: Atmel SAM D20 Datasheet (summary, complete) (.pdf)
•
2.
Select the required device (ie. ATSAMD20J18) and get the latest datasheet (.pdf file). There are two versions:
•
Complete version (includes all peripheral descriptions and electrical charachteristics)
•
Summary version
Get the SAM D20 Xplained Pro Evaluation Kit
Web page: http://www.atmel.com/tools/ATSAMD20-XPRO.aspx
Get the kit: http://store.atmel.com
Document/file:
•
SAM D20 Xplained Pro User Guide application note (.pdf)
Key features:
•
•
•
•
•
•
•
•
•
SAMD20J18 microcontroller
One mechanical reset button
One mechanical programmable button
One yellow user LED
USB interface, host and device function (shared physical interface)
32.768kHz crystal
12MHz crystal
3 Xplained Pro extension headers
USB powered
Atmel AT03293: Getting started with SAM D20 [APPLICATION NOTE]
42147A−SAM−06/2013
2
•
•
Supported with application examples in Atmel Software Framework
Embedded Debugger
•
Auto ID for board identification in Atmel Studio 6.1
•
One yellow status LED
•
One green board power LED
•
Symbolic debug of complex data types including scope information
•
Programming
•
Data Gateway Interface: USART, TWI, 4 GPIOs
•
Virtual COM port (CDC)
The SAM D20 Xplained Pro User Guide application note covers how to power the kit, the detailed information of the on
board components, extension interface and the hardware guide.
3.
Get the Tools
Atmel Studio 6.1 is the preferred IDE to get started with the SAM D20 device and GCC compiler. IAR™ compiler is
supported as well.
3.1
Get Atmel Studio 6
Web page: www.atmel.com/atmelstudio
Document/file:
•
Atmel Studio 6-1 installer (.exe)
Atmel Studio 6.1 is the IDE for developing and debugging firmware for the SAM D20 microcontroller.
3.2
Get IAR Embedded Workbench for ARM
Web page: http://www.iar.com/en/Products/IAR-Embedded-Workbench/ARM/
Document/file: IAR installer for ARM
3.2.1
Get SAM D20 Xplained Pro Embedded Debugger Software (Segger J-Link)
Web page: http://www.segger.com/jlink-software.html
Document/file: J-Link software
This software is required to use the SAM D20 Xplained Pro embedded debugger with IAR IDE.
3.3
Get Atmel Software Framework (ASF)
Web page: www.atmel.com/asf
Document/file:
•
•
•
•
ASF update for Atmel Studio (.vsix)
ASF standalone package for GCC makefile and IAR users
ASF: Getting started (.pdf)
ASF: Reference Manual (.pdf)
ASF online documentation for available API and examples can be found at http://asf.atmel.com.
Atmel AT03293: Getting started with SAM D20 [APPLICATION NOTE]
42147A−SAM−06/2013
3
4.
Atmel Studio 6.1 Users Getting Started
Requirements:
•
•
•
Atmel Studio 6.1 SP1 or above installed
ASF version 3.9.1 or above installed (comes with Atmel Studio 6.1 SP1)
SAM D20 Xplained Pro board connected to Atmel Studio 6.1 through the embedded debugger USB connector.
The kit will be powered by the USB.
Getting started with Atmel Studio 6.1, ASF and SAM D20 Xplained Pro:
•
•
Launch Atmel Studio 6.1
•
•
To open ASF examples, click “New Example Project…”
Connect the SAM D20 Xplained Pro board to the PC using a USB cable. The following page will appear:
Select one of the examples (e.g. “Delay Service Example”), press OK and accept the license agreement. Then
the project will be created and opened.
Atmel AT03293: Getting started with SAM D20 [APPLICATION NOTE]
42147A−SAM−06/2013
4
5.
•
•
Open project properties (Project -> Properties or shortcut Alt+f7)
•
•
Build the project: Build -> Build solution or shortcut F7
•
•
The application is programmed and the debugger breaks in main
In Tool view, set selected debugger/programmer to XPRO-EDBG and interface to SWD
To load the code in the SAM D20 Xplained Pro and debug, select Debug -> Start debugging and break
(shortcut Alt + F5)
To run the code, select Debug -> Continue (shortcut F5)
What’s Next
•
•
Atmel Studio videos:
www.atmel.com/atmelstudio
Atmel Studio help:
Help -> View Help (Ctrl+F1)
Atmel AT03293: Getting started with SAM D20 [APPLICATION NOTE]
42147A−SAM−06/2013
5
•
•
•
ASF Getting Started:
www.atmel.com/asf
ASF online documentation: asf.atmel.com
ASF Reference manual:
asf.atmel.com
Atmel AT03293: Getting started with SAM D20 [APPLICATION NOTE]
42147A−SAM−06/2013
6
6.
Revision History
Doc. Rev.
Date
Comments
42147A
06/2013
Initial revision
Atmel AT03293: Getting started with SAM D20 [APPLICATION NOTE]
42147A−SAM−06/2013
7
Atmel Corporation
Atmel Asia Limited
Atmel Munich GmbH
Atmel Japan G.K.
1600 Technology Drive
Unit 01-5 & 16, 19F
Business Campus
16F Shin-Osaki Kangyo Building
San Jose, CA 95110
BEA Tower, Millennium City 5
Parkring 4
1-6-4 Osaki
USA
418 Kwun Tong Road
D-85748 Garching b. Munich
Shinagawa-ku, Tokyo 141-0032
Tel: (+1)(408) 441-0311
Kwun Tong, Kowloon
GERMANY
JAPAN
Fax: (+1)(408) 487-2600
HONG KONG
Tel: (+49) 89-31970-0
Tel: (+81)(3) 6417-0300
www.atmel.com
Tel: (+852) 2245-6100
Fax: (+49) 89-3194621
Fax: (+81)(3) 6417-0370
Fax: (+852) 2722-1369
© 2013 Atmel Corporation. All rights reserved. / Rev.: 42147A−SAM−06/2013
Atmel®, Atmel logo and combinations thereof, Enabling Unlimited Possibilities®, and others are registered trademarks or trademarks of Atmel Corporation or its
subsidiaries. ARM®, Cortex® and others are registered trademarks or trademarks of ARM Ltd. Other terms and product names may be trademarks of others.
Disclaimer: The information in this document is provided in connection with Atmel products. No license, express or implied, by estoppel or otherwise, to any intellectual property right is granted by this
document or in connection with the sale of Atmel products. EXCEPT AS SET FORTH IN THE ATMEL TERMS AND CONDITIONS OF SALES LOCATED ON THE ATMEL WEBSITE, ATMEL ASSUMES
NO LIABILITY WHATSOEVER AND DISCLAIMS ANY EXPRESS, IMPLIED OR STATUTORY WARRANTY RELATING TO ITS PRODUCTS INCLUDING, BUT NOT LIMITED TO, THE IMPLIED
WARRANTY OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE, OR NON-INFRINGEMENT. IN NO EVENT SHALL ATMEL BE LIABLE FOR ANY DIRECT, INDIRECT,
CONSEQUENTIAL, PUNITIVE, SPECIAL OR INCIDENTAL DAMAGES (INCLUDING, WITHOUT LIMITATION, DAMAGES FOR LOSS AND PROFITS, BUSINESS INTERRUPTION, OR LOSS OF
INFORMATION) ARISING OUT OF THE USE OR INABILITY TO USE THIS DOCUMENT, EVEN IF ATMEL HAS BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. Atmel makes no
representations or warranties with respect to the accuracy or completeness of the contents of this document and reserves the right to make changes to specifications and products descriptions at any time
without notice. Atmel does not make any commitment to update the information contained herein. Unless specifically provided otherwise, Atmel products are not suitable for, and shall not be used in,
automotive applications. Atmel products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life.