11.07.2015 Views

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

ATMega chip full datasheet - UCSD Department of Physics

SHOW MORE
SHOW LESS
  • No tags were found...

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

ATmega48A/PA/88A/PA/168A/PA/328/P27. Boot Loader Support – Read-While-Write Self-ProgrammingThe Boot Loader Support applies to ATmega88A/88PA/168A/168PA/328/328P27.1 Features27.2 Overview• Read-While-Write Self-Programming• Flexible Boot Memory Size• High Security (Separate Boot Lock Bits for a Flexible Protection)• Separate Fuse to Select Reset Vector• Optimized Page (1) Size• Code Efficient Algorithm• Efficient Read-Modify-Write SupportNote: 1. A page is a section in the Flash consisting <strong>of</strong> several bytes (see Table 28-11 on page 302)used during programming. The page organization does not affect normal operation.In ATmega88A/88PA/168A/168PA/328/328P the Boot Loader Support provides a real Read-While-Write Self-Programming mechanism for downloading and uploading program code by theMCU itself. This feature allows flexible application s<strong>of</strong>tware updates controlled by the MCU usinga Flash-resident Boot Loader program. The Boot Loader program can use any available datainterface and associated protocol to read code and write (program) that code into the Flashmemory, or read the code from the program memory. The program code within the Boot Loadersection has the capability to write into the entire Flash, including the Boot Loader memory. TheBoot Loader can thus even modify itself, and it can also erase itself from the code if the featureis not needed anymore. The size <strong>of</strong> the Boot Loader memory is configurable with fuses and theBoot Loader has two separate sets <strong>of</strong> Boot Lock bits which can be set independently. This givesthe user a unique flexibility to select different levels <strong>of</strong> protection.27.3 Application and Boot Loader Flash SectionsThe Flash memory is organized in two main sections, the Application section and the BootLoader section (see Figure 27-2). The size <strong>of</strong> the different sections is configured by theBOOTSZ Fuses as shown in Table 27-7 on page 292 and Figure 27-2. These two sections canhave different level <strong>of</strong> protection since they have different sets <strong>of</strong> Lock bits.27.3.1 Application SectionThe Application section is the section <strong>of</strong> the Flash that is used for storing the application code.The protection level for the Application section can be selected by the application Boot Lock bits(Boot Lock bits 0), see Table 27-2 on page 284. The Application section can never store anyBoot Loader code since the SPM instruction is disabled when executed from the Applicationsection.27.3.2 BLS – Boot Loader SectionWhile the Application section is used for storing the application code, the The Boot Loader s<strong>of</strong>twaremust be located in the BLS since the SPM instruction can initiate a programming whenexecuting from the BLS only. The SPM instruction can access the entire Flash, including theBLS itself. The protection level for the Boot Loader section can be selected by the Boot LoaderLock bits (Boot Lock bits 1), see Table 27-3 on page 284.8271D–AVR–05/11280

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!