1. storage resources on the board
Two 32 m sdram.
A 2 m nor flash
A 128 M (some 64 m) NAND Flash
The above resources can be found in the schematic diagram.
2. I/O resources on the board
The I/O space on this board (accurate to the S3C2440) is mapped to the bucket using the storage ing method, that is, the I/O space is occupied by the storage space.
3. Differences between various types of memory and their respective uses
Why are there so many storage devices on this board? The reason is simple. each storage device has different purposes. In order to meet the needs of users, different storage devices are required. let's talk about SDRAM first. (This reminds me of forgetting to talk about SRAM. SRAM is a static random memory. It features power loss, no data loss, and no frequent refresh. The storage speed is fast, which is equivalent to PC memory. It seems that this memory is very important, but why didn't I say there was such a thing? The reason is very simple. There is no such reason. In fact, if random memory is needed, SDRAM is random memory, but it needs to be constantly refreshed to keep the data in it (level ). Speaking of this, the role of SDRAM should also be understood by the students. That is to say, our board has 64 MB of memory, which is enough for use.
Next, let's talk about nor flash. Nor Flash is a ROM with the characteristics of the SRAM interface. Remember, it's Rom, that is to say, it's equivalent to a hard disk in a PC, but nor flash is less than 2 m. That's right, it's very little, but we have NAND Flash, it is also Rom, it is also a "hard disk", so we can say that this board has a hard disk of 130 m (66 m. this is enough. You can burn Several Linux instances.
In addition, NAND flash can do a lot, but the speed is not as high as nor flash, nor flash can do fast but cannot do a lot, so the speed and capacity are a conflict. in order to overcome these contradictions, both Flash files on this board have been available. each has its own purpose. in addition, beginners must know the differences between NAND Flash and nor flash. this is related to their features. Let's talk about it later.
4. Nor flash and NAND Flash
There is an S2 switch on the development board. When it is played at the nor end, It is started by nor. on the contrary, NAND Flash is enabled on the other end. let's talk about the differences between the two types of boot, how the hardware is started, and how the space is allocated.
When S2 is started in NAND flashProgramIs to run on the NAND Flash. In fact, there is a 4 K steppingstone buffer inside (in fact, this is an SRAM). When NAND falsh is selected to start, the buffer is mapped to the address 0x0000_0000, it is responsibleCodeCopy to SDRAM (we all know that the program is running on Ram. How can it be running on Flash? In fact, the Code on Flash is copied) what is responsible for copying this code is the legendary BIOS.
What is the difference between S2 and nor flash? When we choose to start it with nor flash, 2 MB of nor flash will be mapped to address 0x0000_0000, and the program will run from here. Can the program run from nor flash? Of course not. Why can we start it here? In fact, this nor Flash has already installed the BIOS (if some readers do not know what the BIOS is, now, we think that its function is to copy code from flash to SDRAM)
------------------------------------------------
Figure:
------------------------------------------------
4. S3C2410 s3c2440nand Storage System
As we all know, 32-bit addressing of 4G space means that 4g space is classified as follows in the storage space of S3C2440:
(Only the lowest 1 GB is displayed on the way)
0 ~ 0x4000_0000(Only 1 GB).
3G space is allocated as follows:
Om [1:0] = 01 or 10 o'clock (nor flash ):
0x4000_0000-0x4000_0fff
----- The 4 K bytes are the stepingstone mentioned above. 0x4000_0fff_0x4800_0000 is useless.
0x4800_0000-0x6000_0000
----- This space is a special function register. You find that all registers are in this range.
0x6000_0000-0xffff_ffff
----- It is still not used.
Om [1:0] = 00 hour (nand flash ):
This is shown in. The steppingstone just mentioned maps to 0x000_0000, that is, the boot internal SRAM in the figure. Others.
In fact, the S3C2440 divides the low 1g space into eight blocks. The figure shows that the starting addresses of the seven blocks from 0th to 6 remain unchanged. The seventh segment of the address is variable (the Sixth Block of the address needs to be used to determine the number, and the sixth segment is connected together ). The first six may be Rom SRAM. The last two parts can be not only Rom, but also SRAM. in fact, simply put, only the last two parts can be SDRAM. that is to say, the SDRAM must be mapped to the two blocks. mini2440 is mapped to the seventh block, so the initial address of the SDRAM is 0x3000_0000 (this is why the initial value of the dnw is set as this in the manual when loading the test program, it is used to load the program directly to the SDRAM. This is just an experiment and will be lost after power loss. so it is impossible to do this when making products ).
I just mentioned that divides the storage space into eight parts. Why does it do this? In fact, it is very simple. Even if it does not, we will do the same. Count: 128 MB for each block, that is, 27 address lines are required for addressing. the 8-piece plug-in will be followed by one of the corresponding 8-piece pin selection. this clever reader must be able to think. in fact, these eight chip selection pins are decoded using three address lines. so a total of 30 address lines are used, 30 are not exactly 1 GB.