English
Language : 

LM3S608-IQN50-C2 Datasheet, PDF (210/538 Pages) Texas Instruments – Stellaris LM3S608 Microcontroller
Internal Memory
NRND: Not recommended for new designs.
6.3
6.3.1
of the device. Note that it is recommended that disabling access to the DAP be combined with a
mechanism for providing end-user installable updates (if necessary) such as the Stellaris boot loader.
Important: Once the DBG field is cleared and committed, this field can never be restored to the
factory-programmed value—which means the JTAG/SWD interface to the debug module
can never be re-enabled. This sequence does NOT disable the JTAG controller, it only
disables the access of the DAP through the JTAG or SWD interfaces. The JTAG interface
remains functional and access to the Test Access Port remains enabled, allowing the
user to execute the IEEE JTAG-defined instructions (for example, to perform boundary
scan operations).
When using the FMPRE bits to protect Flash memory from being read as data (to mark sets of 2-KB
blocks of Flash memory as execute-only), these one-time-programmable bits should be written at
the same time that the debug disable bits are programmed. Mechanisms to execute the one-time
code sequence to disable all debug access include:
■ Selecting the debug disable option in the Stellaris boot loader
■ Loading the debug disable sequence into SRAM and running it once from SRAM after
programming the final end application code into Flash memory
Flash Memory Initialization and Configuration
This section shows examples for using the flash controller to perform various operations on the
contents of the flash memory.
Changing Flash Protection Bits
As discussed in “Flash Memory Protection” on page 208, changes to the protection bits must be
committed before they take effect. The sequence below is used change and commit a block protection
bit in the FMPRE or FMPPE registers. The sequence to change and commit a bit in software is as
follows:
1. The Flash Memory Protection Read Enable (FMPRE) and Flash Memory Protection Program
Enable (FMPPE) registers are written, changing the intended bit(s). The action of these changes
can be tested by software while in this state.
2. The Flash Memory Address (FMA) register (see page 213) bit 0 is set to 1 if the FMPPE register
is to be committed; otherwise, a 0 commits the FMPRE register.
3. The Flash Memory Control (FMC) register (see page 215) is written with the COMT bit set. This
initiates a write sequence and commits the changes.
There is a special sequence to change and commit the DBG bits in the Flash Memory Protection
Read Enable (FMPRE) register. This sequence also sets and commits any changes from 1 to 0 in
the block protection bits (for execute-only) in the FMPRE register.
1. The Flash Memory Protection Read Enable (FMPRE) register is written, changing the intended
bit(s). The action of these changes can be tested by software while in this state.
2. The Flash Memory Address (FMA) register (see page 213) is written with a value of 0x900.
3. The Flash Memory Control (FMC) register (see page 215) is written with the COMT bit set. This
initiates a write sequence and commits the changes.
210
June 18, 2012
Texas Instruments-Production Data