0% found this document useful (0 votes)
13 views

Atmel 42410 Getting Started With SAML21 - ApplicationNote - AT03975

Uploaded by

Weiwei Shu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
13 views

Atmel 42410 Getting Started With SAML21 - ApplicationNote - AT03975

Uploaded by

Weiwei Shu
Copyright
© © All Rights Reserved
Available Formats
Download as PDF, TXT or read online on Scribd
You are on page 1/ 10

SMART ARM-Based Microcontroller

AT03975: Getting Started with SAM L21

APPLICATION NOTE

Descripton
® ®
This application note aims at getting started with the Atmel SAM L21 ARM
®
Cortex -M0+ based microconroller.

Features
®
• Getting started with Atmel SAM L21 microcontrollers and tools
• Atmel SAM D20 Xplained PRO and Atmel Studio 6.2 getting started

Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
Table of Contents

Descripton....................................................................................................................... 1

Features.......................................................................................................................... 1

1. Get the Device Datasheet..........................................................................................3

2. Get the SAM L21 Xplained Pro Evaluation Kit...........................................................4

3. Get the Tools..............................................................................................................5


3.1. Get Atmel Studio 6.2.................................................................................................................... 5
3.2. Get IAR Embedded Workbench for ARM..................................................................................... 5
3.3. Get Atmel Software Framework (ASF)......................................................................................... 5

4. Atmel Studio 6.2 Users Getting Started.....................................................................6

5. What's Next............................................................................................................... 8

6. Revision History.........................................................................................................9

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 2


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
1. Get the Device Datasheet
Web page: SAM L series
Document/file: Atmel SAM L21 Datasheet (summary, complete)(.pdf)
• Select the required device (i.e. ATSAML21J18A) and get the latest datasheet (.pdf file). There are
two versions:
– Complete version (includes all peripheral descriptions and electrical characteristics)
– Summary version

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 3


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
2. Get the SAM L21 Xplained Pro Evaluation Kit
Figure 2-1 SAM L21 Xplained Pro kit

Web page: SAM L21 Xplained Pro


Get the kit: Atmel Store
Document/file:
• SAM L21 Xplained Pro User Guide application note (.pdf)
Key features:
• SAML21J18A microcontroller
• One mechanical reset button
• One mechanical programmable button
®
• One QTouch button
• One yellow user LED
• Backup battery
• 32.768kHz crystal
• USB interface, device and reduced host mode
• Three Xplained Pro extension headers
• Embedded Debugger
– Auto-ID for board identification in Atmel Studio
– One yellow status LED
– One green board power LED
– Symbolic debug of complex data types icluding scope information
– Programming and debugging, including power measurements
– Data Gateway Interface: SPI, I2C, four GPIOs
– Virtual COM port (CDC)
• Embedded current measurement circuitry, with Atmel Data Visualizer support for data visualization
• USB powered
• Supported with application examples in Atmel Software Framework
The SAM L21 Xplained Pro User Guide application note covers how to power the kit, the detailed
information on board components, extension interface and the hardware guide.

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 4


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
3. Get the Tools
Atmel Studio 6.2, which uses GCC compiler, is the preferred IDE to get started with SAM L21. Atmel

Software Framework supports the IAR compiler and the ASF standalone package can be used to get
example projects for SAM L21 in the IAR IDE.

3.1. Get Atmel Studio 6.2


Web page: Atmel Studio
Document/file:
• Atmel Studio 6.2 sp2 Installer - Full (.exe)
Atmel Studio 6.2 sp2 or later is the preferred IDE for developing and debugging firmware for SAM L21.

3.2. Get IAR Embedded Workbench for ARM


® ®
Web page: IAR Embedded Workbench for ARM
Document/file: IAR installer for ARM

3.2.1. Get SAM L21 Xplained Pro Embedded Debugger Software(Segger J-link)
Web page: Segger J-link
Document/file: J-Link software
This software is required to use SAM L21 Xplained Pro embedded debugger with IAR IDE.

3.3. Get Atmel Software Framework (ASF)


