Hi,
I want to log the application error data log into the internal flash(1MB) using the mesh example. I found that there are two ways of writing 1)FDS 2)Flash Manager. I want to know which one is better. And can i get some example code?
Hi,
I want to log the application error data log into the internal flash(1MB) using the mesh example. I found that there are two ways of writing 1)FDS 2)Flash Manager. I want to know which one is better. And can i get some example code?
We would suggest to use the Flash Manager module. It's was made for mesh SDK.
For an example of storing application data using flash manager, you can have a look at the enocean example in our SDK.
Thanks for the reply. What happens when the flash page is filled with the invalid data? I used to do "gc" in FDS, Is there anything similar I need to do to clear the invalid data? And can I increase the entry max size in flash manager ?
Thanks for the reply. What happens when the flash page is filled with the invalid data? I used to do "gc" in FDS, Is there anything similar I need to do to clear the invalid data? And can I increase the entry max size in flash manager ?
The garbage collection (defragmentation) is executed automatically by the module when there is no more space to update/add new entry to the system. Please have a look here.
The max size of an entry by default is 128. You can increase it by increasing FLASH_MANAGER_ENTRY_MAX_SIZE.
Note that you would need to increase FLASH_MANAGER_POOL_SIZE as well.
Hi,
I have gone through Flash Manager document, but I didn't find some of the things like:
1) How the FLASH_MANAGER_ENTRY_MAX_SIZE and FLASH_MANAGER_POOL_SIZE are related and if I want to increase FLASH_MANAGER_ENTRY_MAX_SIZE to 512 bytes then what should be the FLASH_MANAGER_POOL_SIZE ?
2) FLASH_MANAGER_ENTRY_MAX_SIZE and FLASH_MANAGER_POOL_SIZE should be in multiples of 128? ( like 128,256,384,512,1024)
Hi Satwik,
Please refer to the response of our R&D:
The pool size should be at least 16 bytes larger than the largest packet to fit internal overhead.
Having a pool size that just barely fits the largest entry will cause some performance issues though, so I'd recommend adjusting it to keep it at two times the size of the largest entry.
I would suggest to have the pool size of 2xFLASH_MANAGER_ENTRY_MAX_SIZE + 2x16.