Stack problems SP pointer

Source: Internet
Author: User

Why do I run it after setting SP to 4096? Is it from 4096 and then 4095 or 4097? 4096 is steppingstone's address?
Why is the interruption set to 3072?

 

 

S3C2410 and S3C2440 have internal RAM and external SDRAM, which are called memory;
The SP is located in the memory, which can be internal RAM or SDRAM, as long as the current runningProgramYou can.

At startup, first execute the internal RAM 4096, and thenCodeMove to SDRAM and execute:
A: At the beginning, the SDRAM is unavailable. Therefore, if you want to use the C function before initializing the SDRAM, you must set the SP in the internal RAM.

In this case, set the first 4096 of SDRAM to the stack, and the last 4096 to the code area, right?
A: No. When the program starts running, the 4096 internal Ram has code that initializes the SDRAM and reads all the code from the NAND to the SDRAM. The code to complete these functions is very small, the number is less than 4096 bytes, so you can set the SP to 4096.

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.