Qdatasheet_Logo
Integrated circuits, Transistor, Semiconductors Search and Datasheet PDF Download Site

ST10F168-Q3 View Datasheet(PDF) - STMicroelectronics

Part Name
Description
MFG CO.
'ST10F168-Q3' PDF : 74 Pages View PDF
ST10F168
Programming a block of data
The following code is provided as an example to program a block of data. Flash to be programmed is from
address 01’9000h to 01’9FFEh (included). Source data (data to be copied into flash) is located in external
RAM from address 05’1000h (to 05’1FFEh, implicitly) :
; code shown below assumes that flash is mapped in segment 1
; ie. bit ROMS1 = ‘1’ in SYSCON register
; Flash must be enabled, ie. bit ROMEN = ‘1’ in SYSCON.
MOV R0, #0AA50h ; AA5xh : Multi Word programming command
OR
R0, #01h
; Selects segment 1 in Flash memory
MOV R1, #09000h ; First Flash Segment Offset Address
MOV R2, #09FFEh ; Last Flash Segment Offset Address
MOV R3, #09000h ; Source data address: use DPP2 as
; data page pointer
SCXT DPP2,#20d
; Source is in page 20 (first page of
; segment 5): save previous DPP2 value
; and load it with source page number
MOV R4, #050d
; 50ns is 20MHz CPU clock frequency
MOV R7, #08000h ; R7 used for Flash trigger sequence
#define FCR 08000h
EXTS #1, #2
; Flash can be mapped in segment 0 or 1
MOV FCR, R7
; first part
MOV [R7], R7
; second part
NOP
; WARNING: place 2 NOP operations after
NOP
; the Unlock sequence to avoid all possible
; pipeline conflicts in STEAK programs
POP DPP2
; restore DPP2
17/74
Share Link: GO URL

All Rights Reserved © qdatasheet.com  [ Privacy Policy ] [ Contact Us ]