Flash Memory Operation
6-18
Flash Memory Controller
6.3.5
Stopping a Write or Erase Cycle
Any write or erase operation can be stopped before its normal completion by
setting the emergency exit bit EMEX. Setting the EMEX bit stops the active
operation immediately and stops the flash controller. All flash operations
cease, the flash returns to read mode, and all bits in the FCTL1 register are
reset. The result of the intended operation is unpredictable.
6.3.6
Marginal Read Mode
The marginal read mode can be used to verify the integrity of the Flash
memory contents. This feature is implemented in F47x devices; see the
device−specific data sheet for availability. During marginal read mode, the
presence of an insufficiently programmed flash memory bit location can be
detected. Events that could produce this situation include improper f
FTG
settings, violation of minimum Vcc during erase/program operations and data
retention end−of−life. One method for identifying such memory locations
would be to periodically perform a checksum calculation over a section of flash
memory (for example, a flash segment) and repeating this procedure with the
marginal read mode enabled. If they do not match, it could indicate an
insufficiently programmed Flash memory location. It is possible to refresh the
affected Flash memory segment by disabling marginal read mode, copying to
RAM, erasing the flash segment, and copying back from RAM to flash.
The program checking the flash memory contents must be executed from
RAM. Executing code from flash will automatically disable the marginal read
mode. The marginal read modes are controlled by the MRG0 and MRG1 bits.
Setting MRG1 is used to detect insufficiently programmed flash cells
containing a “1“ (erased bits). Setting MRG0 is used to detect insufficiently
programmed flash cells containing a “0“ (programmed bits). Only one of these
bits should be set at a time. Therefore, a full marginal read check will require
two passes of checking the flash memory content’s integrity. During marginal
read mode, the flash access speed must be limited to 1 MHz (see
device-specific data sheet).
6.3.7
Configuring and Accessing the Flash Memory Controller
The FCTLx registers are 16-bit, password-protected, read/write registers. Any
read or write access must use word instructions and write accesses must
include the write password 0A5h in the upper byte. Any write to any FCTLx
register with any value other than 0A5h in the upper byte is a security key
violation, sets the KEYV flag and triggers a PUC system reset. Any read of any
FCTLx registers reads 096h in the upper byte.
Any write to FCTL1 during an erase or byte/word write operation is an access
violation and sets ACCVIFG. Writing to FCTL1 is allowed in block write mode
when WAIT=1, but writing to FCTL1 in block write mode when WAIT=0 is an
access violation and sets ACCVIFG.
Any write to FCTL2 when the BUSY=1 is an access violation.
Any FCTLx register may be read when BUSY=1. A read will not cause an
access violation.
Summary of Contents for MSP430x4xx Family
Page 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Page 2: ......
Page 6: ...vi ...
Page 114: ...3 76 RISC 16 Bit CPU ...
Page 304: ...5 20 FLL Clock Module ...
Page 340: ...7 8 Supply Voltage Supervisor ...
Page 348: ...8 8 16 Bit Hardware Multiplier ...
Page 372: ...9 24 32 Bit Hardware Multiplier ...
Page 400: ...10 28 DMA Controller ...
Page 428: ...13 10 Basic Timer1 ...
Page 466: ...15 24 Timer_A ...
Page 522: ...17 30 USART Peripheral Interface UART Mode ...
Page 544: ...18 22 USART Peripheral Interface SPI Mode ...
Page 672: ...23 12 Comparator_A ...
Page 692: ...24 20 LCD Controller ...
Page 746: ...26 28 ADC12 ...