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

Maximum number of pages with fstorage

Hi,

I'm currently trying to make a flash logger using the nRF51822_XXAB. I want to use as much space as possible in the flash storage for the logs. I will be logging a word every 10 seconds. I made a program that works well for that, using my first page of flash to keep a header and the index of the last log. This header is at the end of the page directly in front of my data. I am using fstorage because I need the data to be contiguous, hence why I can't use fds I think. 

My problem is, I seem to be only able to use 6 pages as my maximum for "num_pages". I understand that the nRF51822_XXAB has 128kB of space and my code is only using 17kB according to Keil:
Program Size: Code=16604 RO-data=584 RW-data=220 ZI-data=9340  

There must be something I'm missing, maybe a limitation set in fstorage.h that I missed or something like that.

EDIT:: Forgot to say that I'm using SDK 12.3.0

Parents
  • Hi,

    If it is a BLE application (using the s130 SoftDevice v2.0.1) then you must account for both application size and SoftDevice size for the total flash memory usage.

    Just as you wrote, nRF51822 xxAB variants have 128 kB of flash.

    s130 v2.0.1 is 108 kB. Add 17 kB to that for 125 kB total SD + app, leaving 3 kB free space.

    Regards,
    Terje

Reply
  • Hi,

    If it is a BLE application (using the s130 SoftDevice v2.0.1) then you must account for both application size and SoftDevice size for the total flash memory usage.

    Just as you wrote, nRF51822 xxAB variants have 128 kB of flash.

    s130 v2.0.1 is 108 kB. Add 17 kB to that for 125 kB total SD + app, leaving 3 kB free space.

    Regards,
    Terje

Children
Related