Unexpected Error in managing pointer: ''void HardFault_Handler (void)''
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-08-25 4:22 AM
In a project I'm using a pointer to read data from memory.
I have problems with this procedure.
My pointer is a uint32_t * punt.
The pointer extracts the data and then increments itself.
extraction = *punt;
punt = punt +1;
With a loop 'for' the program repeats the operation n times.
If I run the cycle one or two times, everything is fine.
If I run the cycle for n> = 3 then I fall into 'void HardFault_Handler (void)'.
Please help me.
Thank
#void-hardfault_handler-(void) #stm32f4 #pointer- Labels:
-
STM32F4 Series
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2017-08-25 5:46 AM
Have a proper Hard Fault handler so you can examine the code (the stuff the processor executes, not your high level code). Disassemble the instructions that are faulting. Look at those and the processor registers in the context of why they would fault.
Here is an example of a Handler that isn't a non-instructive while(1) loop,
https://community.st.com/0D50X00009XkfOXSAZ
Present a complete, compilable, example that demonstrates the issue.
Up vote any posts that you find helpful, it shows what's working..
