Arm Community
Site
Search
User
Site
Search
User
Groups
Arm Research
DesignStart
Education Hub
Graphics and Gaming
High Performance Computing
Innovation
Multimedia
Open Source Software and Platforms
Physical
Processors
Security
System
Software Tools
TrustZone for Armv8-M
中文社区
Blog
Announcements
Artificial Intelligence
Automotive
Healthcare
HPC
Infrastructure
Innovation
Internet of Things
Machine Learning
Mobile
Smart Homes
Wearables
Forums
All developer forums
IP Product forums
Tool & Software forums
Support
Open a support case
Documentation
Downloads
Training
Arm Approved program
Arm Design Reviews
Community Help
More
Cancel
Developer Community
IP Products
Processors
Jump...
Cancel
Processors
Cortex-M / M-Profile forum
hard fault with Cortex M1
Blogs
Forums
Videos & Files
Help
Jump...
Cancel
New
State
Not Answered
Replies
10 replies
Subscribers
6 subscribers
Views
7702 views
Users
0 members are here
Cortex-M1
Cortex-M
firmware
Related
hard fault with Cortex M1
Offline
sumit sumit
over 7 years ago
Note: This was originally posted on 24th December 2008 at
http://forums.arm.com
Hi all,
I am developing firmware on Cortex M1 on Actel fusion FPGA.I have built the design that has sram at 0x0 location ,size is 1mb and I use it as my program memory.I have Ethernet interface and I want to debug the driver for the ipcore.
I am facing the problem due to hard fault.When I start the transmission on the Ethernet,after transmission first frame the cortex goes to hard fault.
Would anyone tell me what may be the reason for hard fault? How to overcome?
I am completely new to arm environment.
regards,
Sumit
Parents
0
Offline
guestposter guestposter
over 7 years ago
Note: This was originally posted on 8th December 2009 at
http://forums.arm.com
Not sure if it help, there are various things you might need to check.
First, please check if the FPGA image you are using contains the OS support.
(On Cortex-M1 OS support hardware is optional).
What might have happen is that :
- you created your stack frame in the stack
(Is the content of the stack frame correct?
If the stack frame aligned to double word address?)
- you set your process stack pointer (PSP) to point to the beginning of this stack frame
(Did you update PSP correctly?
Did you take account of the requirement of double word alignment?
Does the PSP really pointing to the correct address in the stack frame?)
- You carry out an exception return, LR specifying using PSP for unstacking.
(did LR set to correct value?)
- The exception return load the stack frame contents into registers.
If the PSP location is wrong, the processor loaded in incorrect values.
This include the 0xa5a5a5a5 loading into PC. Since this is not a valid location
for program code, the hard fault is triggered when it try to fetch instruction.
- At hard fault exception entry, the value 0xa5a5a5a5 is pushed to the stack as return address.
regards,
Joseph
Cancel
Up
0
Down
Reply
Accept answer
Cancel
Reply
0
Offline
guestposter guestposter
over 7 years ago
Note: This was originally posted on 8th December 2009 at
http://forums.arm.com
Not sure if it help, there are various things you might need to check.
First, please check if the FPGA image you are using contains the OS support.
(On Cortex-M1 OS support hardware is optional).
What might have happen is that :
- you created your stack frame in the stack
(Is the content of the stack frame correct?
If the stack frame aligned to double word address?)
- you set your process stack pointer (PSP) to point to the beginning of this stack frame
(Did you update PSP correctly?
Did you take account of the requirement of double word alignment?
Does the PSP really pointing to the correct address in the stack frame?)
- You carry out an exception return, LR specifying using PSP for unstacking.
(did LR set to correct value?)
- The exception return load the stack frame contents into registers.
If the PSP location is wrong, the processor loaded in incorrect values.
This include the 0xa5a5a5a5 loading into PC. Since this is not a valid location
for program code, the hard fault is triggered when it try to fetch instruction.
- At hard fault exception entry, the value 0xa5a5a5a5 is pushed to the stack as return address.
regards,
Joseph
Cancel
Up
0
Down
Reply
Accept answer
Cancel
Children
No data
More questions in this forum
By title
By date
By reply count
By view count
By most asked
By votes
By quality
Descending
Ascending
All recent questions
Unread questions
Questions you've participated in
Questions you've asked
Unanswered questions
Answered questions
Questions with suggested answers
Questions with no replies
Not Answered
Using STM32H7 ETM without external tool
0
CoreSight ETM7
STM32
331
views
0
replies
Started
3 months ago
by
GuillaumeP
Not Answered
How to realise Real-time detection of access of memory beyond the bounds of an allocation block, instead of period detection in Cortex-M4. Please give me any idea.
0
Cortex-M4
1052
views
3
replies
Latest
3 months ago
by
42Bastian Schick
Not Answered
Getting Dummy character while receiving UART data,How to fix it ?
0
732
views
2
replies
Latest
3 months ago
by
Jerome Decamps - 杜尚杰
Not Answered
Timer not working in stm32f401re
0
Keil MDK Cortex-M Edition
STM32
Cortex-M
STM32 F4
618
views
1
reply
Latest
3 months ago
by
42Bastian Schick
Not Answered
Is there an FPGA image for the MPS2+AN521 with an FPU?
0
Cortex-M33
Cortex-M Prototyping System (V2M-MPS2)
343
views
0
replies
Started
3 months ago
by
erickroane
<
>
View all questions in Cortex-M / M-Profile forum