EasyManuals Logo

Atmel AVR XMEGA AU series User Manual

Atmel AVR XMEGA AU series
512 pages
To Next Page IconTo Next Page
To Next Page IconTo Next Page
To Previous Page IconTo Previous Page
To Previous Page IconTo Previous Page
Page #442 background imageLoading...
Page #442 background image
442
8331B–AVR–03/12
Atmel AVR XMEGA AU
1. Load the Z-pointer with the byte address to read.
2. Load the NVM CMD register with the read user signature row / calibration row
command
3. Execute the LPM instruction.
The destination register will be loaded during the execution of the LPM instruction.
To ensure that LPM for reading flash will be executed correctly it is adviced to disable interrupt
while using either of these commands.
33.11.3 NVM Fuse and Lock Bit Commands
The NVM flash commands that can be used for accessing the fuses and lock bits are listed in
Table 33-3.
For self-programming of the fuses and lock bits, the trigger for action-triggered commands is to
set the CMDEX bit in the NVM CTRLA register (CMDEX). The read-triggered commands are
triggered by executing the (E)LPM instruction (LPM). The write-triggered commands are trig-
gered by a executing the SPM instruction (SPM).
The Change Protected column indicates whether the trigger is protected by the configuration
change protection (CCP) during self-programming or not. The last two columns show the
address pointer used for addressing and the source/destination data register.
Section 33.11.3.1 on page 442 through Section 33.11.3.2 on page 442 explain in detail the algo-
rithm for each NVM operation.
33.11.3.1 Write Lock Bits
The write lock bits command is used to program the boot lock bits to a more secure settings from
software.
1. Load the NVM DATA0 register with the new lock bit value.
2. Load the NVM CMD register with the write lock bit command.
3. Set the CMDEX bit in the NVM CTRLA register. This requires the timed CCP sequence
during self-programming.
The BUSY flag in the NVM STATUS register will be set until the command is finished. The CPU
is halted during the complete execution of the command.
This command can be executed from both the boot loader section and the application section.
The EEPROM and flash page buffers are automatically erased when the lock bits are written.
33.11.3.2 Read Fuses
The read fuses command is used to read the fuses from software.
1. Load the NVM ADDR register with the address of the fuse byte to read.
Table 33-3. Fuse and lock bit commands.
CMD[6:0] Group Configuration Description Trigger
CPU
Halted
Change
Protected
NVM
Busy
Address
Pointer
Data
Registe
r
0x00 NO_OPERATION No operation - - - - - -
Fuses and Lock Bits
0x07 READ_FUSES Read fuses CMDEX Y N Y ADDR DATA
0x08 WRITE_LOCK_BITS Write lock bits CMDEX N Y Y ADDR -

Table of Contents

Questions and Answers:

Question and Answer IconNeed help?

Do you have a question about the Atmel AVR XMEGA AU series and is the answer not in the manual?

Atmel AVR XMEGA AU series Specifications

General IconGeneral
BrandAtmel
ModelAVR XMEGA AU series
CategoryMicrocontrollers
LanguageEnglish

Related product manuals