fds_gc() garbage collect always causes a reset

Using SDK 17.1.0, SD s140_nrf52_7.2.0

I have FDS working - I can read/write records.  I am using it to store ongoing logs.

When I get to a FDS_ERR_NO_SPACE_IN_FLASH, I delete a certain number of records to make room.  Then call fds_gc().

fds_gc() always causes a reset.  After reset however, it seems to have done the needful, I have the expected amount of flash available again, and I can continue writing records until I hit a NO_SPACE error again.

Any ideas on what to do here ?

Thanks - Daraius

Parents
  • Hi,

    Calling fds_gc() in itself should not cause a reset. A reset is a typical mechanism used to recover from an error, for instance if a function call returns an unexpected error code, if an assert fails, or if a HardFault occurs in the chip, Do you have logging enabled in your application? The log normally tells you if there was an error, and if you build the application in Debug configuration, the log should tell you exactly where the error occured.

    You could also try to debug the application, by setting breakpoints at any calls to NVIC_SystemReset() and read out the call stack to see where the problem originated.

    Best regards,
    Jørgen

  • Here is capture of a crash when running fds_gc().  In this case I am not using the softdevice.  I have set FDS_BACKEND=1.

    This all started with a single call to fds_gc()

    Sorry a large screen capture and thats only half the list.  SES does not seem to have a way to copy the contents.

    I have seen this exact hard fault many times - dies at vListInsertEnd().

    gc_execute seems to run recursively until it runs out of stack ?

Reply
  • Here is capture of a crash when running fds_gc().  In this case I am not using the softdevice.  I have set FDS_BACKEND=1.

    This all started with a single call to fds_gc()

    Sorry a large screen capture and thats only half the list.  SES does not seem to have a way to copy the contents.

    I have seen this exact hard fault many times - dies at vListInsertEnd().

    gc_execute seems to run recursively until it runs out of stack ?

Children
Related