Tool/software:
Hi
i am currently writing a NVM stack for the mentioned micro, where the lowest layer (Abstr_ * in my nomenclature) is a generic-ified version of your flashctl example.
I have had an issue relating to MSPM0L1306: MCU goes into Default Handler while writing in Flash Memory - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums
which seems to be attributed to the way i was accessing the flash (memcpy just like a for loop accessing the flash in array like fashion [see example 1 below] did cause trouble while access as in example 2 [see below] did not. it appears that any read to the flash has to initially align to a 4byte boundary though
New is how ever that the written contents are not exactly as they should be consider the write Function in snippet 1 below and consider the example usage as shown in the screenshots below (note how the alignment of writes to 8byte boundaries is ensured!)
in this example nothing had been written yet and the flash at the locations in question is still erased as expected
notice how the 4 is not written as 4 but rather as C
notice how the issue is reproducable in the 8bytes following the 1st ones
notice how the value C had been written as 4 here
notice how this is also reproducable
Please let me know how the data committed to flash can be ensured to match the data requested to be written.
Example 1:
Snippet 1: