Detailed explanation of the s3c2440 startup process

Publisher:YudieLatest update time:2016-10-18 Source: eefocusKeywords:s3c2440 Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
1: Allocation of address space

1: s3c2440 is 32-bit, so it can address 4GB of space. Memory (SDRAM), ports (special registers), and ROM are all mapped to the same 4G space.

2: Development boards generally use SDRAM as memory flash (nor, nand) as ROM. Among them, nand flash has no address line, and at least one page (512B) must be read at a time. The other two have address lines

3: NAND flash is not used to run code, but only to store code. NOR flash and SDRAM can run code directly.

4: S3C2440 has 8 memory banks in total.
6 memory banks can be used as ROM or SRAM.
The remaining 2 banks can be used as SDRAM in addition to ROM or SRAM (the read and write methods of various memories are different).
The starting address of 7 banks is fixed.
There is also a flexible bank memory address, and the bank size can also be changed.

5: S3C2440 supports two boot modes: NAND and non-NAND (here is NOR flash).
The specific method used depends on the two pins OM0 and OM1 .

OM[1:0] determines the startup mode

When OM[1:0]=00, the processor boots from NAND Flash

When OM[1:0]=01, the processor boots from a 16-bit ROM

When OM[1:0]=10, the processor boots from a 32-bit wide ROM.

When OM[1:0]=11, the processor starts from Test Mode.

 

 

When booting from NAND

The CPU will automatically read the first 4KB of data from NAND flash and place it in the on-chip SRAM (s3c2440 is soc), and map this on-chip SRAM to the nGCS0 chip select space (i.e. 0x00000000). The CPU starts execution from 0x00000000, which is the first 4KB of content in NAND flash. Because NAND FLASH does not even have address lines, it is not possible to directly map NAND to 0x00000000, so the on-chip SRAM has to be used as a carrier. Through this carrier, the large code in nand flash is copied to RAM (usually SDRAM) for execution

When booting from non-NAND flash

Nor flash is mapped to address 0x00000000 (that is, nGCS0, so there is no need for on-chip SRAM to assist, so the starting address of on-chip SRAM is still 0x40000000). Then the CPU starts executing from 0x00000000 (that is, executing in Norfalsh).

 

 

Summarize:

The startup of Arm starts from address 0, but the difference is that the address mapping is different. When the arm is powered on, if you want the arm to know how to run in a certain way (address mapping method), it is impossible to control it through a program you wrote, because your program has not started at this time. At this time, the arm will judge by the level of the pin. 

1 When one of the pins OM0 and OM1 is high, address 0 will be mapped to the external nGCS0 chip select space, that is, Norflash, and the program will start from Norflash. The arm directly takes the instructions in Norflash to run. 

2 When OM0 and OM1 are both low, the internal bootbuf (a 4k SRAM) at address 0 starts. When the system is powered on, the arm will automatically copy the first 4K content in NANDflash to bootbuf (that is, address 0), and then run from address 0.

At this time, the first 4K in NANDFlash is the boot code (its function is to initialize the hardware and then copy the code in NANDFlash to RAM, and then point the corresponding pointer to the place where it should run). 

    Why are there these two boot methods? The key is the different characteristics of the two flashes. NOR FLASH has a small capacity, fast speed, good stability, input address, and then give read and write signals to get data from the data port, which is suitable for program storage. NAND FLASH has a large total capacity, but both reading and writing require complex timing, which is more suitable for data storage. This difference causes NORflash to be directly connected to the arm bus and can run programs, while NANDflash must be moved to memory (SDRAM) to run. 

   In actual development, the bootloader can generally be burned into Norflash, and the program can be run through serial port interaction to perform certain operations, such as downloading and debugging. This makes it very convenient to debug some of your code. The Bootloader in Norflash can also burn the kernel to Norflash and other functions.

Keywords:s3c2440 Reference address:Detailed explanation of the s3c2440 startup process

Previous article:STM32F107 Ethernet configuration function GPIO_ETH_MediaInterfaceConfig
Next article:s3c44b0 read and write SD card basic program

Recommended ReadingLatest update time:2024-11-17 00:25

