tmp89fm82t TOSHIBA Semiconductor CORPORATION, tmp89fm82t Datasheet - Page 384

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
21.5.2.4
sponding individual data (include data of code area) to each address in flash memory, if FLSCR1<FAREA>
and FLSCR2 is selected properly.
; #### Security program enable process (API) ####
sSKIP
; #### Program to be executed in RAM ####
sRAMprogStart:
; Interrupt subroutine
sINTWDT:
sINTSWI:
sRAMprogEnd:
Note 1: Make sure that you set the C register to "0x00".
Note 2: It is not necessary to add DI instruction for above example program, because the support program include it.
Example: Case in which data is read from 0xF000 in the code area and stored at 0x98 in RAM
To read data from flash memory, execute transfer instruction for memory. It is possible to read the corre-
How to read data from flash memory
However, the support program does not include EI instruction. Therefore, if interrupt process is used, enable IMF
after finishing all above process.
LD
LD
CALL
CMP
J
LD
LD
CALL
LD
LD
LD
LD
:
J
LD
LD
CMP
J
LD
RETN
NOP
LD
LD
LD
LD
LD
LD
A,0xD5
C,0x00
(.BTGetRP)
A,0xFF
NZ,sSKIP
A,0xD5
C,0x00
(.BTSetRP)
(FLSCR1),0x40
(FLSCR2),0xD5
(SYSCR3),0x00
(SYSCR4),0xD4
:
XXXX
IX,0xF000
A,(IX)
A,(IX)
NZ,sINTWDT
(SYSCR2),0x10
(FLSCR1),0xA8
(FLSCR2),0xD5
A,(0xF000)
(0x98),A
(FLSCR1),0x40
(FLSCR2),0xD5
Page 368
; Select AREA C1
; Reflect the FLSCR1 setting
; Read data from 0xF000
; Store data at 0x98
; Select AREA D0
; Reflect the FLSCR1 setting
; Enable Code
; Set 0x00 (note 1)
; Check the status of the security program
; Go to sSKIP if the security program is enabled
; Enable Code
; Set 0x00 (note 1)
; Enable the security program
; 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