Download Print this page

Using The Boot Loader - Atmel UC3 Series Manual

32-bit microcontroller

Advertisement

7. Using the boot loader

7.1 Reprogramming the boot loader
7.2 Activating the ISP
Atmel AVR32806
12
By default, all parts are shipped with the boot loader, and so there is no need to program it
except if it has been erased with a hardware debugger (such as
ONE!) using a JTAG chip erase command (
Atmel AVR
wants to program a previous version.
If the
commands are not accessible through a DOS command, install Atmel
avr32program
AVR32 Studio 2.7.
Any of the released boot loaders can be programmed while the part is connected to a hardware
debugger through its JTAG interface. The avr32806.zip file enclosed with the application note
delivers the binary of the boot loader under the
released ISP is an
at32uc3x-isp-x.x.x.hex
command shell using the
sion 1.1.4 of the Atmel AVR UC3 C USB DFU boot loader, simply execute
in the
isp-1.1.4.cmd
releases/at32uc3c01/
The steps performed by the programming scripts (for version 1.1.4 of the AVR UC3 C ISP) are:
Issue a JTAG chip erase command to make sure the part is unprotected and free to use:
avr32program chiperase -F
Program the boot loader:
avr32program program -finternal@0x80000000 -cint -e -v -O0x80000000 -Fbin at32uc3c-
isp-1.1.4.bin
Program the boot loader configuration words in the user page:
avr32program program -finternal@0x80000000 -cint -e -v -O0x808001F8(1) -Fbin
at32uc3c-isp_cfg-1.1.2.bin
Note:
See
for a description of how to generate such a .bin file from two customized configu-
Section 7.3
ration words.
Note:
Write the general purpose fuses with their default value used by the ISP:
avr32program writefuses -finternal@0x80000000 gp=0xF877FFFF
The ISP is activated according to the boot process conditions described in
ISP activation can be requested in one of the following ways:
External point of view: Reset the part, and make sure the configured hardware conditions
are true when reset is released. By default, the hardware condition is to press the PB0 push
button on the
UC3C-EK, and so the user simply has to keep PB0 pressed while
Atmel
releasing the reset push button
Internal point of view: The programmed application can launch the ISP by setting the
ISP_FORCE configuration bit to one (and, therefore, updating the whole Configuration
Word1). The next execution of the reset vector will then systematically launch the ISP. To
launch the boot process from the application, the reset vector should be reached by
using the watchdog timer reset rather than a software jump or call to 80000000h. In
the latter case, unexpected behavior could occur because the MCU reset causes are
not updated and MCU peripherals may still be active
Once the ISP is activated, it establishes USB communication with the connected PC. This may
take a few seconds while the auto-baud feature uses the USB start-of-frame packets to deter-
/releases/at32uc3x/
file, which can be programmed under a Windows
program_at32uc3x-isp-x.x.x.cmd
folder.
Atmel AVR JTAGICE mkII
) or if the user
avr32program chiperase
folder. The binary of the
script. For example, to program ver-
./program_at32uc3c-
Figure
32166A–AVR32806–06/11
or
6-2.

Advertisement

loading