Добавил:
Опубликованный материал нарушает ваши авторские права? Сообщите нам.
Вуз: Предмет: Файл:
ARM PrimeCell multiport memory controller technical reference manual.pdf
Скачиваний:
20
Добавлен:
23.08.2013
Размер:
1.79 Mб
Скачать

Dynamic Memory Controller

6.8Micron MT28F4M16S2 SyncFlash initialization example

You can use the following procedure to initialize Micron MT28S4M16LC SyncFlash (64MB, 4M x16) devices configured to provide a 16-bit bus. HCLK and MPMCLK are 100MHz:

1.Wait for the power to be applied and the clocks have stabilized.

2.Set the RP value in the MPMCDynamicControl register HIGH.

3.Wait 100µs.

4.Program the operational value into the latency register, MPMCDynamicRasCas. The -10 speed grade devices support CAS latency 3 at 100MHz operation. Therefore, 0x0303 must be programmed into the register.

5.Program the operational values into the configuration register, MPMCDynamicConfig. The buffers must be disabled during initialization. For this memory device the fields must be set as shown in Table 6-55.

Table 6-55 Field settings for Micron MT28S4M16LC SyncFlash

Field

Value

 

 

Memory Device (MD)

Micron SyncFlash (10)

 

 

Address Mapping (AM)

16-bit bus, 64Mb, 4Mx16 devices, BRC mapping(00100101)

 

 

Buffer Enable (B

Disabled (0)

 

 

Write Protect (P)

Writes not protected (0)

 

 

Column Width (CW)

8 (010)

 

 

Number of Banks (NB)

Four banks (1)

 

 

Row Width (RW)

12 (01)

 

 

The value is 0x14801290.

6.Set the SDRAM Initialization (I) value to MODE in the MPMCDynamicControl register.

7.Program the SyncFlash memories mode register. The mode register enables the following parameters (shown in Table 6-49 on page 6-57) to be programmed:

burst length

burst type

CAS latency

operating mode

write burst mode.

ARM DDI 0215A

Copyright © 2002 ARM Limited. All rights reserved.

6-63

Dynamic Memory Controller

A read transaction from the SDRAM memory programs the mode register. The address of the transfer contains the value to be programmed. The mapping from AHB address bus, HADDR, to the SDRAM memories address lines depends on the address mapping value selected in the MPMCDynamicConfig register, in this case 16-bit, 64Mb, 4Mx16, BRC. The row address bits contain the value to be programmed. The bank select signals BA0 and BA1 must both be 0 to program the mode register

Table 6-56 SDRAM mode register settings for Micron SyncFlash SDRAM

Option

Value

Micron device

 

 

 

 

Burst length

8

(for 32-bit databus)

A[2:0]=011

 

 

 

Burst type

Sequential

A[3]=0

 

 

 

 

CAS latency

3

(for -10 device @100MHz)

A[6:4]=011

 

 

 

Operating mode

Standard operation

A[8:7]=00

 

 

 

Write burst mode

Programmed burst length

A[9]=0

 

 

 

 

Reserved (0)

0

 

A[11:10]=00

 

 

 

 

8.The value required to program the SyncFlash memories mode register is 0x033. The HADDR to SDRAM memory address mapping is 16-bit 64Mb SDRAM (4Mx16, BRC). The address mapping tables are shown in Address mapping on page 6-4. You can see the SDRAM memory row address bits are mapped to HADDR [20:9]. The SDRAM memory bank address bits are mapped to HADDR [22:21]. Therefore, the address used must be 0x06600.

9.Set the SDRAM Initialization (I) value to NORMAL in the MPMCDynamicControl register.

10.Enable the buffers in MPMCDynamicConfig configuration register. The SDRAM is now ready for normal operation.

6-64

Copyright © 2002 ARM Limited. All rights reserved.

ARM DDI 0215A

Dynamic Memory Controller

6.9Micron SyncFlash commands

Table 6-57 shows the Micron SyncFlash commands supported by the PL172.

Table 6-57 SyncFlash commands

SyncFlash operation

AHB

HADDR

HWDATA

access

 

 

 

 

 

 

 

Read device configuration

Read

CMD1 = 0 CMD0 = 1 Other = row + CA address

N/A

 

 

 

 

Read status register

Read

CMD1 = 1 CMD0 = 1 Other = row address

N/A

 

 

 

 

Clear status register

Write

CMD1 = 1 Other = don’t care

0xXXXX50XX (X = don’t

 

 

 

care)

 

 

 

 

Erase setup/confirm

Write

CMD1 = 1 Other = bank and row address

0xXXXX20D0 (X = don’t

 

 

 

care)

 

 

 

 

Program setup/program

Write

CMD1 = 0 Other = row, column and bank address

Din, the data to be written

 

 

 

into the array

 

 

 

 

Protect block/confirm

Write

CMD1 = 1 Other = bank and row address

0xXXXX6001 (X = don’t

 

 

 

care)

 

 

 

 

Protect device/confirm

Write

CMD1 = 1 Other = bank address

0xXXXX60F1 (X = don’t

 

 

 

care)

 

 

 

 

Unprotect blocks/confirm

Write

CMD1 = 1 Other = bank address

0xXXXX60D0 (X = don’t

 

 

 

care)

 

 

 

 

Erase nvmode register

Write

CMD1 = 1 Other = bank address

0xXXXX30C0 (X = don’t

 

 

 

care)

 

 

 

 

Program nvmode register

Write

CMD1 = 1 Other = bank address

0xXXXXA0XX (X = don’t

 

 

 

care)

 

 

 

 

To execute the SyncFlash command set, read or write transfers must be performed while the address is set appropriately. The commands can be found in Table 6-57. CMD1 in the table indicates, HADDR, address bit 27, CMD0 indicates address bit 26.For example to perform a SyncFlash Protect block/confirm command, a write transfer to the memory must be performed to an address where HADDR bit 27 is HIGH, and the rest of the address indicates the bank and row address. The value 0x6001 must be written to the memory.

Note

The buffers must be disabled while executing SyncFlash commands, and enabled for normal operation.

ARM DDI 0215A

Copyright © 2002 ARM Limited. All rights reserved.

6-65

Dynamic Memory Controller

6-66

Copyright © 2002 ARM Limited. All rights reserved.

ARM DDI 0215A