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.

MSPM0L2228: How to factory reset for MSPM0

Part Number: MSPM0L2228
Other Parts Discussed in Thread: C-GANG,

Hi,

 

I'm trying to create an MSPM0 software to download an intel-HEX file from UART and program the data into the flash memory inside of MSPM0.

 

However, I accidentally seemed to erase all of the flash memory and can't update the software by CCS with XDS110 nor C-GANG.

 

I tried to do "factory reset" based on the manual " MSPM0_Unlock device_M0 deep dive" and " MSPM0 MCUs Development Guide" but it was never fixed.

 

Could you tell me how to fix it???

 

The log messages that I saw were followings.

 

1) MSPM0_Mailbox_FactoryReset_Auto with CCS when PA13 was connected to V3.3.

CS_DAP_0: Initiating Device Factory Reset

CS_DAP_0: Attempting CS_DAP connection

CS_DAP_0: Attempting SEC_AP connection

CS_DAP_0: Command Sent

CS_DAP_0: Start hardware Reset using NRST

CS_DAP_0: Initiating BOOTRST Board Reset

CS_DAP_0: Reset line asserted

CS_DAP_0: Reset line de-asserted

CS_DAP_0: Board Reset Complete

CS_DAP_0: Reset done

CS_DAP_0: SEC_AP Disconnect

CS_DAP_0: SEC_AP Reconnect

 

< no messages appeared even if i waited for about 3min.>

 

2) MSPM0_DeviceDiagnosticRead with CCS when PA13 was connected to V3.3.

CS_DAP_0: Attempting CS_DAP connection

CS_DAP_0: Device diagnostic read = 0x00000007

 

Thank you in advance.

  • Hi,

    Did you refer to the following figure to try forcing the device into BSL and then do the factory reset again? If not, please try to do so.

    MSPM0 MCUs Development Guide (Rev. G)

    Best Regards,
    Peter

  • Yes. "PA13" is my mistake...

  • However, I accidentally seemed to erase all of the flash memory and can't update the software by CCS with XDS110 nor C-GANG.

    Have you modified any NONMAIN configuration while do the flash erase/program?

    Additionally, have you used the relevant VBAT of MSPM0L2228? Please disconnect the VBAT power part and try to perform a BSL factory reset again.

    B.R
    Peter

  • Sorry for late reply...

    I worked on the other project, and came back to here.

    And I might find the root cause.

    1) Is the NONMAIN config. cleared if i run the following code? 

    I miss-understood the difference between SECTOR and BANK...

    #define MAIN_BASE_ADDRESS (0x00001000)


    DL_FlashCTL_eraseMemory(
    FLASHCTL, MAIN_BASE_ADDRESS, DL_FLASHCTL_COMMAND_SIZE_BANK);

    2) Yes. VBAT is connected to V3.3 directly, and the setup using MSPM0L2228 worked properly until this phenomena occurred. So I think VBAT is also correct.

    3) Even if the answer for 1) is YES, is it possible to do FACTROY RESET?

    4) If not for 3), is there any method to recover the NONMAIN config?

    Thanks.

  • Hi,

    Your Flash operation will not erase the Nonmain region because the Nonmain start at 0x41C0.0000, it will only erase the bank0 which will not affect Nonmain. 

    But let say if you completely erase all the Nonmain region accidentally and not write the correct configuration, which will cause disable the SWD access port, in that case, it's not possible to perform the factory reset.

    For the device lock analysis, you can refer to the MSPM0 NONMAIN FLASH Operation Guide for more details. Also it includes unlock methods in more details, you can refer to it and try it out.

    Best Regards,
    Peter