Toshiba H1 Series Data Book page 260

32bit micro controller tlcs-900/h1 series
Table of Contents

Advertisement

3.11.5
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:
92CZ26A-257
; 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
TMP92CZ26A
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

Advertisement

Table of Contents
loading

This manual is also suitable for:

Tlcs-900Tmp92cz26axbg

Table of Contents