Electronic – MSP430F5438A: How to see the flash memory content in CCS

flashmemory

I have to establish a file transfer mode between C# and CCS.
To make sure the text files has transferred properly, after sending a file I read it from C# to compare with the origin.

I need to look at the flash memory content all the time for these reasons:

  1. I get different results of writing to specific memory segments, for instance: if I start writing at 0x20000, some characters distord, but if I start at 0x20008, everything works OK then, 0x20016 half OK half garbage, etc..
  2. Even with the Non-problems mode (0x20008) just the transferring the first file works fine, if I send another file and try to read it then, all I get is just garbage.

This photo if anyone would like to see the writing/reading procedure code:

enter image description here

Best Answer

I believe the distortion you see may be because you don't erase the flash before programming it again.

You are using the WRITE bit but you must have a piece of code that uses ERASE bit set to erase the block.

With flash you must erase everything as a block before writing. This is the number one issue I see when helping customers do over the air updates and firmware updates.

The other reason is that the data didn't arrive properly for whatever reason.