Pre-programmed bootloader for AVR UC3 A0, A1, A3, B0, B1 series.pdf

(853 KB) Pobierz
AVR32784: AVR UC3 USB DFU Bootloader
Features
Pre-programmed bootloader for AVR UC3 A0, A1, A3, B0, B1 series
USB DFU Bootloaders up to version 1.0.3
USB Protocol
– Based on the USB Device Firmware Upgrade (DFU) Class
– Autobaud (8-, 12- and 16-MHz Crystal on Osc0)
In-System Programming (ISP)
– Configurable I/O Start Conditions (default is pressing the joystick on EVK1100 and
EVK1101, SW2 button on EVK1104). Protected by 8-Bit CRC
– Can Be Forced by the General-Purpose Fuses
– Read/Write Flash on-Chip Memories
– Read Device ID
– Full-Chip Erase
– Start Application Command
AVR ® 32 32-bit
Microcontroller
AVR UC3 A0, A1,
A3, B0, B1 USB
DFU Bootloader
up to version
1.0.3
7745C–AVR32–05/09
648947787.021.png 648947787.022.png 648947787.023.png 648947787.024.png 648947787.001.png 648947787.002.png 648947787.003.png
1. Description
AVR UC3 devices with the USB feature are shipped with a USB bootloader.
This USB bootloader allows to perform In-System Programming (ISP) from a USB host control-
ler without removing the part from the system, without a pre-programmed application and
without any external programming interface other than USB.
There is one bootloader compiled for each AVR UC3 serie. The hardware I/O conditions used to
request the start of the ISP are also specific to each serie.
This document describes the USB bootloader functionalities and its usage in various contexts.
2. Related Parts
This documentation applies to the following AVR UC3 parts:
• AT32UC3A0512
• AT32UC3A0256
• AT32UC3A0128
• AT32UC3A1512
• AT32UC3A1256
• C8
• AT32UC3A3256
• AT32UC3A3256S
• AT32UC3A3128
• AT32UC3A3128S
• AT32UC3A364
• AT32UC3A364S
• AT32UC3B0512
• AT32UC3B0256
• AT32UC3B0128
• AT32UC3B064
• AT32UC3B1512
• AT32UC3B1256
• C8
• AT32UC3B164
Note: This is the list of AVR UC3 devices shipped with the pre-programmed USB DFU Bootloader
version 1.0.z. For an accurate Bootloader version per AVR UC3 devices overview, refer to
the table Pre-programmed Bootloader Versions in AVR UC3 Devices in section 8.2.
The bootloader is compiled for each AVR UC3 A0, A1, A3, B0, B1 series because of differences
in the MCU peripheral memory map. The functionalities are the same between all series.
3. Related Items
• AVR UC3 A0,A1 Series Datasheet:
http://www.atmel.com/dyn/resources/prod_documents/doc32058.pdf
• AVR UC3 B0,B1 Series Datasheet:
http://www.atmel.com/dyn/resources/prod_documents/doc32059.pdf
• AVR UC3 A3 Series Datasheet:
2
Flash and ISP specification
7745C–AVR32–05/09
648947787.004.png 648947787.005.png 648947787.006.png
Flash and ISP specification
http://www.atmel.com/dyn/resources/prod_documents/doc32072.pdf
• AVR32 UC3 Software Framework:
http://www.atmel.com/dyn/products/tools.asp?family_id=682#soft
• FLIP 3:
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=3886
• AVR32 Studio:
http://www.atmel.com/dyn/products/tools_card.asp?tool_id=4116
3
7745C–AVR32–05/09
648947787.007.png 648947787.008.png
4. Abbreviations
• ISP: In-System Programming
• BOD: Brown-Out Detector
• USB: Universal Serial Bus
• DFU: Device Firmware Upgrade
• avr32program: AVR UC3 Part Programmer for JTAGICE mkII
• FLIP: Flexible In-System Programmer
5. Bootloader Environment
The bootloader manages the USB communication protocol and performs read/write operations
from/to the on-chip memories.
The bootloader is located at the beginning of the on-chip flash array where an area of up to 64
kB can be configured to be write-protected by the internal flash controller. The bootloader pro-
tected size must be at least the size of the bootloader. On AVR UC3, it is configured to 8 kB.
Figure 5-1. Physical Environment
BatchISP is the PC tool that allows to program a part using the AVR UC3 USB DFU bootloader.
It is compatible with Windows and Linux. It is integrated into AVR32Studio thanks to a plugin.
Note that all GCC make files of the UC3 software framework have programming goals using
BatchISP.
4
Flash and ISP specification
7745C–AVR32–05/09
648947787.009.png 648947787.010.png 648947787.011.png
Flash and ISP specification
6. Inner Workings
6.1 Memory Layout
An AVR UC3 part having the bootloader programmed resets as any other part at 80000000h.
Bootloader execution begins here. The bootloader first performs the boot process to know
whether it should start the USB DFU ISP or the application. If the tested conditions indicate that
the USB DFU ISP should be started, then execution continues in the bootloader area, i.e.
between 80000000h and 80002000h, else the bootloader launches the application at
80002000h.
The conditions tested by the boot process are configured by the general-purpose fuse bits
located outside of the MCU address space and by a 32-bit configuration word located at the end
of the flash User page.
Figure 6-1. AT32UC3A0512 Non-Volatile Memory Layout with USB DFU Bootloader
32-bit bootloader
configuration word is
@ 808001FCh
MCU Address Space
User page is
@ 80800000h
Flash User Page
512 B
32 GP Fuse
Bits
Free Flash Space
504 kB
512-kB
Flash
Array
Application
Application is
@ 80002000h
Reset vector is
@ 80000000h
Bootloader
8 kB
6.2 Configuration
The bootloader has a configuration which determines the behavior of the boot process and of
the ISP. This configuration is non-volatile and is stored on the one hand in the 32 general-pur-
pose fuse bits and on the other hand in the flash User page (see Figure 6-1).
See the AVR UC3 datasheets referred to by Section 3 for further information about the general-
purpose fuse bits and the flash User page.
6.2.1 General-Purpose Fuse Bits
The AVR UC3 have 32 general-purpose fuse bits. When these bits are erased, they are at 1b.
The AVR UC3 devices are shipped with:
• For AVR UC3 A0, A1: the general-purpose fuses set to FC07FFFFh.
• For AVR UC3 A3: the general-purpose fuses set to FFF7FFFFh.
• For AVR UC3 B0, B1: the general-purpose fuses set to FC07FFFFh.
5
7745C–AVR32–05/09
648947787.012.png 648947787.013.png 648947787.014.png 648947787.015.png 648947787.016.png 648947787.017.png 648947787.018.png 648947787.019.png 648947787.020.png
Zgłoś jeśli naruszono regulamin