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

What happens with pstorage if order of pstorage_register changes?

I'm wondering when my firmware changes over time what will happen with information stored with pstorage? For example if I my new firmware release adds an additional pstorage_register that occurs in between several existing pstorage_register calls what will occur? Also where does the pstorage flash reside? Is it contained within the hex firmware image or is it placed in another fixed location?

BTW, Is there any persistent storage mechanism that would use a application managed ID to store data? I'm looking for something similar to TI's osal_snv_* system...

Parents
  • Hi Anthony,

    Each time you call pstorage_register, the library will register the next consecutive page(s) for that application.
    So if you already have data stored for application 1 next to application 2, you should not register application 3 between the registers of application 1 and application 2. If you do, application 2 data will be overwrited by application 3 blocks.

    The pstorage data stored in flash start from PSTORAGE_DATA_START_ADDR. Each application's blocks will be reside inside a page or several pages if their total size are bigger than 1 page. However no block from 2 application shares the same page. Data between applications are separated by pages.

    I am not familiar with TI architecture/API, could you explain a little bit more about what it does ?

Reply
  • Hi Anthony,

    Each time you call pstorage_register, the library will register the next consecutive page(s) for that application.
    So if you already have data stored for application 1 next to application 2, you should not register application 3 between the registers of application 1 and application 2. If you do, application 2 data will be overwrited by application 3 blocks.

    The pstorage data stored in flash start from PSTORAGE_DATA_START_ADDR. Each application's blocks will be reside inside a page or several pages if their total size are bigger than 1 page. However no block from 2 application shares the same page. Data between applications are separated by pages.

    I am not familiar with TI architecture/API, could you explain a little bit more about what it does ?

Children
No Data
Related