tmp89fm82t TOSHIBA Semiconductor CORPORATION, tmp89fm82t Datasheet - Page 382

no-image

tmp89fm82t

Manufacturer Part Number
tmp89fm82t
Description
8 Bit Microcontroller
Manufacturer
TOSHIBA Semiconductor CORPORATION
Datasheet
21.5
Access to the Flash Memory Area
RA000
; #### Allocate RAM to the code area. Switch the vector area to RAM ####
; #### Allocate BOOTROM to the data/code area ####
; #### Protect set up process(API) ####
; #### Sector erase process (API) ####
; #### Write process ####
sLOOP1:
; #### End process ####
; #### Program to be executed in RAM ####
sRAMprogStart:
; Interrupt subroutine
sINTWDT:
sINTSWI:
sRAMprogEnd:
LDW
LD
LDW
LD
LD
LD
LD
LD
LD
CALL
LD
LD
CALL
LD
LD
LD
LD
LD
LD
CALL
INC
INC
CMP
J
LD
LD
LD
LD
:
J
LD
LD
CMP
J
LD
RETN
NOP
(HL),sINTSWI - sRAMprogStart + cRAMStartAdd
HL,0x01F8
(HL),sINTWDT - sRAMprogStart + cRAMStartAdd
(SYSCR3),0x06
(SYSCR4),0xD4
(FLSCR1),0x50
(FLSCR2),0xD5
A,0xD5
C,0x00
(.BTGetRP)
A,0x38
C,0xD5
(.BTEraseSec)
HL,0xE000
IY,0x0100
C,0x00
WA,HL
E,(IY)
(SP-),0xD5
(.BTWrite)
IY
HL
L,0x00
NZ,sLOOP1
(FLSCR1),0x40
(FLSCR2),0xD5
(SYSCR3),0x00
(SYSCR4),0xD4
:
XXXX
IX,0xF000
A,(IX)
A,(IX)
NZ,sINTWDT
(SYSCR2),0x10
Page 366
; Set INTWDT interrupt vector
; Set RAREA and RVCTR to "1"
; Enable Code
; Set BAREA to "1" (note)
; Reflect the FLSCR1 setting
; read Security Program infrmation (Protect set up)
; Specify the area to be erased (Block7)
; Enable Code
; Execute sector erase
; Flash start address (address where data is written)
; RAM start address
; Address where data is written (bit 16)
; Address where data is written (bits 15 to 0)
; Data to be written
; Enable Code
; Write data to the flash memory (1 byte)
; Increment flash address
; Increment RAM address
; Finish 256-byte write?
; Return to sLOOP1 if the number of bytes is less than 256
; Set BAREA to "0"
; Set RAREA and RVCTR to "0"
; Enable Code
; Loop until the read values become the same
; Generate system clock reset
TMP89FM82T

Related parts for tmp89fm82t