Section 27 NAND Flash Memory Controller (FLCTL)
Rev.1.00 Dec. 13, 2005 Page 1051 of 1286
REJ09B0158-0100
Sector access (Flash Write)
Yes
No
Set common control register (FLCMNCR)
ACM [1:0] = 01 (sector access mode)
CE0 = 1 (chip enable)
TYPESEL = 1 (NAND flash memory)
Specify ECC position to ECCPOS [1:0]
Set command control register (FLCMDCR)
SELRW = 1 (flash write)
DOCMD1 = 1 (perform first command stage)
DOCMD2 = 1 (perform second command stage)
DOADR = 1 (perform address stage)
ADRMD = 1 (specify sector access address)
ADRCNT [1:0] = 10 (issue 3-byte address)
DOSR = 1 (perform status read)
Specify number of sector transfer to SCTCNT [15:0]
Set command code register (FLCMCDR)
CMD [7:0] = H'80 (flash write command)
CMD [15:8] = H'10 (flash write execute command)
Set interrupt DMA control register (FLINTDMACR)
DREQ1EN = 1
(enable DMA transfer request from FLECFIFO)
DREQ0EN = 1
(enable DMA transfer request from FLDTFIFO)
Set address register (FLADR)
Specify physical sector address to ADR [17:0]
Set transfer control register (FLTRCR)
TRSTRT = 1 (transfer start)
Set Interrupt DMA Control Register (FLINTDMACR)
DREQ1EN = 1
(enable DMA transfer request from FLECFIFO)
DREQ0EN = 1
(enable DMA transfer request from FLDTFIFO)
Perform flash memory writing
Issue first command
Issue address
Data stage (sector access)
Issue second command
Read status
FLTRCR.TREND = 1?
End of flash memory access
FLTRCR.TREND = 0 (clear processing end flag)
Read status
Check FLBSYCNT.STAT [7:0]
END
Set DMAC related registers (example of channel 0, 1)
1. DMA source address registers (SAR0, SAR1)
SAR0 [31:0]: set start address of writing data
SAR1 [31:0]: set start address of writing control code
2. DMA destination address registers (DAR0, DAR1)
DAR0 [31:0]: set FLDTFIFO address
DAR1 [31:0]: set FLECFIFO address
3. DMA transfer count registers (TCR0, TCR1)
TCR0 [31:0] = H'0000 0080 (512 bytes = 4 x 128)
TCR1 [31:0] = H'0000 0004 (16 bytes = 4 x 4)
4. DMA channel control registers (CHCR0, CHCR1)
SM [1:0] = 01 (source address is incremented)
RS [3:0] = 1000 (on-chip peripheral module request)
TS [2:0] = 010 (longword)
DE = 1 (DMA transfer enable)
5. DMA extended resource selector (DMARS0)
DMARS0 [15:0] = H'8783 (FLCTL control code and
data part transmit and receive)
Set DMA operation register (DMAOR0)
DME = 1 (enable channel 0 to 5 transfer)
Figure 27.9 NAND Flash Sector Access (Flash Write) Using DMA
Содержание SH7780 Series
Страница 2: ...Rev 1 00 Dec 13 2005 Page ii of l ...
Страница 28: ...Rev 1 00 Dec 13 2005 Page xxviii of l ...
Страница 50: ...Rev 1 00 Dec 13 2005 Page l of l ...
Страница 82: ...Section 1 Overview Rev 1 00 Dec 13 2005 Page 32 of 1286 REJ09B0158 0100 ...
Страница 122: ...Section 3 Instruction Set Rev 1 00 Dec 13 2005 Page 72 of 1286 REJ09B0158 0100 ...
Страница 146: ...Section 4 Pipelining Rev 1 00 Dec 13 2005 Page 96 of 1286 REJ09B0158 0100 ...
Страница 196: ...Section 6 Floating Point Unit FPU Rev 1 00 Dec 13 2005 Page 146 of 1286 REJ09B0158 0100 ...
Страница 292: ...Section 9 L Memory Rev 1 00 Dec 13 2005 Page 242 of 1286 REJ09B0158 0100 ...
Страница 450: ...Section 11 Local Bus State Controller LBSC Rev 1 00 Dec 13 2005 Page 400 of 1286 REJ09B0158 0100 ...
Страница 492: ...Section 12 DDR SDRAM Interface DDRIF Rev 1 00 Dec 13 2005 Page 442 of 1286 REJ09B0158 0100 ...
Страница 674: ...Section 15 Clock Pulse Generator CPG Rev 1 00 Dec 13 2005 Page 624 of 1286 REJ09B0158 0100 ...
Страница 692: ...Section 16 Watchdog Timer and Reset Rev 1 00 Dec 13 2005 Page 642 of 1286 REJ09B0158 0100 ...
Страница 726: ...Section 18 Timer Unit TMU Rev 1 00 Dec 13 2005 Page 676 of 1286 REJ09B0158 0100 ...
Страница 1004: ...Section 24 Multimedia Card Interface MMCIF Rev 1 00 Dec 13 2005 Page 954 of 1286 REJ09B0158 0100 ...
Страница 1032: ...Section 25 Audio Codec Interface HAC Rev 1 00 Dec 13 2005 Page 982 of 1286 REJ09B0158 0100 ...
Страница 1070: ...Section 26 Serial Sound Interface SSI Module Rev 1 00 Dec 13 2005 Page 1020 of 1286 REJ09B0158 0100 ...
Страница 1104: ...Section 27 NAND Flash Memory Controller FLCTL Rev 1 00 Dec 13 2005 Page 1054 of 1286 REJ09B0158 0100 ...
Страница 1150: ...Section 28 General Purpose I O GPIO Rev 1 00 Dec 13 2005 Page 1100 of 1286 REJ09B0158 0100 ...
Страница 1184: ...Section 29 User Break Controller UBC Rev 1 00 Dec 13 2005 Page 1134 of 1286 REJ09B0158 0100 ...
Страница 1266: ...Section 31 Electrical Characteristics Rev 1 00 Dec 13 2005 Page 1216 of 1286 REJ09B0158 0100 ...
Страница 1328: ...Appendix Rev 1 00 Dec 13 2005 Page 1278 of 1286 REJ09B0158 0100 ...
Страница 1336: ...Rev 1 00 Dec 13 2005 Page 1286 of 1286 REJ09B0158 0100 ...
Страница 1339: ......
Страница 1340: ...SH7780 Hardware Manual ...