How can I store non-volatile data used in app?

Tip / Sign in to post questions, reply, level up, and achieve exciting badges. Know more

cross mob
HyCh_2920631
Level 1
Level 1

What APIs should I use to store non-volatile data?

I am using cyw43907 and the manual says it supports External Flash Memory.

I wonder if I should use wiced_sflash_write to store the data, or whether I can save it using wiced_dct_write.

0 Likes
1 Solution

You can use wiced_dct_write() to store data during runtime in DCT section of flash. The string_var in the example is modified during runtime. The dct_read_write_app_dct_t struct in the example is user defined. Similarly you can have your own struct or you can simply store other data types in DCT dynamically. Using API to directly write to SFlash is not recommended because the SFlash has a well defined memory layout and if you write data into a dedicated section (such as bootloader), you may risk corrupting that section.

View solution in original post

5 Replies