Toshiba TLCS-900/H1 Series Manual page 229

Original cmos 32-bit microcontroller
Hide thumbs Also See for TLCS-900/H1 Series:
Table of Contents

Advertisement

3.11.6
An Example of Accessing NAND Flash of SLC Type
1.
Initialization
;
; ***** Initialize NDFC *****
;
;
2.
Write
Writing valid data
; ***** Write valid data*****
;
Generating ECC → Reading ECC
; ***** Read ECC *****
;
;
;
;
;
Writing ECC to NAND Flash
; ***** Write dummy data & ECC*****
;
;
;
;
;
;
;
Conditions: 8-bit bus, CE0, SLC, 512 (528) bytes/page, Hamming codes
ld
(ndfmcr1),0001h ; 8-bit bus, Hamming ECC, SYSCK-ON
ld
(ndfmcr0),2000h ; SPLW1:0=0, SPHW1:0=2
ldw
(ndfmcr0),2010h ; CE0 enable
ldw
(ndfmcr0),20B0h ; WE enable, CLE enable
ld
(ndfdtr0),80h
ldw
(ndfmcr0),20D0h ; ALE enable
ld
(ndfdtr0),xxh
ldw
(ndfmcr0),2095h ; Reset ECC, ECCE enable, CE0 enable
ld
(ndfdtr0),xxh
ldw
(ndfmcr0),2010h ; ECC circuit disable
ldw
xxxx,(ndeccrd0)
1'st Read:
ldw
xxxx,(ndeccrd1)
2'nd Read:
ldw
xxxx,(ndeccrd0)
3'rd Read:
ldw
xxxx,(ndeccrd1)
4'th Read:
ldw
(ndfmcr0),2090h ; ECC circuit disable, data write mode
ld
(ndfdtr0),xxh
Write to D520:
Write to D521:
Write to D522:
Write to D525:
Write to D526:
Write to D527:
92CF30-227
; Serial input command
; Address write (3 or 4 times)
; Data write (512 times)
; Read ECC from internal circuit
D15-0 > LPR15:0
; Read ECC from internal circuit
D15-0 > FFh+CPR5:0+11b For first 256 bytes
; Read ECC from internal circuit
D15-0 > LPR15:0
; Read ECC from internal circuit
D15-0 > FFh+CPR5:0+11b For second 256 bytes
; Redundancy area data write (16 times)
LPR7:0
> D7-0
LPR15:8
> D7-0
CPR5:0+11b
> D7-0
LPR7:0
> D7-0
LPR15:8
> D7-0
CPR5:0+11b
> D7-0
TMP92CF30
For first 256 bytes
For second 256 bytes
For second 256 bytes
For second 256 bytes
For second 256 bytes
For first 256 bytes
For first 256 bytes
For first 256 bytes
2009-06-12

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tmp92cf30fg

Table of Contents