Fujitsu MB90390 Series Hardware Manual page 617

Table of Contents

Advertisement

;////////////////////////////////////////////////
;Write (SA1)
;////////////////////////////////////////////////
MOV
A,PDR1
MOVW
@RW0+00,A
MOV
FMCS,#20H
MOVW
ADB:COMADR1,#00AAH
MOVW
ADB:COMADR2,#0055H
MOVW
ADB:COMADR1,#00A0H
;
MOVW
A,@RW0+00
MOVW
@RW2+00,A
WRITE
;Wait time check
;
///////////////////////////////////////////////////////////////////
;
ERROR when the time limit excess check flag is set and toggle operation is
;
in progress
;
///////////////////////////////////////////////////////////////////
MOVW
A,@RW2+00
AND
A,#20H
BZ
NTOW
MOVW
A,@RW2+00
MOVW
A,@RW2+00
XORW
A
AND
A,#40H
BNZ
ERROR
;
///////////////////////////////////////
;
Write termination check (FMCS-RDY)
;
///////////////////////////////////////
;
///////////////////////////////////////
NTOW
MOVW
A,FMCS
AND
A,#10H
BZ
WRITE
MOV
FMCS,#00H
;
/////////////////////////////////////////////////////
;
Write data output
;
/////////////////////////////////////////////////////
MOVW
RW2,#0000H
MOVW
A,@RW2+00
MOV
PDR2,A
;
WAIT2
BBC
PDR3:1,WAIT2
;
;/////////////////////////////////////////////
;Sector erase (SA1)
;/////////////////////////////////////////////
MOV
@RW2+00,#0000H
MOV
FMCS,#20H
MOVW
ADB:COMADR1,#00AAH
MOVW
ADB:COMADR2,#0055H
MOVW
ADB:COMADR1,#0080H
MOVW
ADB:COMADR1,#00AAH
MOVW
ADB:COMADR2,#0055H
MOV
@RW2+00,#0030H
ELS
;Wait time check
;
///////////////////////////////////////////////////////////////////
;
ERROR when the time limit excess check flag is set and toggle operation is
;
in progress
;
///////////////////////////////////////////////////////////////////
MOVW
A,@RW2+00
AND
A,#20H
BZ
NTOE
MOVW
A,@RW2+00
MOVW
A,@RW2+00
XORW
A
;
AND
A,#40H
BNZ
ERROR
CHAPTER 28 3M-BIT FLASH MEMORY
;PDR1 data allocation to RAM
;Write mode setting
;Flash write command 1
;Flash write command 2
;Flash write command 3
;Input data (RW0) write to flash memory (RW2)
;DQ5 time limit check
;Time limit over
;AH
;AL
;XOR of AH and AL (1 when the values differ)
;Is the DQ6 toggle bit different?
;To ERROR when the DQ6 toggle bit is different
;Extraction of FMCS RDY bit (bit 4)
;End of write?
;Write mode release
;Write data output
;PDR3: 1(sector erase start at "H" level)
;Address initialization
;Erase mode setting
;Flash erase command 1
;Flash erase command 2
;Flash erase command 3
;Flash erase command 4
;Flash erase command 5
;Issuance of erase command 6 to the sector
to be erased
;DQ5 time limit check
;Time limit over
;AH
High and Low are alternately output from
;AL
DQ6 per read during write operation.
;XOR of AH and AL (If the DQ6 value differs,
write operation is in progress (1)).
;Is the DQ6 toggle bit High?
;ERROR when the DQ6 toggle bit is "H"
589

Advertisement

Table of Contents
loading

Table of Contents