MSPM0G3519: ECC Error Detected on Flash Memory

Part Number: MSPM0G3519
Other Parts Discussed in Thread: UNIFLASH

In our design Flash Memory is divided into various Logical Blocks,

Bootloader Starts at 0x4000, ends at 0x23FFF,

Application starts at 0x40000, ends at 0x77FFF,

For Application Download Over CAN,  bootloader Performs the following Erase Sequence.

  • Write Mask value of 8 bytes to address 0x77FF8-0x77FFF (to Invalidate the Application)
  • Verify the Mask Value is correct
  • Erase the Block, but the Erase Never happend, Lost Communication with the Micro.

To Investigate this, Read the flash Memory using the uniFlash, Data from 0x40000-0x77FFF remain intact (Not Erased), Value at 0x77FF8, is expected value.

Read the DEDERRADDR Register, Values in the register is 0x77FF8,  this indicates ECC error is triggered while writing/verifying the Data 0x77FF8,

Would you please help me understand the reason For ECC being Detected here?

 

  • Hi Krishna,

    For the step "Write Mask value of 8 bytes to address 0x77FF8-0x77FFF (to Invalidate the Application)", what is the value stored in address 0x77FF8 before writing mask value?

    Is it an erased status but not programmed yet, or a programmed 0xFF value, or a programmed other value?

    Notice that an erased status is different with a programmed 0xFF status. A write to an erased region will generate the correct ECC code, but a write operation to a region with 0xFF programmed before will generate an unexpected ECC code (because ECC code has been generated before when programming 0xFF value).

    So if you have ever program any value on 0x77FF8 before, you could not program new value unless you erase it.

  • Hi Xie,

    Thank you so much for the quick Replay, With the UniFlash, This address was programmed with 0xFF's, Never done a  Mass Erase for quite some time. In My Testing

    Download the s19 using the UniFLASH (all the Gaps in the s19 are filled with the FF's), 0x77FF8-0x77FFF is programmed with 0xFF, This make sense to me, 

    in this case, ECC  should trigger for all the memory locations that are Programmed with 0xFF's and writing to the addresses that are programmed with 0xFF's , but i was particularly seeing this behavior with the 0x77FF8-0x77FFF

    Example:- Move the End address by 8-Byte, Now new address is  0x77FF0-0x77FF7, Don't see ECC error being triggered.

    Is this behavior specific End address of the 1K Sector?

    Thanks,

    Krishna

  • Hi Krishna,

    This behavior should not only be specific for end address but for all flash region with ECC correction.

    Could I understand more details of your test on 0x77FF0 address? Below sequence is what I expected:

    • 0xFF is programmed to the region by uniflash.
    • Another "Mask value" is programmed to the address again.
    • Try to read from the address -> trigger ECC.
  • Hi Xie, 

    Yes, Sequence is correct, but the ECC is not triggered in case of 0x77FF0 address

    • 0xFF is programmed to the region by uniflash.
    • Another "Mask value" is programmed to the address again.
    • Try to read from the address -> No ECC Error

    Thanks,

    Krishna

  • Hi Krishna,

    I need to also test it from my side if this the process you are following. I will get back to you once I have some update.