Analysis of the Data Copy Process in the S3C2410-2440 Startup Code Analysis of the Data Copy Process in the S3C2410 Startup Code Dongguan Quanzhi Group Fan Wei mail: fanwei326@163.com; wfan@gsl.com.cn If there are any errors in this article, please write to correct them. After the S3C2410 starts, some necessary settings are first performed, such as turning off WatchDog, setting PLL and clock, configuring SDRAM, initializing the stack, etc. There are many articles on the Internet that analyze the startup code, and this article does not intend to explain them again. This article analyzes the two situations of starting from NOR Flash and NAND Flash respectively. First of all, we must know that NOR Flash is XIP. If it is started from NOR, the code is first executed in NOR Flash. Considering the running speed, we have to copy the code to SDRAM for execution. When the system is set to start from NAND FALSH (controlled by the level of the OM[1:0] pin), due to its own characteristics, NAND Flash does not have the function of running programs, and programs cannot be executed in NAND Flash. The CPU will automatically load the first 4K code in NAND into the internal SRAM (SteppingStone stepping stone) of the CPU, and then map SteppingStone to address 0 of the CPU address space (BANK0), so the CPU will fetch instructions from address 0 of SteppingStone and execute them. Because the program is generally larger than 4K, we must copy the code to SDRAM for execution. In summary, whether it is started from NOR or NAND, the code must be copied to SDRAM for execution, and this copying process must be completed in the first 4K code. After that, this 4KB SRAM can also be used for other purposes. It must also be noted that the program entry points ResetEntry for NOR and NAND startup are both 0. After power-on, the CPU will fetch instructions at 0x0 for execution, as shown in the figure below. 1. Let\'s first look at the situation of booting from NOR Flash: The following code is used for judgment before copying, ...
You Might Like
Recommended ContentMore
Open source project More
Popular Components
Searched by Users
Just Take a LookMore
Trending Downloads
Trending ArticlesMore