English
Language : 

PIC32MX440F256H-80I Datasheet, PDF (576/646 Pages) Microchip Technology – 64/100-Pin General Purpose and USB 32-Bit Flash Microcontrollers
PIC32MX3XX/4XX
27.1 Device Configuration
In PIC32MX3XX/4XX devices, the Configuration
Words select various device configurations. These
Configuration Words are implemented as volatile mem-
ory registers and must be loaded from the nonvolatile
programmed configuration data mapped in the last four
words (32-bit x 4 words) of boot Flash memory,
DEVCFG0-DEVCFG3. These are the four locations an
external programming device programs with the appro-
priate configuration data (see Table 27-3).
TABLE 27-3: DEVCFG LOCATIONS
Configuration Word
Address
DEVCFG0
0xBFC0_2FFC
DEVCFG1
0xBFC0_2FF8
DEVCFG2
0xBFC0_2FF4
DEVCFG3
0xBFC0_2FF0
On Power-on Reset (POR) or any Reset, the Configu-
ration Words are copied from boot FLASH memory to
their corresponding Configuration registers. A Configu-
ration bit can only be programmed = 0 (unprogrammed
state = 1). During programming, a Configuration Word
can be programmed a maximum of two times before a
page erase must be performed.
After programming the Configuration Words, the user
should reset the device to ensure the Configuration
registers are reloaded with the new programmed data.
27.1.1 CONFIGURATION REGISTER
PROTECTION
To prevent inadvertent Configuration bit changes dur-
ing code execution, all programmable Configuration
bits are write-once. After a bit is initially programmed
during a power cycle, it cannot be written to again.
Changing a device configuration requires changes to
the configuration data in the boot Flash memory and
power to the device be cycled.
To ensure the 128-bit data integrity, a comparison is
continuously made between each Configuration bit and
its stored complement. If a mismatch is detected, a
Configuration Mismatch Reset is generated, causing a
device Reset.
27.2 Device Code Protection
The PIC32MX features a single device code protection
bit, CP that when programmed = 0, protects boot Flash
and program Flash from being read or modified by an
external programming device. When code protection is
enabled, only the Device ID registers is available to be
read by an external programmer. Boot Flash and pro-
gram Flash memory are not protected from self-pro-
gramming during program execution when code
protection is enabled. See Section 27.3 “Program
Write Protection (PWP)”.
27.3 Program Write Protection (PWP)
In addition to a device code protection bit, the
PIC32MX also features write protection bits to prevent
boot Flash and program Flash memory regions from
being written during code execution.
Boot Flash memory is write protected with a single
Configuration bit, BWP (DEVCFG0<24>), when
programmed = 0.
Program Flash memory can be write-protected entirely
or in selectable page sizes using Configuration bits
PWP<7:0> (DEVCFG0<19:12>). A page of Program
Flash memory is 4096 bytes (1024 words). The PWP
bits represent the one’s complement of the number of
protected pages. For example, programming PWP bits
= 0xFF selects 0 pages to be write-protected, effec-
tively disabling the program Flash write protection. Pro-
gramming PWP bits = 0xFE selects the first page to be
write protected. When enabled, the write-protected
memory range is inclusive from the beginning of pro-
gram Flash memory (0xBD00_0000) up through the
selected page. Refer to Table 27-4.
Note:
The PWP bits represent the one’s
complement of the number of protected
pages.
DS61143E-page 574
Preliminary
© 2008 Microchip Technology Inc.