This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

MSPM0G3518: Hard Fault when Writing Flash

Part Number: MSPM0G3518

We work on target "MSPM0G3518". Our flash driver is located in RAM. We try to write data on code flash, starting from sector "90". We erased the area we wish to flash beforehand.

We got hard fault interrupt which after debugging on Fls driver, we found that hard fault occurred when the software tries to execute function "Fls_programMemory64Config" in Fls_Ctrl.c file in the following line:

"FLASHCTL->GEN.CMDDATA0 = *data;"

What could be causing the hard fault?