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: program 1 byte of FLASH

Part Number: MSPM0G3507

Tool/software:

I would like to write a single byte of FLASH.  My understanding is the G3507 uses a 72 bit FLASH word which is 64 bits data and 8 bits ECC which is SEC DED.  On the face of it then it seems that programming a single byte cant be done?  You would have to recompute ECC byte and to write that you have to erase the page and to do that you have to make a mirror of the page in RAM so you can copy it back with the single byte and its ECC byte modified.  Do I have this right?  Sounds painful!  

I have seen documents for "EEPROM Emulation".  Is that just a software wrapper around the FLASH that does what I just described?  If so I search the EEPROM emulation document for "ECC" and saw no mention of it so how does EEPROM emulation work if it does not deal with ECC?

  • Hi, 

    On the face of it then it seems that programming a single byte cant be done?

    In MSPM0SDK driverlib, we don't provide program one byte API.

    You would have to recompute ECC byte and to write that you have to erase the page and to do that you have to make a mirror of the page in RAM so you can copy it back with the single byte and its ECC byte modified.  Do I have this right?  Sounds painful!  

    You need at least have one copy of a flash word, 64bit in RAM, them when totally 64bit is programmed, ECC should be program with the last byte.

    I have seen documents for "EEPROM Emulation".  Is that just a software wrapper around the FLASH that does what I just described?

    Yes, software layer of Flash operation, with typeA and typeB, document can be found in MSPM0G3507's page.

    If so I search the EEPROM emulation document for "ECC" and saw no mention of it so how does EEPROM emulation work if it does not deal with ECC?

    EEPROM use totally 64bit program API in dirverlib, not the same as what you want to do.

    I would like to write a single byte of FLASH.

    Use driverlib API to program first byte of Flash word.

    Or you need to refer to this part of TRM: 7.3.3.2 Programming Less Than One Flash Word

    I write a demo of this, but not finished, you can use this as a reference.

    I write this base on L1306 because L1306 doesn't have ECC, I don't need to handle ECC with last byte program.

    flashctl_multiWrite_inOneWord_LP_MSPM0L1306_nortos_ticlang.zip

    Regards,

    Helic