This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

sd_flash_write returns NRF_ERROR_INTERNAL

Hello.

Using nrf51_8.0.0_API, I'm experiencing the function sd_flash_write returning the value NRF_ERROR_INTERNAL. As documented in nrf_soc.h, this error code can never be returned.

I'm using a testing software which periodically calls sd_flash_write. After a couple of hundred successful calls with return code NRF_SUCCESS, it sooner or later crashes receiving NRF_ERROR_INTERNAL since it is not expected, accordingly to the API documentation.

Is there a bugfix available or any suggestion?

Many thanks in advice. Milena

  • Hi, can you tell us a bit about your application? For example,

    1. Is the device advertising or in a connection at the time of failure?
    2. Are you advertising fast, or connecting and disconnecting rapidly?
    3. Do you use the Timeslot API?
  • Hi Martin.

    Both are true: The device is advertising while it is in a connection.

    The delay between the connections is approximately 10 seconds. Each connect and disconnect triggers the advertising to start. The failure may occur spontaneously after 500 or more loops. Please find below a trace illustrating the last few loops before the failure, including the timestamps:

    2017-09-01 11:30:07.1: WAL: Started advertising

    2017-09-01 11:30:08.2: WAL: BLE_GAP_EVT_CONNECTED

    2017-09-01 11:30:11.3: WAL: Started advertising

    2017-09-01 11:30:15.2: WAL: BLE_GAP_EVT_DISCONNECTED

    2017-09-01 11:30:18.2: WAL: Started advertising

    2017-09-01 11:30:19.0: WAL: BLE_GAP_EVT_CONNECTED

    2017-09-01 11:30:22.0: WAL: Started advertising

    2017-09-01 11:30:25.8: WAL: BLE_GAP_EVT_DISCONNECTED

    2017-09-01 11:30:28.9: WAL: Started advertising

    2017-09-01 11:30:29.5: WAL: BLE_GAP_EVT_CONNECTED

    2017-09-01 11:30:32.6: WAL: Started advertising

    2017-09-01 11:30:33.8: FTM: sd_flash_write returns errCode = 3.

    2017-09-01 11:30:33.8: FTM: Softdevice internal error // crash!

    No, we don't use the Timeslot API.

    Thank you.

  • Hello,

    We have EXACTLY the same issue - Same setup, same behavior, same symptoms ... We use SDK12.1 and nrf52. Could you please let me know if you found the root cause of this issue ?

    Thank you, Best regards, Thierry

  • In our case the problem was caused by the SoftDevice, which did not have enough time to clean up after a disconnect but was called to start advertising. The delay between disconnect and re-start advertising was only 3 seconds. We workarounded the issue by increasing that delay to 6 seconds.

    The suggestion of the Nordic developer team was to disable and re-enable the SoftDevice after each disconnect. But for our system it was not a suitable solution.

  • Hi,

    Thank you for your reply.

    I tried your workarounds, but it didn't work for me.

    My issue is probably a bit different than yours despite it can be reproduce in the same way. I posted a message on MyPage in order to get some help from Nordic.

    Thanks, Thierry

Related