This post is older than 2 years and might not be relevant anymore
More Info: Consider searching for newer posts
This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

pstorage page size

I try to optmize my code so it can run on the 128k chip. My issue is with pstorage: I have 7 variables (from 4 bytes to 20 bytes) that I store in individual blocks. But it seems that on a page, there is only one block ? So for each block, I need PSTORAGE_FLASH_PAGE_SIZE. if PSTORAGE_FLASH_PAGE_SIZE = 1024, I need 7k to store my 7 variables ?

So I try to reduce PSTORAGE_FLASH_PAGE_SIZE, but I have strange behaviour when I do this. Should it be possible to have PSTORAGE_FLASH_PAGE_SIZE to 20 bytes ?

Parents
  • Thanks, some of my variables were in differents services. But I could probably refactor my code to use a single page.

    A quick look at pstorage.c (where PSTORAGE_FLASH_PAGE_SIZE is used) doesn't indicate to me that it's a bad idea to change it... So there is probably something that I don't understand ? Can you explain me what is the problem ?

Reply
  • Thanks, some of my variables were in differents services. But I could probably refactor my code to use a single page.

    A quick look at pstorage.c (where PSTORAGE_FLASH_PAGE_SIZE is used) doesn't indicate to me that it's a bad idea to change it... So there is probably something that I don't understand ? Can you explain me what is the problem ?

Children
No Data
Related