2019-06-12 08:08 AM
Hi guys,
I have to store some data on a sd-card. (The data will be a huge number of bytes)
I want to save them in a high frequency (now about 5kHz) in a buffer on the chip (RAM) and then store them in a lower frequency (1Hz) on the sd card.
So I have several problems but as sonn as the buffer is active I get a IMPRECISERR ...
Is there any possibility to get a more precise information about when does the error occur?
kind regards,
Felix G.
P.S.: If you need further details i will try to get them known and post them, but i have no idea where to search for more information...
P.P.S.: It's my first time doing such a deep error research
Solved! Go to Solution.
2019-06-12 08:26 AM
Okay I have solved the problem about 5 seconds ago ...
I had an easy overflow ... didn't note that in c there is the max array index -> maxlength -1 ;)
thx for fast response :D
kind regards
2019-06-12 08:17 AM
The CPU has a TRM describing the registers providing details of the fault. Books from the likes of Joseph Yiu explain it somewhat more practically.
A while(1) loop is not a useful Hard Fault Handler, many better examples have been published to the forum.
Imprecise in this context means the write was deferred (buffered), so the location of the actual instruction responsible is likely a couple back from one being flagged, ie imprecise != exact
Look for the STR instruction, look at the register it is using as a pointer, and where that came from, review the assembler in the context of your own code it is derived from.
Instrument your code, consider sanity checking the pointer or index involved in this fault prior to using them.
2019-06-12 08:26 AM
Okay I have solved the problem about 5 seconds ago ...
I had an easy overflow ... didn't note that in c there is the max array index -> maxlength -1 ;)
thx for fast response :D
kind regards