Why is SP set to 4096? How does it run after setting? Do you start writing from 4096 and then write to 4095 or 4097? Is 4096 the address of the steppingstone?
Why is the interrupt set to 3072?
S3C2410 and S3C2440 have internal RAM and external SDRAM, which are all called memory;
SP is located on the memory, which can be internal RAM or SDRAM, as long as it does not damage the currently running program.
At startup, the internal RAM's 4096 is executed first, and then the NAND code is moved to the SDRAM for execution:
Answer: At the beginning, SDRAM is not available, so before initializing SDRAM, if you want to use the C function, you must set the SP in the internal RAM.
At this time, the first 4096 bytes of SDRAM are set as stack, and the area after 4096 is code area, right?
Answer: No. When the program starts running, there is code in the internal RAM of these 4096 bytes. These codes initialize SDRAM and read all codes from NAND to SDRAM. The code to complete these functions is very small, less than 4096 bytes, so SP can be set at 4096 bytes.
|