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

Removing pstorage and fstorage in BLE application.

I am using nrf51822 for a BLE project as peripheral role. I am using S110 soft device (SDK version 10). I want to store bonding information, GATT data and all data storage required by soft devices in external EEPROM chip/SD card, instead of using pstorage as provided by SDK Libraries.

I also want to replace fstorage with my volatile memory storage in EEPROM/SD card.

Please explain the difference between pstorage and fstorage.

Parents
  • Pstorage (and Fstorage) accesses flash by using the SoftDevice API, sd_flash_write() and sd_flash_page_erase(). It reads from flash with memcpy(). And it gets system events from the SoftDevice so that it knows if a flash operation succeeded or not, NRF_EVT_FLASH_OPERATION_SUCCESS and NRF_EVT_FLASH_OPERATION_ERROR.

    Pstorage wasnt' designed to be used with an external EEPROM, but if you really need use it, you need to at least change the interface so that it matches with whatever interface your EEPROM has.

Reply
  • Pstorage (and Fstorage) accesses flash by using the SoftDevice API, sd_flash_write() and sd_flash_page_erase(). It reads from flash with memcpy(). And it gets system events from the SoftDevice so that it knows if a flash operation succeeded or not, NRF_EVT_FLASH_OPERATION_SUCCESS and NRF_EVT_FLASH_OPERATION_ERROR.

    Pstorage wasnt' designed to be used with an external EEPROM, but if you really need use it, you need to at least change the interface so that it matches with whatever interface your EEPROM has.

Children
Related