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
Tools and Software
Software Tools
Jump...
Cancel
Software Tools
Arm Development Studio forum
Hard Fault on cortex M3 NXP
Tools, Software and IDEs blog
Forums
Videos & Files
Help
Jump...
Cancel
New
Replies
3 replies
Subscribers
126 subscribers
Views
3265 views
Users
0 members are here
Related
Hard Fault on cortex M3 NXP
Offline
Alessandro Spinetti
over 7 years ago
Note: This was originally posted on 20th June 2011 at http://forums.arm.com
I've coded a small program to download in a usb memory some data acquired from the LPC1768 Cortex M3.
I use IAR EW to code and J-Link LITE to program/debug the code.
So, when I test my program with debugger connected (either in debug or release mode) it works fine.
When I program the micro and run it without the debugger connected I obtain an Hard Fault exception.
When I check the value of HFSR it return 0x80000000 -> DEBUGEVT = 1 ?
Why? Where is my fault?
Thanks.
Alessandro
Offline
Alessandro Spinetti
over 7 years ago
Note: This was originally posted on 20th June 2011 at
http://forums.arm.com
Hy Joseph,
I've searched any occurrence of BKPT instruction, but I haven't found it.
It's not simple to debug, I can only put some strings in 16x2 character lcd. I write to the lcd the DFSR value also and the value is 0x2. Maybe the core is in a debug mode?
Thanks.
Cancel
Up
0
Down
Reply
Cancel
Offline
Joseph Yiu
over 7 years ago
Note: This was originally posted on 20th June 2011 at
http://forums.arm.com
The most likely issue is that the program has called a function which try to communicate with the debugger.
A breakpoint (BKPT) instruction is executed, and since there is no debugger attached, it went into hardfault instead.
Keil website has an application note about debugging fault exception:
http://www.keil.com/appnotes/docs/apnt_209.asp
Please try to generate a disassemble code of the program image and see if there is any BKPT instruction generated, and trace what function call could have run the BKPT function.
Hope this helps.
regards,
Joseph
Cancel
Up
0
Down
Reply
Cancel
Offline
Joseph Yiu
over 7 years ago
Note: This was originally posted on 20th June 2011 at
http://forums.arm.com
If DFSR is 0x2, it means BKPT instruction executed.
Iin the hardfault handler, you can try output the stacked PC value to your LCD.
(
http://embdev.net/topic/177024
)
From the stacked PC value, you should see what instruction the code was running.
regards,
Joseph
Cancel
Up
0
Down
Reply
Cancel
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
Suggested Answer
Fail to run the Ds5 example project "Armv8-A SMP AArch64 Startup Code for Linaro bare-metal GCC - Arm DS-5 "
0
9244
views
1
reply
Latest
7 months ago
by
Ronan Synnott
Answered
STM32F411RE: cannot use #include math_arm.h for CMSIS
0
STM32F4DISCOVERY
Digital Signal Processor (DSP)
CMSIS
36111
views
7
replies
Latest
7 months ago
by
HonestTrooper
Suggested Answer
DS5 Evaluation License problem
0
10906
views
3
replies
Latest
7 months ago
by
Ronan Synnott
Answered
Arm Evaluation License: Unable to execute remote query (response code 503)
0
Tool Licensing
10536
views
2
replies
Latest
7 months ago
by
Ronan Synnott
Not Answered
ARM's Server "remote query (response code 503)" for license
0
10502
views
3
replies
Latest
7 months ago
by
Ronan Synnott
<
>
View all questions in Arm Development Studio forum