how should i replace pstorage from sdk so as to write data to eeprom or sd card instead of flash(as defined in SDK).
how should i replace pstorage from sdk so as to write data to eeprom or sd card instead of flash(as defined in SDK).
I don't quite understand what you want to do. Do you want to modify Pstorage to use external eeprom or SD card? Or do you really mean replace? What kind of interface do you have to the eeprom or SD card? I think you should edit your question and try to elaborate quite a lot.
i want to replace pstorage for external eeprom
I don't understand, Pstorage is a software module.
How to modify Pstorage to use external EEPROM?
Pstorage 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.