Using the SDRAM, the distributed loading file is used, and the Hardfault_handler appears.

Source: Internet
Author: User
After using SDRAM, SDRAM may be used as a data area. If the SDRAM is partitioned into a data area, it must be initialized before calling the main function if the file is distributed in a decentralized manner. Otherwise, Hardfault_handler will appear. Because the address in the SDRAM is used, and the SDRAM is not initialized at this time, the address is out of bounds. can be initialized in the startup code:
Reset_handler PROC
EXPORT Reset_handler [WEAK]
IMPORT Systeminit
IMPORT __low_level_init
IMPORT __main
LDR R0, =systeminit
BLX R0
LDR R0, =__low_level_init
BLX R0
LDR R0, =__main
BX R0
Endp

In __low_level_init, call Emc_init () to initialize the SDRAM.



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.