Linux kernel transplantation based on S3C2440 and yaffs2 file system production--root file system
Chapter 2 Creating a Root File System 2.1 Preliminary knowledge of the root file system In embedded Linux, a root file system needs to be built. The rules for building a root file system are in the FHS (Filesystem Hierarchy Standard) document. The following is the top-level directory of the root file system. Table of
[Microcontroller]
Design of the gateway between CNC synchronous fieldbus and CAN bus based on S3C2440
introduction     Fieldbus control systems were born based on the distributed control systems of the past to meet the users' requirements for openness of control systems. The open and interoperable fieldbus interconnects the controllers and instrumentation equipment on the network site to form a fieldbus control syst
[Microcontroller]
Design of the gateway between CNC synchronous fieldbus and CAN bus based on S3C2440
u-boot-2011.06 is started from nandflash based on the transplantation of s3c2440 development board
Due to the price, NandFlash is more advantageous than NorFlash for storing large amounts of data. However, programs cannot be run directly on NandFlash, so S3C2440 provides a mechanism where the system automatically copies the first 4K of the content in NandFlash to an internal SRAM called "Steppingstone". Using thi
[Microcontroller]
Disassembly and analysis of S3C2440 assembly lighting
Code First review the code /* * Light up LED: GPF4 */ .text //Indicates that it is a code segment .global _start _start: /*Configure GPF4 as output pin *Write 0x100 to address 0x56000050 to turn off the LED */ ldr r1, =0x56000050  /*Store this address in r1*/ ldr r0, =0x100 /*or use mov r0, #0x100 to put
[Microcontroller]
Disassembly and analysis of S3C2440 assembly lighting
Comparison of interrupt systems among C51, STM32 and S3C2440
/*  Name: Comparison of interrupt systems of C51, STM32 and S3C2440  Description: As for the interrupt systems of these three chips, as far as I know now, I would say: almost the same. Here, almost the same means that the interrupts are essentially the same. First, the interrupt source applies (such as triggering an e
[Microcontroller]
S3C2440-IIC
IIC (Inter-Integrated Circuit, I2C) bus is a two-wire serial bus developed by PHILIPS, used to connect microprocessors and their peripherals. Its main advantages are simplicity and effectiveness. It only needs a data line SDA and a clock line SCL to achieve bidirectional transmission between the CPU and the controlled
[Microcontroller]
s3c2440 bare metal-ADC programming
ADC hardware principle An analog-to-digital converter, or ADC for short, usually refers to an electronic component that converts analog signals into digital signals. As shown in the figure, the analog signal converted from the voltage value on the variable resistor is converted through ADC and a digital signal is outp
[Microcontroller]
s3c2440 bare metal-ADC programming
Differences between S3C2440, S3C2450 and S3C6410
S3C2440 is actually a very good CPU, with low price, many internal resources, and most importantly, it is used by many people in China, so there is a lot of relevant information. ARM920T core, 400M main frequency, support NAND FLASH, NORFLASH, SDRAM, support STN/TFT LCD, 4-channel DMA, 3-channel UART, 2-channel SPI, II
[Microcontroller]
Latest Microcontroller Articles
  • Download from the Internet--ARM Getting Started Notes
    A brief introduction: From today on, the ARM notebook of the rookie is open, and it can be regarded as a place to store these notes. Why publish it? Maybe you are interested in it. In fact, the reason for these notes is ...
  • Learn ARM development(22)
    Turning off and on interrupts Interrupts are an efficient dialogue mechanism, but sometimes you don't want to interrupt the program while it is running. For example, when you are printing something, the program suddenly interrupts and another ...
  • Learn ARM development(21)
    First, declare the task pointer, because it will be used later. Task pointer volatile TASK_TCB* volatile g_pCurrentTask = NULL;volatile TASK_TCB* vol ...
  • Learn ARM development(20)
    With the previous Tick interrupt, the basic task switching conditions are ready. However, this "easterly" is also difficult to understand. Only through continuous practice can we understand it. ...
  • Learn ARM development(19)
    After many days of hard work, I finally got the interrupt working. But in order to allow RTOS to use timer interrupts, what kind of interrupts can be implemented in S3C44B0? There are two methods in S3C44B0. ...
  • Learn ARM development(14)
  • Learn ARM development(15)
  • Learn ARM development(16)
  • Learn ARM development(17)
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号