Web page: Atmel Software Framework
Document/file:
• ASF update for Atmel Studio (.vsix)
• ASF standalone package for GCC makefile and IAR users (.zip)
• ASF Getting started (.pdf)
• ASF Reference manual (.pdf)
ASF online documentation for available APIs and examples can be found at Atmel Software Framework
Documentation.

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 5


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
4. Atmel Studio 6.2 Users Getting Started
Prerequisites:
• Atmel Studio 6.2 SP2 or above installed
• ASF version 3.21 or later (comes with Atmel Studio 6.2 SP2)
• The SAM L21 Xplained Pro board connected to Atmel Studio 6.2 through the embedded debugger
USB connector. The kit will be powered by the USB.
Work flow:
• Launch Atmel Studio 6.2
• The page shown in Figure 4-1 SAM L21 Xplained Pro Page in Atmel Studio on page 6 will
appear when the SAM L21 Xplained Pro board is connected to Atmel Studio 6.2
Figure 4-1 SAM L21 Xplained Pro Page in Atmel Studio

• Open ASF examples by clicking "New Example Project..."


• Select one of the examples (e.g. "Delay Service Example", see Figure 4-2 New Example Project
for SAM L21 on page 7), press OK and accept the license agreement. Then the project will be
created and opened.

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 6


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
Figure 4-2 New Example Project for SAM L21

• Open project properties ("Project->Properties" or shortcut "ALT+F7")


• In Tool view, see Figure 4-3 Debugger and Interface for SAM L21 on page 7, set "Selected
debugger/programmer" to XPRO-EDBG and "Interface" to SWD
Figure 4-3 Debugger and Interface for SAM L21

• Build the project ("Build->Build Solution" or shortcut "F7")


• Load the code into SAM L21 Xplained Pro and start debugging ("Debug->Start debugging and
break" or shortcut "ALT+F5")
• The application is programmed and the debugger breaks in main
• Run the code ("Debug->Continue" or shortcut "F5")

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 7


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
5. What's Next
For further information on related Atmel products and IDE, refer to the links below:
• Atmel Studio videos: http://www.atmel.com/microsite/atmel_studio6/default.aspx
• Atmel Studio help: "Help-> View Help" (CTRL+F1)
• ASF Getting Started: http://www.atmel.com/tools/AVRSOFTWAREFRAMEWORK.aspx
• ASF Reference Manual: http://www.atmel.com/tools/AVRSOFTWAREFRAMEWORK.aspx
• ASF online documentation: http://asf.atmel.com
• More technical documentation concerning various products: http://www.atmel.com/webdoc/

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 8


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
6. Revision History
Doc. Rev. Date Comments
42410A 02/2015 Initial document release.

Atmel AT03975: Getting Started with SAM L21 [APPLICATION NOTE] 9


Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015
Atmel Corporation 1600 Technology Drive, San Jose, CA 95110 USA T: (+1)(408) 441.0311 F: (+1)(408) 436.4200 | www.atmel.com

© 2015 Atmel Corporation. / Rev.: Atmel-42410A-Getting-Started-with-SAML21_AT03975_Application Note-02/2015

® ® ®
Atmel , Atmel logo and combinations thereof, Enabling Unlimited Possibilities , QTouch , and others are registered trademarks or trademarks of Atmel Corporation
® ®
in U.S. and other countries. ARM , Cortex and others are registered 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.

SAFETY-CRITICAL, MILITARY, AND AUTOMOTIVE APPLICATIONS DISCLAIMER: Atmel products are not designed for and will not be used in connection with any
applications where the failure of such products would reasonably be expected to result in significant personal injury or death (“Safety-Critical Applications”) without
an Atmel officer's specific written consent. Safety-Critical Applications include, without limitation, life support devices and systems, equipment or systems for the
operation of nuclear facilities and weapons systems. Atmel products are not designed nor intended for use in military or aerospace applications or environments
unless specifically designated by Atmel as military-grade. Atmel products are not designed nor intended for use in automotive applications unless specifically
designated by Atmel as automotive-grade.

You might also like