The difference between mini2440 nand flash and nor flash boot

Publisher:备战Latest update time:2015-09-07 Source: eefocusKeywords:mini2440  nand  flash  nor  flash boot Reading articles on mobile phones Scan QR code
Read articles on your mobile phone anytime, anywhere
   Mini2440 and other types of development boards generally have two ways to boot from NAND flash and NOR flash. What is the difference between these two boot methods? Beginners are usually confused. Let's talk about the difference between these two boot methods.

 

    The nand flash of mini2440 is 128M, while the nor flash is only 2M. The bootloader of the system is usually very small, only more than 200KB. As a complete system, it needs bootloader (200KB), kernel (2M), and rootfs (100M), which add up to more than 100M. These three parts need to exist in the system all the time and be non-volatile when power is off. Of course, they cannot be placed in the memory (SDRAM), but need to be placed in the non-volatile memory nandflash. Norflash is very small (2M) and can only accommodate the bootloader. Therefore, the nand flash of mini2440 stores bootloader (200KB), kernel (2M), rootfs (100M), and norflash stores bootloader. Therefore, mini2440 can be started from both nandflash and norflash, but it can only be started from nandflash to run the operating system. When starting from nand flash, the entire operating system is not running in nand flash, but is mapped to the memory SDRAM to run. It is worth noting that by entering the bootloader menu item in norflash boot mode, you can download programs or files to nandflash through DNW, or upload things in nandflash to PC, rather than only being able to transfer files and programs between norflash and PC.

    

 The first instruction read when S3C2440 starts is at 0x00, which is divided into nand  flash and nor  flash.

 Nor  flash has its own address lines and data lines, and can use random access methods similar to memory.  Programs can be run directly on nor flash, so nor  flash can be used directly for booting.  When using nor flash to boot, the address will be mapped to 0x00. mini2440 directly burns vivi on nor  flash.

 NAND  flash is an IO device. The data, address, and control lines are all shared. The software area is required to control the read timing. Therefore, it cannot be  randomly accessed like NOR flash and memory, and cannot have EIP (on-chip operation). Therefore, it cannot be used directly as a boot.

S3C2440  burns the boot loader to nand  flash for startup, because there is a built-in SRAM in S3C2440, called stepping  stone (very vivid...), after the system is powered on,  the first 4KB of the content on nand flash will be copied to SRAM for execution, thus realizing  the boot from nand flash. If the bootloader is less than 4KB (like vboot), it can be booted in SRAM, if it is larger than 4KB (u-boot, vivi), after some basic initialization in SRAM, the rest of the bootloader will be copied to SDRAM (>0x30000000).

//==================================================================//Note: The bootloader is a small program that runs before the operating system kernel runs. Through this small program, we can initialize the hardware devices and establish a mapping of the memory space, so as to bring the system's hardware and software environment to a suitable state, so as to prepare the correct environment for the final call to the operating system kernel. Usually, the bootloader is heavily dependent on the hardware to be implemented, especially in the embedded world. Therefore, it is almost impossible to build a universal bootloader in the embedded world. Despite this, we can still  summarize some general concepts of Boot  Loader  to guide the design and implementation of user-specific  bootloaders.

//================================================ =================//

When we use S3C2440, we often  start it through NOR flash and enter the menu of Vivi (the NOR  flash of S3C2440 has been burned with Vivi), and then download other bootloaders to NAND  flash through the USB download function of Vivi. After the download is complete, we  start it through NAND flash to test our boot  loader.

 Nor  flash is suitable for code storage and EIP, while nand  flash is suitable for large-scale data storage.

Nand  flash boot:  The first 4K of nand  flash memory will be automatically loaded into Stepping  stone (internal SRAM buffer), and then the system automatically executes the loaded boot code. This 4K boot code needs to  copy the content in nand flash to SDRAM for execution.  The first 4K space of nand flash is used to store boot code. SDRAM is faster and is used to execute the code of the main program.

//================================================ ================//

Note: SDRAM (Synchronous  Dynamic  Random  Access  Memory), synchronous dynamic random access memory, synchronization means that  the memory needs a synchronized clock to work, and the internal command sending and data transmission are based on it; dynamic means that the storage array needs to be constantly refreshed to ensure that data is not lost; random means that data is not stored linearly in sequence, but is freely specified to read and write data at the address.

//================================================ =================//


Keywords:mini2440  nand  flash  nor  flash boot Reference address:The difference between mini2440 nand flash and nor flash boot

Previous article:ARM9 S3C2440-ADC and touch screen control detailed explanation
Next article:Summary of the connection methods between Mini2440 development board and PC

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号