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

Does Zigbee persistent data need 48kB or 48 pages of flash?

Looking at the instructions to add Zigbee to a SDK example here, I am instructed to define FDS_VIRTUAL_PAGES_RESERVED to 0x30 to reserve some flash for Zigbee persistent data. It seems like the same number is used in the multiprotocol examples as well (for instance #define FDS_VIRTUAL_PAGES_RESERVED ((ZIGBEE_NVRAM_PAGE_SIZE * (ZIGBEE_NVRAM_PAGE_COUNT + ZIGBEE_NVRAM_CONFIG_PAGE_COUNT))/FDS_VIRTUAL_PAGE_SIZE) ).


This seems to reserve 48 pages of flash. The documentation here however indicates that one needs to reserve 48kB of flash, not 48 pages (192kB).

If I define FDS_VIRTUAL_PAGES_RESERVED to 0x30 as instructed, flash_end_addr() in fds.c (from the Thread and Zigbee SDK, v2.0.0) returns 0xD0000, seen by "printf-debugging". Examining the flash after running and joining a network, shows unused flash from 0xD0000 to 0xF4000, and some used flash after 0xF4000. This is without any bootloader.

Have I misread or miscalculated the macros, or is there something odd here? How much flash should really be reserved for the Zigbee persistent data? I could use those extra 144kB that would be freed if 48kB is the answer :)

Parents Reply Children
No Data
Related