Part Number: MSPM0G1518
Greetings,
recently when reviewing the implementation of our flash write/erase functionality for MSPM0, we found that DL API function DL_FlashCTL_executeClearStatus() performs the clear status command via flashctl->GEN.CMDEXEC but is not placed in device SRAM(like DL_FlashCTL_executeCommandFromRAM()), and this excerpt from the MSPM0 reference manual(6.3.1 Overview of Flash Controller Commands) suggests that setting CMDEXEC and waiting for its result is not supposed to be executed from the flash bank being operated on:
"The software sequence of setting the CMDEXEC bit and waiting for the CMDDONE response must be executed from either the device SRAM or from a different flash bank from the bank that is being operated on, as the flash controller will take control of the flash bank undergoing the operation. Reads to the flash bank that is being operated on while the flash controller is executing the command are not predictable."
We would like to ask whether using DL_FlashCTL_executeClearStatus() to clear flash status is correct if the function code is located in the same flash bank on which operation is performed.
P.S. Also we had a look at the flash write examples provided with MSPM0 SDK(flashctl_program_with_ecc to be exact), and those just use DL_FlashCTL_executeClearStatus() and seem to write to the same bank where program code is stored. Latest SDK was used(v2.11.00.07)
Best regards,
Pavlo