Atmel AVR1605 Quick Start Manual
Atmel AVR1605 Quick Start Manual

Atmel AVR1605 Quick Start Manual

Xmega boot loader 8-bit avr microcontrollers

Advertisement

Quick Links

AVR1605: XMEGA™ Boot Loader Quick Start
Features
• XMEGA boot loader
• AVROSP compatible
• Example application
• C-code sample application for Self Programming
• Read and Write Both Flash and EEPROM Memories
• Read and Write Lock Bits
• Read Fuse Bits
1 Introduction
This application note describes how to use a boot loader application with one of the
XMEGA family devices (i.e. ATxmega128A1) and how an AVR
Program Memory (SPM) instruction can be configured for Self-programming. The
sample application communicates via the UART with a PC running the AVR Open
Source Programmer (AVROSP) from Application note AVR911. This enables the
user to download Applications into Flash, Data to EEPROM and to read/write fuses
without the need for an external programmer. The example software is using the
ATxmega128A1 device with STK
Electronic designs including a microcontroller always need to be equipped with a
firmware, be it a portable music player, a hairdryer or a sewing machine. As many
Electronic designs evolve rapidly there is a growing need for being able to update
Products, which have already been shipped or sold. It may prove difficult to make
changes to the hardware, especially if the product has already reached the end
customer. But the firmware can easily be updated on products based on Flash
microcontrollers, such as the AVR family.
Many AVR microcontrollers are configured such that it is possible to create a boot
loader able to receive firmware updates and to reprogram the Flash memory on
demand. The program memory space is divided in two sections: the Boot loader
Section (BLS) and the Application Section. A Boot Loader program is placed inside
the Boot Section of the Flash memory. This program handles communication with
the host PC, and facilitates programming of both Flash and EEPROM. Once
programmed, different levels of protection can be individually applied to both the
boot and application portion of the Flash memory. The AVR thus offers a unique
flexibility, allowing the user extensive degrees of memory protection.
For general information about self programming please refer to application note
AVR109: Self programming.
Guide
®
600 as a target board.
8-bit
Microcontrollers
Application Note
Preliminary
®
with the Store
Rev. 8242A-AVR-05/09

Advertisement

Table of Contents
loading

Summary of Contents for Atmel AVR1605

  • Page 1 AVR1605: XMEGA™ Boot Loader Quick Start Guide Features • XMEGA boot loader 8-bit • AVROSP compatible Microcontrollers • Example application • C-code sample application for Self Programming • Read and Write Both Flash and EEPROM Memories • Read and Write Lock Bits Application Note •...
  • Page 2 Figure 1-1. Purpose of Bootloader AVR1605 8242A-AVR-05/09...
  • Page 3: Getting Up And Running

    AVR1605 2 Getting up and running This section walks you through the basic steps for getting up and running, by setting up the hardware. The necessary setup and requirements are described along with relevant information. 2.1 Hardware Setup This section gives the step by step procedure to setup the hardware for the experiment.
  • Page 4 Figure 2.2-1. PATH Configuration 1 Figure 2.2-2. PATH Configuration 2 AVR1605 8242A-AVR-05/09...
  • Page 5: Starting A Debug Session

    AVR1605 Figure 2.2-3. PATH Configuration 3 2.3 Starting a debug session This section gives the step by step procedure to start the debugging session on the device. Start IAR (v5.12C or later) and select the option “Open existing workspace”. Browse for the folder downloaded along with this Application note (hereafter called as target folder) and select bootloader.eww for debugging.
  • Page 6: Chip Erase

    COM1, the device specific file is parsed for the ATxmega128A1 by AVROSP and the output file is placed in the AVROSP_Test directory. Further, the signature is matched and a chip erase is performed by the following operations: 1) Given COM port number is scanned AVR1605 8242A-AVR-05/09...
  • Page 7 AVR1605 2) Communicates with AVRBOOT 3) Enters programming mode 4) XML file is parsed and new XML file is generated in the current working folder 5) Signature is checked to match 6) Chip erase is performed 7) Leaves the programming mode 3.2 Write a file to flash...
  • Page 8 Give any name(eg:Test) for that session and configure the COM port settings to 9600 baud, 8bit Data, no parity, 1 stop bit and no Handshaking. Please refer Figure 3.3- 1.Hyperterminal Name and Figure 3.3-2.COM port Settings for more information. Figure 3.3-1 HyperTerminal Name AVR1605 8242A-AVR-05/09...
  • Page 9 AVR1605 Figure 3.3-2 COM port Settings Enter the character ‘E’ in the transmission blank space. In return you will receive a string “Congratulations!” from the device ensuring the proper operation of the application loaded in the device through boot loader.
  • Page 10 External RESET and SW0 buttons on STK600 and release the RESET first and then the SW0]. Run the batch file x128A1_flash_dump.bat which has the AVROSP command given below to dump the contents of the FLASH to the file fdump.hex AVROSP -dATxmega128A1 -rf -offdump.hex AVR1605 8242A-AVR-05/09...
  • Page 11 AVR1605 4 Doxygen Documentation All source code is prepared for automatic documentation generation using Doxygen. Doxygen is a tool for generating documentation from source code by analyzing the source code and using special keywords. For more details about Doxygen please visit http://www.doxygen.org.
  • Page 12 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.

Table of Contents