Other Parts Discussed in Thread: MSPM0L1306
Hello.
So the flash program size on this MCU is a flash word (64bits). I'm trying to understand how write works when trying to write smaller chunks in the same sector. I've slightly modified the 'flashctl_multiple_size_write' program such that it writes a byte at offset 0, 2 bytes at offset 1, 4 bytes at offset 3 and finally 8 bytes at offset 7 (thereby straddling the word boundary). So this is how it should look in principle.
11 22 22 33 33 33 33 44 44 44 44 44 44 44 44
|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|--------|
0x1000 0x1007 0x100F
I now step through the program and see how the memory looks
Writing 11 at 0x1000:
Writing 2222 at 0x1001:
Writing 33333333 at 0x1003:
Writing 4444444444444444 at 0x1007:
Looking at the screen shots above, it looks like executing a 'program memory from RAM' inherently results in the sector being partially wiped. Sometimes existing bits are all zeroed (writing 0x2222 at 0x1001 and writing 0x4444444444444444 at 0x1007) out while some other times, they remain intact (writing 0x33333333 at 0x1003).
Can someone give me a rundown on what the actual rules are so I can be sure of what I can expect?