Hi,
i've got a hardfault while testing my code.
Unfortunately this was a tool in normal use, where I'm not able to get the complete backtrace nor a debugger on it.
The only information I've had:
The SP was at 0x200003E0.
R0 at 0x0801EA4B which is chRescheduleAhead when I'm looking in the map file.
Any idea what could be the reason for this?
HardFault on chRescheduleAhead
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: HardFault on chRescheduleAhead
It could be anything, are you able to run the code with debug options enabled?
I would look for a stack overflow or a state violation.
Giovanni
I would look for a stack overflow or a state violation.
Giovanni
- wurstnase
- Posts: 121
- Joined: Tue Oct 17, 2017 2:24 pm
- Has thanked: 43 times
- Been thanked: 30 times
- Contact:
Re: HardFault on chRescheduleAhead
Yes, I will try to check this with debug options again.
Unfortunately this occure only once for now, just after a reboot.
How much space should the main stack have? I can see it will go down to 100bytes free.
Unfortunately this occure only once for now, just after a reboot.
How much space should the main stack have? I can see it will go down to 100bytes free.
\o/ Nico
- Giovanni
- Site Admin
- Posts: 14455
- Joined: Wed May 27, 2009 8:48 am
- Location: Salerno, Italy
- Has thanked: 1076 times
- Been thanked: 922 times
- Contact:
Re: HardFault on chRescheduleAhead
Just enough, there is no need to keep "free" space.
You should also try to enable HW stack check, there is a port option for that, it is much more reliable than the normal SW check. If the application is critical I recommend keeping stack checking ON in release code.
You may also try to use chSysIntegrityCheckI() in your error handler for some on-field diagnostic.
Giovanni
You should also try to enable HW stack check, there is a port option for that, it is much more reliable than the normal SW check. If the application is critical I recommend keeping stack checking ON in release code.
You may also try to use chSysIntegrityCheckI() in your error handler for some on-field diagnostic.
Giovanni
Who is online
Users browsing this forum: No registered users and 2 guests