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

sd_flash_write writes corrupted data when BLE is enabled

Hi,

I wrote some code that writes to the flash perfectly when BLE is not enabled but when it is enabled, some of the data are correct while others are either missing or shifted to a later address. Below is a snippet of the code:

uint32_t retval;
while(NRF_ERROR_BUSY == (retval = sd_flash_write(p_dst, p_src, num_words)));
ASSERT(NRF_SUCCESS == retval);

I'm trying to avoid pstorage since I'm want to write to a contiguous block of flash much greater then the page size.

Thanks.

Parents Reply
  • Ah - if you're using the device manager or anything else which uses pstorage under the hood then you have a massive conflict between what you're doing and what it's doing. It registers a handler for SWI2 and processes ble and system events and expects that any flash callbacks come from the pstorage module. That might explain why you don't see system events too, pstorage may have eaten them. if you have pstorage linked in you really can't use your own flash storage.

Children
No Data
Related