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

Strange Program Unit Value with fstorage

Hi All,

I'm trying to create a hybrid program using the USB CDC ACM example as well as the flash_fstorage example from SDK16. I've been able to get the USB CDC ACM example to work on the dongle, however I'm having issues getting the fstorage to work. Because I'm not using a soft device, i've been trying to use the mvcm backend.

I get an NRF_SUCCESS when I do 

rc = nrf_fstorage_init(&fstorage, p_fs_api, NULL);

However, when it gets to here:

print_flash_info(&fstorage);

My output looks like:

========| flash info |========
erase unit: 536871936 bytes
program unit: 2457 bytes

Which both of those seems wrong... for NRF52 I believe erase should be 4096, and program should be 4... Any ideas what could be happening? Thanks!

  • Hi,

    The fact that the erase and program unit is wrong suggests to me that storage has not been initialized correctly since that is set when the backend is initialized (specifically by line 101 in components\libraries\fstorage\nrf_fstorage_nvmc.c). Can you double check that? If that is not the case, can you share some code showing what you have done, so that we can see if you seem to miss something or if there are other potential issues?

Related