Refreshing the MCU flash memory
Answer
7/12/19 11:54 AM

Hello, everyone!

In XDK_FreeRTOS guide, in the section about memory, there are following words: "Second, although the flash memory is persistent through restarting the XDK, it will not persist through flashing a new application. When a new application is flashed, every unused bit of the flash memory will be set to 1. Since the flashing-process does not use the reserved segment, the reserved segment will always be cleared.".

But when I checked it myself, I faced different results: In my application, I check whether the first 5 bytes are equal to some characters, if yes just print the message about that. The thing is once I wrote to the memory these characters, they are still contained in the memory even after I flash a different application (i.e. LedsAndButtons) and then flash my application again (now without writing these characters in the memory). My application still prints that the first 5 bytes are equal to these characters. So the memory is not refreshed. Why it could be so?

 

Thanks!

I am using Workbench 3.6.0 and bootloader version 1.1.0, and I flash applications though USB.

0 (0 Votes)
RE: Refreshing the MCU flash memory
Answer
7/16/19 8:50 AM as a reply to Temirlan Amangeldin.

Hello Temirlan,

Your understanding of the XDK freertos guide is correct. XDK flash memory will not persisted through flashing a new application. It must also be noted that, only that "When a new application is flashed, every unused bit of the flash memory will be set to 1".

You can verify this by writing 5 bytes with application -1 and reading the bytes. With application 2, write different 5 bytes of data, now read the written bytes. You can check whether 5 bytes from application-1 is different from 5 bytes from application-2.

Thank you,

Padmapriya

0 (0 Votes)