Installing the Bootloader

Compile the bootloader and then download it to the target using Atmel Studio 7 or later. Before running the bootloader, the following fuse bits must be configured:

Note: Pay special attention in setting oscillator options correctly. Even a small misadjustment could result in communication failure.

Recommended fuse bit settings are provided in the table below. See the device data sheet for detailed explanation of device dependent fuse bits.

Table 1. Recommended Fuse Bits
M8, M8515, M8535, M16, M162, M169, M32, M64 M128 328PB
BOOTSZ1:0 0:0 0:1 0:1
BOOTRST 0 0 0
Note: “0” means programmed, “1” means not programmed.

It is recommended to program lock bits to protect both the application memory and the bootloader, but only after fuse bits have been set. Lock bits can be programmed using Microchip IDE (Atmel Studio 7 or later). BLS lock bits will also be set during firmware update, provided that they have been defined as command line arguments when the firmware is encrypted. The recommended lock bit settings are:

Note: It is important to understand that if the device is not properly locked then the memory can be accessed via an ISP interface and the whole point of encrypting the firmware is gone.

Recommended lock bit setting for present AVR MCUs are given in the table below. See the device data sheet for a detailed explanation of lock bits.

Table 2. Recommended Lock Bits

M8, M8515, M8535, M16,

M162, M169, M32, M64, M128

328PB
BLB12 : BLB11 0 0 0 0
BLB02 : BLB01 1 1 1 1
LB2 : LB1 0 0 0 0