Storing values in mcu flash during run time

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

cross mob
Anonymous
Not applicable

Hi,

I am using BCM943362WCD4 module and SDK 2.4.0.

In my application, I am receiving commands through TCP and depending on the commands, I am doing a soft reset. I need to store some values in mcu flash before reset so that I can read them after reset. Does the SDK has any API for this ? Please help me in this regard.

Thanks.

0 Likes
3 Replies
SeyhanA_31
Employee
Employee
250 replies posted 100 replies posted 50 replies posted

Hi Raghuraman,

You may take a look at snip.dct_read_write sample application for an example code to store your custom values then read them after reboot.  ...\Apps\snip\dct_read_write\dct_read_write.c

Hope it helps.

Seyhan

0 Likes
Anonymous
Not applicable

Hi seyhan,

Thanks for the reply. But i think that writes data in to the dct section. If I write any data there, won't it overwrite the dct?

I need to write just few bytes of data (< 50).

In this post Re: Store arbitrary data on flash with WICED

gerdiman has given some alternate solution in the last. Do u know how to do that ?

Thanks.

0 Likes

Hi Raghuraman,

Yes there are two DCT sections (DCT1 and DCT2) and each are set to 16K size by default. They are swapped as they are written. Example of updating DCT sections you can find in snip.dct_read_write sample app.

You may expand the DCT (platform_dct_data_t) to include your own sections (data). More information you can find in .../Wiced/Platform/include/platform_dct.h.

If your target hardware has a serial flash, you may use the serial flash to store your data as well.

Thanks,

Seyhan