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.

MSPM0G3519: MSPM0G3519 NVM READ ERROR

Part Number: MSPM0G3519

For the NVM module, if I first issue an erase command, then perform a write operation, followed by a read operation from flash, no error occurs and the code does not enter the default_handler() function.

 

However, if I first erase the target FLASH address using a debugger, then call the write function and read function in the code, the read operation fails and the system enters an exception interrupt.

  • Hello,
    We have received your post and the investigation will take some time.
    Thanks for your patience.

  • Hello,

        Do you mean erase specific flash address with a debugger, and write and read with API?

        Why do you use the method? What is address range?

        What is debugger part number?

        More detailed information provided for better understanding your issue.

  • Do you mean erase specific flash address with a debugger, and write and read with API?:yes,write with 

    DL_FlashCTL_programMemoryFromRAM64WithECCGenerated
    Why do you use the method? What is address range?:i need do download my code into flash to debug,so i use debugger to download firmware into the flash,so  the whole flash has been erased by debugger;and in my code,i will operate the address from 0x37c00 to 0x39c00,because i will do myown NVM function.
    What is debugger part number?:XDS110
  • Using the same method to program the firmware into Flash via the debugger:
    • Program A does not actively call the API to erase Flash. When checking the target Flash address in the Memory Browser, the value is found to be 0xff. Writing directly to Flash via an API call followed by reading Flash results in an exception interrupt.
    • Program B actively calls the API to erase Flash. When checking the target Flash address in the Memory Browser, the value is also found to be 0xff. Writing directly to Flash via an API call followed by reading Flash succeeds.
    The only difference between these two operations is whether the Flash erase API is actively called.
    A supplementary explanation for Program A:
    If the first byte of the written content is 0x00, the read operation will succeed.
    However, if the first byte written is a non‑zero value, the read operation will trigger an exception interrupt.
  • Hello,

         Generally, Flash erase followed by blank checked  to confirm the data will be wrote all be 0xff.

          If it is not 0xff, it need to check erase process.     

  • i am sure erase is ok,because all the erase region is 0xff;

  • my question is that :why can't i read flash successful?

  • Hello,

         I guess read error is due to write failed, but I can not get why it fail to write.

    MSPM0 MCUs Development Guide (Rev. G)

    so  the whole flash has been erased by debugger;

    Whole flash erased is not neccesery, Please only erase the range 0x0-0x7ffff, which is used for your main code.

     please check the ticket below.

         MSPM0G3519: MSPM0G3519 : Erase Flash using CMSIS DAP - Arm-based microcontrollers forum - Arm-based microcontrollers - TI E2E support forums