English
Language : 

AT91SAM7S64_05 Datasheet, PDF (97/491 Pages) ATMEL Corporation – AT91 ARM Thumb-based Microcontrollers
AT91SAM7S64 Preliminary
19.2.4.4
A programming error, where a bad keyword and/or an invalid command have been written in the
MC_FCR register, may be detected in the MC_FSR register after a programming sequence.
The Unlock command programs the lock bit to 1; the corresponding bit LOCKSx in MC_FSR
reads 0. The Lock command programs the lock bit to 0; the corresponding bit LOCKSx in
MC_FSR reads 1.
Note: Access to the Flash in Read Mode is permitted when a Lock or Unlock command is performed.
General-purpose NVM Bits
General-purpose NVM bits do not interfere with the embedded Flash memory plane. These gen-
eral-purpose bits are dedicated to protect other parts of the product. They can be set (activated)
or cleared individually. Refer to the product definition section for the general-purpose NVM bit
action.
The activation sequence is:
• Start the Set General Purpose Bit command (SGPB) by writing the Flash Command Register
with the SEL command and the number of the general-purpose bit to be set in the PAGEN
field.
• When the bit is set, the bit FRDY in the Flash Programming Status Register (MC_FSR) rises.
If an interrupt has been enabled by setting the bit FRDY in MC_FMR, the interrupt line of the
Memory Controller is activated.
Two errors can be detected in the MC_FSR register after a programming sequence:
• Programming Error: A bad keyword and/or an invalid command have been written in the
MC_FCR register
• If the general-purpose bit number is greater than the total number of general-purpose bits,
then the command has no effect.
It is possible to deactivate a general-purpose NVM bit set previously. The clear sequence is:
• Start the Clear General-purpose Bit command (CGPB) by writing the Flash Command
Register with CGPB and the number of the general-purpose bit to be cleared in the PAGEN
field.
• When the clear completes, the bit FRDY in the Flash Programming Status Register
(MC_FSR) rises. If an interrupt has been enabled by setting the bit FRDY in MC_FMR, the
interrupt line of the Memory Controller is activated.
Two errors can be detected in the MC_FSR register after a programming sequence:
• Programming Error: a bad keyword and/or an invalid command have been written in the
MC_FCR register
• If the number of the general-purpose bit set in the PAGEN field is greater than the total
number of general-purpose bits, then the command has no effect.
The Clear General-purpose Bit command programs the general-purpose NVM bit to 1; the corre-
sponding bit GPNVMx in MC_FSR reads 0. The Set General-purpose Bit command programs
the general-purpose NVM bit to 0; the corresponding bit GPNVMx in MC_FSR reads 1.
Note: Access to the Flash in read mode is permitted when a Set, Clear or Get General-purpose NVM Bit
command is performed.
97
6070B–ATARM–25-Feb-05