Datasheet
Setup flash controller
and set WRT=1
Disable watchdog
Set WRT=0, LOCK=1,
re-enable watchdog
Write byte or word
Flash Memory Operation
www.ti.com
7.3.3.2 Initiating a Byte or Word Write From Within Flash Memory
The flow to initiate a byte or word write from flash is shown in Figure 7-8.
Figure 7-8. Initiating a Byte or Word Write From Flash
; 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+FSSEL1+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?
316
Flash Memory Controller SLAU144J–December 2004–Revised July 2013
Submit Documentation Feedback
Copyright © 2004–2013, Texas Instruments Incorporated