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.

MSPM0G3507-Q1: Can we program several data on EEPROM with one time unprotectSector ?

Part Number: MSPM0G3507-Q1


Hi,

In the EEPROM writing sample code, it always call DL_FlashCTL_unprotectSector() and then call DL_FlashCTL_programMemoryFromRAM64() to

write 8 bytes to EEPROM.

If we have 128 bytes or more data, could we just call DL_FlashCTL_unprotectSector() one time and then use DL_FlashCTL_programMemoryFromRAM64() several times to flash all data?

Meanwhile, when doing EEPROM writing, if there's an IRQ coming, will EEPROM writing got impacted? Shall we disable IRQ while doing EEPROM writing?

  • Hi James,

    Once the write is finished the sector gets protected, which is why there are multiple unprotect sectors. You will need to unprotect before each write.

    I recommend disabling IRQs to prevent any unexpected executions; but since you are programming in word chunks, you can enable the IRQ after one of your writes to see if an interrupt has appeared, then disable the interrupt before doing your flash write.

    Regards,
    Luke