Flash Memory Operation
6-12
Flash Memory Controller
In byte/word mode, the internally-generated programming voltage is applied
to the complete 64-byte block, each time a byte or word is written, for t
WORD
minus 3 f
FTG
cycles. With each byte or word write, the amount of time the block
is subjected to the programming voltage accumulates. The cumulative
programming time, t
CPT,
must not be exceeded for any block. If the cumulative
programming time is met, the block must be erased before performing any
further writes to any address within the block. See the device-specific data
sheet for specifications.
Initiating a Byte/Word Write from Within Flash Memory
The flow to initiate a byte/word write from flash is shown in Figure 6−8.
Figure 6−8. Initiating a Byte/Word Write from Flash
Setup flash controller
and set WRT=1
Disable watchdog
Set WRT=0, LOCK=1,
re-enable watchdog
Write byte or word
; Byte/word write from flash. 514 kHz < SMCLK < 952 kHz
; Assumes 0FF1Eh is already erased
; Assumes ACCVIE = NMIIE = OFIE = 0.
MOV
#WDTPW+WDTHOLD,&WDTCTL
; Disable WDT
MOV
#FWKEY+FN0,&FCTL2 ; SMCLK/2
MOV
#FWKEY,&FCTL3
; Clear LOCK
MOV
#FWKEY+WRT,&FCTL1
; Enable write
MOV
#0123h,&0FF1Eh
; 0123h
−> 0FF1Eh
MOV
#FWKEY,&FCTL1
; Done. Clear WRT
MOV
#FWKEY+LOCK,&FCTL3
; Set LOCK
...
; Re-enable WDT?
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 ...