Flash Memory Operation
6-13
Flash Memory Controller
Initiating a Byte/Word Write from RAM
The flow to initiate a byte/word write from RAM is shown in Figure 6−9.
Figure 6−9. Initiating a Byte/Word Write from RAM
yes
BUSY = 1
yes
BUSY = 1
Disable watchdog
Setup flash controller
and set WRT=1
Write byte or word
Set WRT=0, LOCK = 1
re-enable watchdog
; Byte/word write from RAM. 514 kHz < SMCLK < 952 kHz
; Assumes 0FF1Eh is already erased
; Assumes ACCVIE = NMIIE = OFIE = 0.
MOV
#WDTPW+WDTHOLD,&WDTCTL
; Disable WDT
L1 BIT
#BUSY,&FCTL3
; Test BUSY
JNZ
L1
; Loop while busy
MOV
#FWKEY+FN0,&FCTL2 ; SMCLK/2
MOV
#FWKEY,&FCTL3
; Clear LOCK
MOV
#FWKEY+WRT,&FCTL1
; Enable write
MOV
#0123h,&0FF1Eh
; 0123h −> 0FF1Eh
L2 BIT
#BUSY,&FCTL3
; Test BUSY
JNZ
L2
; Loop while busy
MOV
#FWKEY,&FCTL1
; Clear WRT
MOV
#FWKEY+LOCK,&FCTL3
; Set LOCK
...
; Re-enable WDT?
Содержание MSP430x4xx Family
Страница 1: ...MSP430x4xx Family 2007 Mixed Signal Products User s Guide SLAU056G ...
Страница 2: ......
Страница 6: ...vi ...
Страница 114: ...3 76 RISC 16 Bit CPU ...
Страница 304: ...5 20 FLL Clock Module ...
Страница 340: ...7 8 Supply Voltage Supervisor ...
Страница 348: ...8 8 16 Bit Hardware Multiplier ...
Страница 372: ...9 24 32 Bit Hardware Multiplier ...
Страница 400: ...10 28 DMA Controller ...
Страница 428: ...13 10 Basic Timer1 ...
Страница 466: ...15 24 Timer_A ...
Страница 522: ...17 30 USART Peripheral Interface UART Mode ...
Страница 544: ...18 22 USART Peripheral Interface SPI Mode ...
Страница 672: ...23 12 Comparator_A ...
Страница 692: ...24 20 LCD Controller ...
Страница 746: ...26 28 ADC12 ...