MSPM0C1104: No debug access after factory reset

Part Number: MSPM0C1104
Other Parts Discussed in Thread: SYSCONFIG

I have attempted to lock my device using the system configuration tool with the following generated code.

PLACE_IN_MEMORY(".BCRConfig")
const BCR_Config BCRConfig =
{
    .bcrConfigID          = 0x3,
    .debugAccess          = BCR_CFG_DEBUG_ACCESS_DIS,
    .swdpMode             = BCR_CFG_SWDP_EN,
    .factoryResetMode     = BCR_CFG_FACTORY_RESET_EN,
    .staticWriteProtectionNonMain  = BCR_CFG_NON_MAIN_STATIC_PROT_DIS,
    .staticWriteProtectionMainLow  = CFG_DEFAULT_VALUE,
    .staticWriteProtectionMainHigh = CFG_DEFAULT_VALUE,
    .reserved                      = 0xFFFFFFFFU,
};

After doing a power cycle the device was locked as described in the MSPM0C manual. The factory reset completed with a positive response. But even after multiple following factory resets and power cycles I cannot flash my device anymore. It responds with this message 

Error connecting to the target:  Connection to MSPM0 core failed.  Possible root causes: 1) Debug access within NONMAIN was disabled or enabled with password. 2) Peripheral mis-configuration (e.g improper watchdog or clock).  To see a more detailed diagnostic of the issue, please press the 'Read boot diagnostic' button.

The boot diagnostics response:

Possible root causes from diagnostic reading:
1) Nested exception (e.g double hard fault or NMI) can be caused by illegal CPU activity such as invalid address modification
2) Debug access has been disabled

Possible recovery method:
1) Perform a DSSM factory reset with or without password
2) Power cycle or reset the device

I can connect to the SEC_AP and CS_DAP_0 as expected but not to the CORTEX_M0P core.

I did notice that there is a difference in the BCR_Config structure and the supposed layout of the corresponding registers describd in the manual. Since the factory reset supposedly executed successfully, I assumed the generated code to be correct and the manual to be incorrect.

The generated code has no reserved data gaps and does not consider the offset between BOOTCFG0 and BOOTCFG3 for instance.

grafik.png

Is my device bricked? Why?
Why is the memory layout different between the manual and the generated code?

 

  • Hi,

    Can you check the bootdiag following below attached? And let me know the result. Thanks!

    2480.Read CFGAP.pptx

  • Hello,

    they both match the screenshot in the pptx.

    CFGAP_BOOTDIAG = 0x7

    CFGAP_LIFECYCLE = 0x96

    Sincerely,

    RH

  • Hi RH,

    In that case, It should be no problem for your NONMAIN flash. And I found that you have disabled your debug access in configuration. After that, you cannot debug MCU 

  • Blocking debugging access but leaving the factory reset open is my intention. Is this not correct?

    A factory reset should also reset the debug access configuration, no?

  • Hello Zoey Wei,

    can you confirm that the sysconfig generated code is correct? And does that mean that the manual is erroneous?

    Sincerely,

    RH

  • Hello RH,

    In theory, after factory reset, NONMAIN will reset to default value, and Flash will be reset. So it is strange that after factory reset, you said you can't do programming. Could you make a figure about how did you do the factory reset, and the log information CCS back to you when you factory reset?

    BR,

    Janz Bai

  • Hello Janz Bai,

    This is my process:

    I usually power cycle the device by disconnecting it for at least 2min, then reconnecting it. I have previously tried disconnecting it for over an hour. My NRST is connected to a pull-up at 10k.

    Sincerely,

    RH

  • Hello RH,

    From the figure you shared, it seems that the factory reset has been executed. 

    So after operating the factory reset, and re-power up the device, and then want to program it, you found you still can't program it, right? 

    Could you please try to use below method to do factory reset? 

    1. connect SWCLK, SWDIO, GND, 3V3, and NRST to GND

    2. import an demo project of C1104 into CCS, open the "targetConfigs" folder and right click the ccxml file, choose "Start Project-less Debug". 

    3. Do the "MSPM0_Mailbox_factoryreset_Auto"

    4. wait for the prompt and then connect NRST to VCC (3.3V)
    5. Then the factory test will be executed. After that, repower the device and check whether it can program normally.

    By the way, if you try to use another one unit, will this issue occur too?

    BR,

    Janz Bai

  • Hello Janz Bai,

    I am currently unable to reset the device it seems. I did experience this multiple times prior when a factory reset was already executed. It either gets stuck at "Press the Reset button..." or reports this

    Flashing is still not possible. Also, did you mean FactoryReset_Manual? Auto uses the debugger chip's NRST pin, does it not?

    I flashes with this option.

    Can you confirm that the generated code to lock the device is correct? The datasheet describes a different layout.

    Sincerely,
    RH

  • I just tried another device and it worked fine. Not sure what the issue with the first one is, then.
    A third device has the same issue as the first. I cannot flash it after a factory reset.