There are two versions of the bootloader provided in the distribution archive.
BootLoader8.hex is designed to work with an 8 MHz clock and
BootLoader16.hex is designed to work with a 16 MHz clock. The SunRom development boards have a 16 MHz clock, so we will be using the
In order to program the bootloader onto the ATmega32 microcontroller, you will need an USB AVRISP programmer, a 6-to-10 pin adapter and have AVR Studio installed.
- Connect the PC to the SunRom board via the AVRISP programmer.
- Start AVR Studio and select
Cancelon the initial dialog.
- Select Program AVR -> Connect from the Tools menu.
- Select the AVRISP mkII platform and USB port and select Connect.
- On the Fuses tab, select the following options (make sure all others are deselected) and program it:
- Boot Flash section size = 1024 words
- Boot reset vector enabled
- Brown-out detection level at VCC=2.7V; [BODLEVEL=1]
- Ext. Crystal/Resonator High Freq: Start-up time 16CK + 4ms
- On the Program tab, enter
D:\Atmel\ATmon\BootLoader16.hexin the Input HEX File field of the Flash section and select Program.
- On the LockBits tab, select the following options and program it:
- Mode 1: No memory lock features enabled
- Application Protection Mode 1: No lock on SPM and LPM in Application Section
- Boot Loader Protection Mode 2: SPM prohibited in Boot Loader Section