This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts

Softdevice fault

Hello,

I am developing product on nrf52 with sd s112_nrf52810_5.1.0_softdevice. My application caused unexpected sd fault at adress 0x000089B2. I expect it to be something related to flash. What I did was call sd flash write function with some data and then I executed power off procedure. I dont know but I might have been interrupted. Then at the start I try to read that data and rewrite it if some checks pass. Can you let me know what causes fault from that address ?

EDIT: I should also mention that if that write wont find enough space in fds then it will execute garbage collector so it is also possible power off will execute in middle of garbage collector, so possibly in eg middle of page erase. 

Regards,

Michal

Parents
  • Hi,

    1) How often does this happen?

    2) Are you able to reliably reproduce this?

    3) What hardware are you running on? nRF52832 or nRF52810? custom board or development kit?

    4) Are you accessing the NRF_CLOCK peripheral in your application?

  • Hello,

    1) 2) I have long term tests that are writing data and after some period of time (different values 0-500ms) execute power off on the device. This is rather short test and I was executing it in parallel for 1 hour on 6 different devices. 3 did not fail and other were failing after 20, 40 and 45 minutes.

    3) nrf52832 development kit

    4) I only call nrf_drv_clock_init at the beginning

    EDIT: I am also considering option that I am writing flash too early - before fds return init event. Can that be an option in this case, given SD fault address ?

  • I will comment it out and run tests over night to see if it helped.

  • I was running tests for last hour on 4 different bords and it did not fail. I will give feedback after night. If it really helps probably should it be mentioned to not use clock_drv with sd. 

    EDIT: Hello. I was running tests on 4 boards overnight but they also did fail after 10, 30, 120 and 130 minutes. 

  • Hi,

    What is the value of NRF_SDH_CLOCK_LF_SRC, NRF_SDH_CLOCK_LF_RC_CTIV, NRF_SDH_CLOCK_LF_RC_TEMP_CTIV and NRF_SDH_CLOCK_LF_ACCURACY , found in sdk_config.h ?

    Is it always the same assert code(0x000089B2) ?

    Where in the flash are you writing values to with the sd flash write function?

    Could you share the project that creates this issue ? If you don't want to share the project publicly, then we could convert this case into a private one, or you could create a new private question where you upload the code/project, and refers to this thread.

  • H,

    set(SDK_NRF_SDH_CLOCK_LF_RC_CTIV           16 CACHE STRING "")
    set(SDK_NRF_SDH_CLOCK_LF_RC_TEMP_CTIV 2 CACHE STRING "")
    set(SDK_NRF_SDH_CLOCK_LF_SRC 0 CACHE STRING "")
    set(SDK_NRF_SDH_CLOCK_LF_XTAL_ACCURACY 0 CACHE STRING "")


    Yes, it is always the same address.

    I am using fds, I reserved 5 pages (they are placed before bootloader).

    I dont think it would be possible as source is confidential.

    Today I took one of devices after tests and attached debug session. Turns out for some reason after random number of tests (write to flash + power off) softdevice starts to return NRF_ERROR_INVALID_STATE when calling:

    sd_softdevice_enable

    It is weird as I dont think softdevice is using any flash so it should at least fix after power cycle but it doesnt. I checked flash content against binary but neither softdevice nor application were overwritten.

    EDIT: The above error was caused by some problem with debugger, it is not a real case.

  • "I see that you are using SDK_NRF_SDH_CLOCK_LF_XTAL_ACCURACY set to 0( 250ppm). The internal LF clock on the nRF52810/nnRF52832 is 500ppm. So let's try to set SDK_NRF_SDH_CLOCK_LF_XTAL_ACCURACY to 1 (500) ppm, and see if that solves the issue."

Reply Children
No Data
Related