Skip to main content
FGese
Associate
June 12, 2019
Solved

IMPRECISERR while storing data in array

  • June 12, 2019
  • 2 replies
  • 708 views

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

    This topic has been closed for replies.
    Best answer by FGese

    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

    2 replies

    Tesla DeLorean
    Guru
    June 12, 2019

    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.

    Tips, Buy me a coffee, or three.. PayPal Venmo (See Profile) Up vote any posts that you find helpful, it shows what's working..
    FGese
    FGeseAuthorBest answer
    Associate
    June 12, 2019

    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