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

Softdevice - NVS non volatile storage implementation.

Hello,

I am new to Nordic. I was trying to find a sample code that has implemented NVS / EEPROM (I don't want to use external EEPROM). But I did not find any example that has this. I had implemented NVS earlier in Zephyr but in softdevice I am seeking help.

Please help. Thanks in advance.

Thanks and regards,

Neeraj Dhekale

Parents
  • Hi Neeraj, 

    I assume you are working on nRF5 SDK ? Please note that for new development we recommend  to use nRF Connect SDK (Zephyr) instead of nRF5SDK. 

    If you need to use nRF5 SDK, the libraries you should use are fstorage and fds

    You can find their examples in \examples\peripheral.

    I also attached here a test I made to combine fstorage in a ble application. It's based on ble_app_hrs in SDK v17.1

  • Hello Hung Bui,

    I have checked by calling function flash_test before BLE stack then it works fine. but when I try to call after advertising start still I am getting error.

    Thanks and regards,

    Neeraj Dhekale

Reply Children
  • Hi Neeraj, 

    Did you test the code inside ble_app_hrs ? 
    Please make sure that the nrf_fstorage_sd.c backend is used, not nrf_fstorage_nvmc.c file.

    I attached here my project that you can test. Please note that the logging in on UART; not on RTT. 


  • Hello Hung Bui,

    Thank you very much for the code.

    It is getting built successfully but it is not printing anything on UART. So I am not able to check.

    I have attached a screenshot for your reference.

    UART Properties

    What can be the issue? I have posted this question for UART but still facing issues with UART. Standard UART example works well without any issue, but when I was trying to implement it on my own it was not working. So that's why I have posted this question regarding UART to know where and what I am doing wrong. 

    Thanks and regards,

    Neeraj Dhekale

  • Hi Neeraj, 

    You can verify if the flash got written or not by reading the flash. If you have the nrfjprog commandline tool you can use: 

    nrfjprog.exe --memrd 0x5e000

    I would suggest to test using a fresh copy of the SDK. And use an external UART terminal to test not the one comes with Segger Embedded Studio. 

  • Hello Hung Bui,

    I have verified here is the screenshot of the same.

    But nothing prints neither on UART nor RTT.

    If you want I can give you Anydesk access. Please DM me.

    Thanks and regards,

    Neeraj Dhekale

  • Hi Neeraj, 

    No I mean to verify that the flash got written or not (by the flash_test function) by calling 

    nrfjprog.exe --memrd 0x5e000

    Or any debugging tool that can read the flash at addrexx 0x5e000.

    The UART issue please try to fix it with the other case. 

Related