Measuring stack depth of function cause hardfault, inside the first for loop when ii > 4
the IMPRECISERR bit is set in the Configurable Fault Status Register (CFSR)
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 12:35 AM - edited ‎2023-11-20 4:19 AM
Accepted Solutions
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 6:03 AM
the stack goes down, not up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 5:46 AM
> inside for loop when i > 4
which loop? which i?
What type has stack_pointer? You cast it to uint8_t in the second loop, but not in the first?
ST uses the gcc idiom
register char * stack_ptr asm("sp");
to get the stack pointer
.
hth
KnarfB
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 5:47 AM
I made edit
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 5:50 AM
what type? What + 4 does depends on the type (size).
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 6:02 AM
unit32_t, I guess I'm increament the pointer in wrong direction
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 6:03 AM
the stack goes down, not up?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-31 6:07 AM
So, I have to decreament the pointer, not increamenting it
