s3C2440 Memory controller

Publisher:calmrsLatest update time:2023-09-05 Source: elecfansKeywords:s3C2440  Memory  controller Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere

Hardware Design

 

The first is the selection of BANK0. If you choose to connect BANK0 to NAND Flash, you need to set the status of pins OM1 and OM0 to 0, which means it is NAND FLASH mode. . NANDFlash mode will automatically

The first 4MB of NANDFLASH content is copied to memory.


Secondly, the pins of S3C2440 SDRAM are as follows:

nSRAS: SDRAM row select pin 

nSCAS: SDRAM column select pin

nSCS: chip select signal

DQM[3:0]: Mask is to mask unnecessary bits. For example, if a 32-bit chip connected needs to write 8-bit data, then the other bits will be masked.

SCLK: clock

SCKE: clock enable

nBE[3:0]: DATA mask. Because SDRAM can only extract 8 bits of data from the core at a time, this DQM is used to distinguish the upper eight bits and the eighth bit when the user selects 32-bit and 16-bit data. Generally connected to the LDQM and HDQM of SDRAM. LDQM connects to DQM0 HDQM connects to DQM1 (only for 16bit SRAM)


nWBE: Write Byte Enable


Among them, nBE, nWBE, and DQM share a pin array and their relationship is as follows:

If ROM is connected, nWBE needs to be connected to the nWE pin of the chip. byte enable

If you want to connect SRAM, nWE is connected to the nWE pin on the chip. UB and LB on the SRAM are connected to BE0 and BE1 respectively.

If connected to SDRAM, DQM0 needs to be connected to the LDQM on the chip and DQM1 needs to be connected to UDQM.

 

See the chip manual below:

1. CLK is connected to the SDRAM CLK of the chip

2. CKE: Clock enable

3. BA0 and BA1 form a selector that can select four BANKs (0,1,2,3) in SDRAM.

5 CS: Film Selection

6. CAS: column address selection

7. RAS: Row address selection

8. WE: Write enable

9. LDQM and UDQM masks. .

 

sequential operations

Determine the direction of the program and timing according to the manual:

1. The SDRAM we use is EM63A165TS 

2. Let’s look at BWSCON first: Since we set the SDRAM to bank 6, the registers we want to look at are:

ST6: Whether UB and LB are used? Because SDRAM only uses DQM instead of UB/LB, it is 0

WS6: Wait. Because waiting is not used, it is 0 (SDRAM has no waiting pin)

DW6: Bit width selection 16 bits   

3. Set BANKCON6. Since it is SDRAM, set MT to 11.

Tac: The time for address establishment before chip selection. Since HCLK is 100M, this bit can be set to 0.

cos can be set to 0 because the time is very short.

The last SCAN: Since the column in the manual is 9, 01 is selected.

4. Set refresh register:

22 and 23 bits are all 1 to refresh SDRAM

Trp manual is 21ns and HCLK is 100M (10ns) so it should be 01 3 clock cycles (10*3 >> 21ns)

Refresh frequency: The frequency in the manual is 8192. Refresh 64ms. Substitute into the formula Refresh period = (2^11-refresh_count+1)/HCLK

to 1267 

5 bank Size: Use burst mode with bit 7 set to 1

Bit 5: SDRAM can enter sleep state

The fourth bit: SCLK is only executed when entering SDRAM access

Position 2:0: Select 64M

6: MRSRB6: 0x20 

                                                             


Keywords:s3C2440  Memory  controller Reference address:s3C2440 Memory controller

Previous article:2440 controller gleanings
Next article:How to set the S2C2440 clock

Recommended ReadingLatest update time:2024-11-15 09:33

Linux-2.6.14 ported to S3C2440
The 2.6.14 kernel is rarely used now, but due to project needs, the 2.6.14 kernel was recently ported to S3C2440, and the CS8900 network card driver was ported (for network card driver porting, refer to http://blog.csdn.net/ce123/article/details/8424399 ). The reason for porting the network card driver is that the yaff
[Microcontroller]
S3C2440 Mini 2440 DMA mode to achieve Uart serial communication
After a long time, I finally completed the DMA method to realize serial communication. Using DMA is not very difficult, but the configuration of DCONn is more complicated and the understanding of several modes is more difficult.   DMA service mode: single service & whole service. In the former mode, a DMA reques
[Microcontroller]
Code relocation (S3C2440)
nand startup, need to relocate The CPU of S3C2440 can directly send commands to SDRAM, Nor Flash, and 4K on-chip SDRAM, but it cannot directly send commands to Nand Flash. The CPU cannot directly access Nand Flash because there is a Nand Flash controller in between. Q: Then why can NAND still be used for booting? An
[Microcontroller]
Code relocation (S3C2440)
Android 11 is now available on x86 PCs: no problem for old machines with 2G memory
       The Android x86 project has finally been upgraded to the underlying Android 11.   This innovation has been achieved in the latest Bliss OS 14 version. Of course, the version is currently in the development stage and there is still a lot of work to be done.   Bliss OS is built based on native Android 11, but man
[Mobile phone portable]
ROM and RAM How does the microcontroller execute step by step after power is turned on?
ROM: (Read Only Memory) Program memory Used to store program data and constant data or variable data in the microcontroller. All codes in c files and h files, global variables, local variables, constant data defined by the 'const' qualifier, and codes in the startup.asm file (similar to the bootloader in ARM or the BI
[Microcontroller]
s3c2440 external interrupt operation
    To correctly execute the external interrupt of 2440, generally two parts need to be completed: interrupt initialization and interrupt processing function.     Before executing the interrupt, the interrupt to be used must be initialized. The external interrupt pin EINT of 2440 is multiplexed with the general IO pin
[Microcontroller]
Display of BMP images on S3C2440 development board 2
2. BMP picture display test program design 1. Test program structure design (1. Purpose Confirm the understanding of BMP structure and deepen the understanding of RGB color format. Able to display a 160 x 128 size picture on the LCD. (Just the same size as the LCD)   (2) Implementation plan Add a command mptest. In t
[Microcontroller]
Design of LED backlight power saving system based on S3C2440
  Energy-saving and environmental protection technology is the focus of the world's current attention. In LCD display modules, the power consumption of the backlight can account for more than 50% of the total power consumption. Especially in display products below 10in, such as mobile phones, PDAs, MP3s and other port
[Power Management]
Design of LED backlight power saving system based on S3C2440
Latest Microcontroller Articles
Change More Related Popular Components

EEWorld
subscription
account

EEWorld
service
account

Automotive
development
circle

About Us Customer Service Contact Information Datasheet Sitemap LatestNews


Room 1530, 15th Floor, Building B, No.18 Zhongguancun Street, Haidian District, Beijing, Postal Code: 100190 China Telephone: 008610 8235 0740

Copyright © 2005-2024 EEWORLD.com.cn, Inc. All rights reserved 京ICP证060456号 京ICP备10001474号-1 电信业务审批[2006]字第258号函 京公网安备 11010802033920号