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: Setting NONMAIN Registers

Part Number: MSPM0G3507

Hi TI teams,

I am currently using a circuit of my own design to program the NONMAIN Registers block of MSPM0G3507.

The following is my hardware circuit design.

But when I accidentally powered off and on the IC after erasing NONMAIN, the IC could no longer communicate with SWD.

I also have another IC that mistakenly sets BSL_PIN_INVOKE to 0xFFFF, but I can no longer communicate with the IC via SWD.

Is there any way to enable the IC to enable SWD communication again? Thanks.

Regards,

Steve

  • Hi Steve,

    If you erasing the NONMAIN without writing a correct configuration back into it. After power off the MCU, there will be no way to connect back the MCU no matter through SWD or BSL interface. 

    And if the BCR configuration is still correct, that means the SWD connection should be fine. You can try a factory reset on this MCU. 

    5023.Factory_reset_v3.pdf

    Best regards,

    Cash Hao

  • Hello YUXUAN,

    1). After you erase the NONMAIN, you should write configuration to this region. If the NONMIAN is erased to all 0xFF and the PC is powered off, this chip maybe broken and can't be used again.

    2). If you set the BSL_PIN_INVOKE to 0xFFFF which means that the BSL invoke pin will not be checked so BSL mode can't be invoked by hardware. Another method is using software trigger to BSL, but it seems that you can't use SWD to communicate with M0 and download code to M0. So the last method is trying to factory reset, if this issue can't be resolved, maybe you need to change a new chip.

    Best Regards,

    Janz Bai

  • Hi Janz,

    Thank you for your reply.

    According to the second question, if I reserve the UART and I2C pins of BSL, can I trigger the programming and erasing of the IC?

    Thanks.

    Regards, 

    Steve 

  • Hi Cash Hao,

    Thank you for your reply!

    So I should avoid just erasing NONMAIN but write the correct value.

    Regards, 

    Steve 

  • Hi,

    Without the BSL invoke pin, the MCU can not enter BSL mode by hardware. You still can not connect to MCU through UART/I2C port.

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    I understand clearly, thank you!

    Sorry, I would like to ask for additional information.

    It was previously confirmed that programming using SWD must be completed within 10 seconds, otherwise it will enter low power mode.

    In order to avoid entering low power mode, I will always let the IC use RESETCMD Register to reset the IC, because our programming will definitely take more than 10 seconds.

    What I would like to ask is, when the power supply is uninterrupted, I first erase NONMAIN and then use RESETCMD Register to reset the IC, but the correct value is not written back to NONMAIN.

    Will the IC be unable to communicate through SWD after the reset?

    I don't have enough ICs to do abnormality testing.

    Please help me confirm it. Thank you.

    Regards, 

    Steve 

  • Hi,

    It should depends on the reset level. 

    A POR BOR and BOOTRST which can trigger the device runs boot configuration routine. It will check the NONMAIN configuration in it. 

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    Thank you for your answer.

    Currently I am completing the programming support for NONMAIN.

    It seems that there is no problem in programming the NONMAIN block.

    I also used MSPM0L1105TRHBR to test NONMAIN block programming.

    The screenshot below shows my settings in NONMAIN.

    The remaining addresses are the same as the factory values.

    I found that after programming the NONMIAN in the attached picture, the value of addresses 7EF9:7FE8 will change from 0xFFFF to 0xAA55.

    Is this normal? If so, is there any document explaining this phenomenon? Thank you!

    Regards, 

    Steve 

  • Hi,

    I am not aware of this issue. Do you know what register locates in the address 7EF9:7FE8? 

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    Sorry I didn't explain my question clearly, 7EF9:7FE8 is in the MAIN Flash block.

    In addition, I programmed through SWD.

    Regards, 

    Steve 

  • Hi Steve,

    So, it is in main flash. I do not know what causes this. But does the MCU still run as expected? Or it can not run normally due to this change in main flash.

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    I have not tested whether the IC operates normally.

    I am a third-party programming manufacturer responsible for assisting customers in programming IC.

    But this change in Flash will make it impossible for us to verify whether the programming is successful, because there is a changed value loaded in Flash.

    Regards, 

    Steve 

  • Hi Steve,

    Okay. Does this change always happens on 7EF9:7FE8? Or when you change to program with a different file, this change will change to somewhere else.

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    I currently only have this file.

    I tried to replace several ICs with the same part number for testing, and the problem always occurred at the same address.

    But when I restored NONMAIN to its initial state, this problem disappeared.

    Regards, 

    Steve

  • Hi Steve, 

    This issue seems not going to close in a short time. And I will be out of office next week. So, could you send an email to me cash-hao@ti.com and my colleague garygao@ti.com we can discuss this issue through email. 

    Best regards,

    Cash Hao

  • Hi Cash Hao,

    Okay, I'll send the mail first.

    Thanks!

    Regards, 

    Steve

  • Okay. I am going to close this thread now.