Part Number: MSPM0G3107
Other Parts Discussed in Thread: MSPM0G3507,
I encountered an issue where writing to flash appears successful, but reading the same data causes the system to crash/reach the default interrupt handler.
Here we can see that when I write data using DL_FlashCTL_programMemoryFromRAM64, the data is sucessfully written to flash.
DL_FlashCTL_programMemoryFromRAM64(FLASHCTL, u32_dataAddress, u32a_dataArray);

After this line of code executes, the program jumps to Default_Handler. Sometimes, the program will continue to execute as usual, until I read the data. When I read the data, the program then reaches the Default_Handler.
To isolate the issue, I tested on an MSPM0G3507 LaunchPad with a stripped-down application (single source file, no RTOS), and the flash operations complete successfully without triggering the default handler.
DL_FlashCTL_unprotectSector(FLASHCTL, MAIN_BASE_ADDRESS, DL_FLASHCTL_REGION_SELECT_MAIN);
gCmdStatus = DL_FlashCTL_programMemoryFromRAM64(FLASHCTL, MAIN_BASE_ADDRESS, &gDataArray64[0]);
uint64_t *u64p_data = *((volatile uint64_t *)MAIN_BASE_ADDRESS);
When running a similar code sequence on the MSPM0G3507 LaunchPad with RTOS enabled, the program ends up in the Default_Handler again, pointing to the RTOS as the likely culprit.
I eventually found that using DL_FlashCTL_programMemoryFromRAM64WithECCGenerated completely resolves the issue. However, I'm trying to understand why ECC generation is required in this case. I know ECC is best practice for data integrity and error detection, but I'm curious why my simple example works fine on the MSPM0G3507 without ECC and RTOS, yet my MSPM0G3107 application requires it.

