AVR32777: AT32UC3L-EK Getting Started Guide Features • Powering up the Board • Setup and Description of the Touch Demo Firmware Communicating with Atmel® AVR® QTouch Studio® 4.2 or higher 1 Introduction 32-bit Microcontrollers Application Note The Atmel AT32UC3L-EK is a reference design and development system for the Atmel 32-bit AVR AT32UC3L064 microcontroller from Atmel Corporation. The kit is equipped with a rich set of peripherals that makes the AT32UC3L-EK a perfect evaluation platform. This guide shows the user how to quickly get started with this kit. Figure 1-1. AT32UC3L-EK rev2 board Rev. 32149A-AVR-07/10 2 Powering up the Board The Atmel AT32UC3L-EK offers three interfaces to power the board; from the USB VCP interface, from a battery (J3 connector on the bottom side of the board) or from an external source connected to the J2 header. If more than one power source are applied at the same time, the following priorities are used to select the current valid power source: 1. USB VCP 2. External power supply (header J2) 3. Battery (connector J3) This means that if the board is connected to a USB host it has the highest priority and will therefore serve as the current power supply. Other power supplies that are connected to the board at the same time will be ignored. The input range on the external power supply header is from 3.3V to 5V. To power the board from the USB VCP connector, use the “Mini-B plug to std-A plug 1.5m USB2.0” cable that is included in the kit and connect it between the host and the board USB VCP connector. To power the board from the battery (included in the kit): • insert the battery in the J3 connector (on the bottom side), making sure the side of the battery with the + sign sticker is in contact with the + sign of the J3 connector (see Figure 2-2), • press the SW2 switch to activate the use of the battery. When the board is powered, the green LED (marked “POWER”) will light up and the default board firmware will start to run. More information about the different power inputs is available in the hardware user’s guide. 2 AVR32777 32149A-AVR-07/10 AVR32777 Figure 2-1. Possible power input interfaces on the Atmel AT32UC3L-EK Battery connector below here J2 external power supply USB VCP Power LED SW2 switch Figure 2-2. Battery and J3 connector (bottom view detail): the side of the battery with the + sign sticker is in contact with the + sign of the J3 connector If the battery is connected while the USB power source is being used, a trickle charge of the battery occurs. 3 32149A-AVR-07/10 3 Touch Demonstration firmware communicating with Atmel AVR QTouch Studio Requirements: • Atmel AT32UC3L-EK rev2 • Atmel AVR QTouch Studio v4.2 (or higher) The default pre-loaded demonstration firmware on the AT32UC3L-EK allows controlling the LEDs with the on-board touch sensors. If the kit is connected to a PC with AVR QTouch Studio installed and up and running, the on-board touch events are represented visually in the Virtual Kit View tab as a solid green disc or in the QTouch Graph View tab. The demonstration can be used in a basic environment setup (only the AT32UC3LEK rev2 powered with a battery (included with the kit)) or in a more advanced environment setup (the AT32UC3L-EK rev2 connected to a PC through USB, with AVR QTouch Studio installed on the PC). In the latter setup, all touch events on the UC3L are sent to AVR QTouch Studio through USB (the on-board Atmel AT32UC3B1256 device acting as a UART to USB gateway). Figure 3-1. Overview of the demonstration AVR QTouch Studio 4.2 or higher USB Touch events have an effect on the LEDs. 4 AVR32777 32149A-AVR-07/10 AVR32777 Figure 3-2. Touch sensors and LEDs location Touch wheel UP LEDs LEFT PLAY RIGHT / PAUSE DOWN 3.1 Description of the Demonstration Whether the board is connected to a PC running Atmel AVR QTouch Studio or not, the control and the feedback of the Atmel AT32UC3L-EK demonstration firmware are described as follows: • Prologue of the demo: All 4 LEDs blink 3 times simultaneously with PWM fading effect. Then all LEDs are off. • The wheel engages the GPIO PWM to create a 256 level “bar” on the 4 LEDs. Rotating clockwise will gradually light up the bottom LED in 64 steps, and the LED above it will begin to glow, and so on until all 4 LEDs are fully lit. Turning another clockwise round will have no effect. Turning anticlockwise one round will make it gradually decrease the 256 level counters, thus causing the bar to fade downwards until you hit 0. • Pushing Play/Pause starts an automatic running lights sequence on all 4 LEDs. The PWM is used to create fading effect. Use the Up and Down arrows to increase or decrease the speed of the automatic running lights sequence. • The Up and Down arrows are used to turn the 4 LEDs fully on (quick push on up), off (quick push on down), and gradually fading on and off (keep up or down pushed for 0.5 seconds, use 2.5 seconds to go from rail to rail, like a dimming light switch). While the automatic running lights sequence is active, the Up and Down arrows are used to increase or decrease the speed of that sequence. • The Right arrow engages the GPIO PWM to create a 256 level “bar” on the 4 LEDs. Keep the right arrow pushed to gradually light up the bottom LED in 64 steps, then the LED above it will begin to glow, and so on until all 4 LEDs are fully lit. Keep the Left arrow pushed to gradually decrease the 256 level counter, thus causing the bar to fade downwards until you hit 0. 3.2 Demonstration setup 3.2.1 Connect the AT32UC3L-EK USB to a USB port of a PC The prologue of the demo executes then all touch sensors are available to play the demo (see section 3.1 Description of the Demonstration for a description of the features associated with each touch sensor). 5 32149A-AVR-07/10 3.2.2 Launch Atmel AVR QTouch Studio 4.2 (or higher) on the PC It will come up with a Virtual Kit View Tab containing a drawing of the Atmel AT32UC3L-EK. To get the touch events from the AT32UC3L-EK rev2, click on the “Start Reading” button if “Auto-start Reading” is not checked on. From then on, all touch events on the board can be visualized on AVR QTouch Studio (as a solid green disc in the Virtual Kit View tab, or as graphs in the QTouch Graph View tab). Figure 3-3. AVR QTouch Studio 4.2 snapshot The Virtual Kit View Tab The Start Reading button Touch Events on the kit The QTouch Graph View Tab 6 AVR32777 32149A-AVR-07/10 AVR32777 4 References and Further Information What to do next? What is the next step? If you want more detailed information concerning the hardware of this kit, if you want to check out all existing application notes and software running on this kit, and/or if you want to start a development whether for evaluation or rapid prototyping, the following sections lists the main available resources to actually get beyond getting started: • • • • • Schematic and BOM Application notes Software Framework Tools Support 4.1 Detailed Hardware References (and associated Errata) More detailed hardware information for this kit can be found on the ATMEL web page dedicated to this kit: www.atmel.com/uc3l-ek/ The Atmel AT32UC3L family of devices is specified in the UC3L Series datasheet: http://www.atmel.com/dyn/resources/prod_documents/doc32099.pdf. Always use this document as a reference throughout the development life cycle of an application destined to run on a UC3L device. The Atmel 32-bit AVR architecture manual can be found here: http://www.atmel.com/dyn/resources/prod_documents/doc32000.pdf The Atmel 32-bit AVR UC technical reference guide can be found here: http://www.atmel.com/dyn/resources/prod_documents/doc32002.pdf 4.2 Application Notes Running on this Kit To investigate further on the AT32UC3L and/or the Atmel AT32UC3L-EK, several application notes are supported by this kit. These can be found on the ATMEL web page dedicated to this kit: www.atmel.com/uc3l-ek/. All the Atmel 32-bit AVR application notes can be found on this Atmel web page: http://www.atmel.com/dyn/products/app_notes.asp?family_id=607 Note that some application notes are bundled with a stand-alone software package. To be able to build the software example and program the binary and step through the code in debug mode, tools are necessary: References to the tools are mentioned in all application notes but are also given below here. 4.3 Atmel AVR Software Framework To start a development whether for evaluation or rapid prototyping, the AVR Software Framework is a complete and useful source of existing source code a developer can start from. It has been designed to help develop and glue together the different components of a software design, and to be easily integrated into an operating system (OS) as well as to operate in a stand-alone way. See the “Tools & Software” topic on http://www.atmel.com/avr. 7 32149A-AVR-07/10 To be able to build the software example and program the binary and step through the code in debug mode, other tools are necessary: References to these tools are provided below here. 4.4 Tools To be able to develop applications for Atmel 32-bit AVR devices and build binaries for 32-bit AVR targets and program a 32-bit AVR device, ATMEL and its partners provide several tools supported on multiple host targets. 4.4.1 IDE and Compilers: Design Software • Atmel AVR32 Studio: AVR32 Studio is a free Integrated Development Environment (IDE) for 32-bit AVR that enables you to write, build, deploy and debug your C/C++ and assembler code. It also includes the Atmel AVR32 Software Framework plug-in. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4116. This web page also contains all AVR32 Studio-related application notes. • Atmel AVR32 GNU Toolchain: AVR32 GNU Toolchain is a set of standalone command line programs used to create applications for Atmel 32-bit AVR microcontrollers. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4118. • Atmel IAR Embedded Workbench: IAR Embedded Workbench with its optimizing C and C++ compiler provides full support and generates very compact and efficient code for 32-bit AVR devices of the AP7000 and UC3 families. http://www.iar.se/website1/1.0.1.0/124/1/ 4.4.2 Programming and On-Chip Debugging Tools: Debug Tools • Atmel AVR JTAGICE mkII: The AVR JTAGICE mkII from Atmel is a powerful development tool for On-chip Debugging of all AVR 8-bit RISC MCUs and AVR 32-bit DSP/MCUs with IEEE 1149.1 compliant JTAG interface. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3353 • Atmel AVR ONE!: The AVR ONE! is a powerful development tool for on-chip debugging and programming of all 32-bit AVR and Atmel AVR XMEGA™ devices. http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4279 • Atmel AVR Dragon: The AVR Dragon sets a new standard for low cost development tools. AVR Dragon supports all programming modes for the AVR device family. http://www.atmel.com/dyn/Products/tools_card.asp?tool_id=3891 4.5 Support Atmel has several support channels available: • Web portal: http://support.atmel.no/ All Atmel microcontrollers • Email: [email protected] All Atmel AVR products • Email: [email protected] All Atmel 32-bit AVR products Please register on the web portal to gain access to the following services: • • • • 8 Access to a rich FAQ database Easy submission of technical support requests History of all your past support requests Register to receive Atmel microcontrollers’ newsletters AVR32777 32149A-AVR-07/10 Disclaimer Headquarters International Atmel Corporation 2325 Orchard Parkway San Jose, CA 95131 USA Tel: 1(408) 441-0311 Fax: 1(408) 487-2600 Atmel Asia Unit 1-5 & 16, 19/F BEA Tower, Millennium City 5 418 Kwun Tong Road Kwun Tong, Kowloon Hong Kong Tel: (852) 2245-6100 Fax: (852) 2722-1369 Atmel Europe Le Krebs 8, Rue Jean-Pierre Timbaud BP 309 78054 Saint-Quentin-enYvelines Cedex France Tel: (33) 1-30-60-70-00 Fax: (33) 1-30-60-71-11 Atmel Japan 9F, Tonetsu Shinkawa Bldg. 1-24-8 Shinkawa Chuo-ku, Tokyo 104-0033 Japan Tel: (81) 3-3523-3551 Fax: (81) 3-3523-7581 Technical Support [email protected] Sales Contact www.atmel.com/contacts Product Contact Web Site www.atmel.com Literature Request www.atmel.com/literature 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 ATMEL’S TERMS AND CONDITIONS OF SALE LOCATED ON ATMEL’S WEB SITE, 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 OF 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 product 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’s products are not intended, authorized, or warranted for use as components in applications intended to support or sustain life. © 2010 Atmel Corporation. All rights reserved. Atmel®, Atmel logo and combinations thereof, AVR®, AVR® logo, AVR Studio® and others, are the registered trademarks, XMEGA™ and others are trademarks of Atmel Corporation or its subsidiaries. Other terms and product names may be trademarks of others. 32149A-AVR-07/10