Because of the Thanksgiving holiday in the U.S., TI E2E™ design support forum responses may be delayed the week of November 23.

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: Independent Watchdog Module (IWDT)

Part Number: MSPM0G3519
Other Parts Discussed in Thread: UNIFLASH

We had an issue while handling watchdog module for the bootloader SW in MSPM0G3519.

1. At first, we have configured the IWDT module in MSPM0G3519.
please check the below configuration.



we are continuously feeding the IWDT after initialization, so the booting sequence worked normal and we have not observed watchdog reset.

2. Now we have made some logic update to verify the watchdog reset, so we disabled feeding watchdog in SW and we flashed the updated bootloader SW.
    and now we could see the reset every 2s since we are not feeding it anymore.

3. Now we reverted our changes and started to feed the IWDT again (as previous logic)and we tried flashing the SW, at this time non-main memory got corrupted and board got locked.

We have these queries now

  1. Is it due to the watchdog reset during the flashing sequence when we are trying to flash bootloader SW?
  2. If yes, what is the safe watchdog window needs to be configured to avoid the reset during programming?


As per our understanding when we are flashing, CPU will be halted and device will be in debug state. During this time IWDT should be stopped by default. Correct me if I am wrong.

  • Hello Gowtham,

    I want to confirm some details with you:

    1. You write the secondary BSL code and in you application code, you will run the IWDT. then when you program the secondary BSL code after recover feeding IWDT, the issue occur? Do I understand correctly?

    2. Does the BSL code you want to program include NONMAIN region configuration?

    3. If you do factory reset to the device, can it be recovered?

    BR,

    Janz Bai

  • 1. You write the secondary BSL code and in you application code, you will run the IWDT. then when you program the secondary BSL code after recover feeding IWDT, the issue occur? Do I understand correctly?

    We have configured the IWDT in the Secondary Bootloader with a 2-second timeout. Under normal conditions, the bootloader periodically services the IWDT while performing application flashing, and the flashing operation completes successfully.

    For validation purposes, we modified the bootloader to stop servicing the IWDT. As expected, the device underwent periodic resets every 2 seconds due to IWDT timeout events, which prevented successful application flashing and resulted in negative responses from the flashing tool. This confirmed that the IWDT was operating correctly.

    Subsequently, we attempted to reprogram the original bootloader image that includes IWDT servicing. During this Flashing attempt, the programming process failed, and the bootloader image was not written correctly. Additionally, corruption was observed in the non-main memory region. We are currently investigating whether the repeated IWDT resets during the previous test may have left the device in a state that affected subsequent programming operations.

    Note:

    The IWDT is configured exclusively in the Secondary Bootloader and is not configured or initialized in the Application software.

    The watchdog is enabled only during flash programming activities executed by the bootloader. Under normal operating conditions, the bootloader directly jumps to the application without initializing the IWDT. As a result, the IWDT should not be active during application execution.

    2. Does the BSL code you want to program include NONMAIN region configuration?
        Yes, we have non-main region configuration.

    3. If you do factory reset to the device, can it be recovered?
        We can't recover since we have not enabled the BLS pin configuration in that package.

  • Hello Gowtham,

    Does the application code you want to program through BSL include NONMAIN region too?

    If yes, I think the root cause is that:

    When you stop feeding watchdog, the reset will cause NONMAIN region programming error. Next time when you re-power up MCU, because NONMAIN has error, MCU can't work normally, BSL code programming failed too.

    About the factory reset: it doesn't need BSL pin, it just need VDD, GND, SWDIO, SWCLK, NRST connection between MCU and debugger. You can try this, this can help us detect the NONMAIN state: has all erased to 0xFF, or just some data is error.

    BR,

    Janz Bai

  • Hello Janz,

    Does the application code you want to program through BSL include NONMAIN region too?

    No, application code doesn't include NONMAIN region.

     

    About the factory reset: it doesn't need BSL pin, it just need VDD, GND, SWDIO, SWCLK, NRST connection between MCU and debugger. You can try this, this can help us detect the NONMAIN state: has all erased to 0xFF, or just some data is error.

    we got this error when we read memory and factory reset was unsuccessful.

    [9/17/2026, 6:14:50 PM] [ERROR] CORTEX_M0P: 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.
    [9/17/2026, 6:15:00 PM] [ERROR] CORTEX_M0P: 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.
    [9/17/2026, 6:15:00 PM] [INFO] CS_DAP_0: GEL Output: Device diagnostic read = 0x00000036
    [9/17/2026, 6:15:00 PM] [INFO] CS_DAP_0: GEL Output: Possible root causes could be one or multiple of the following:
    1) Invalid CRC configuration
    2) Invalid BCR configuration
    3) Invalid BSL configuration
    Possible recovery method:
    1) Perform a DSSM factory reset
    2) If method one does not work, please remove power, hold nRST low, connect the device while nRST is held low, and then perform a DSSM factory reset

    This issue occurred when we are flashing bootloader SW itself, not the application SW. 

    we followed the below sequence
    1. watchdog configured properly and feeding. we have not observed any issue.
    2. we have commented feeding the watchdog and flashed, we are getting reset (POR) for every 2 seconds as expected.
    3. now we tried to reflash the SW by reverting the commented changes. and it got failed due to nonmain memory corruption.

    could you please schedule a call to discuss regarding this issue and debug.

    Best Regards
    Gowtham S

  • Hello Gowtham,

    Sorry for the late response because I need go to hospital for an IV drip for next four days due to rhabdomyolysis. About this issue, below are my comments:

    Since the information is a bit jumbled right now, let me sort it out. Below are my understand and points what I want to double confirm with you:

    • Your secondary BSL project include NONMAIN region configuration. Your application project doesn't include NONMAIN region configuration
    • When updating the application code through BSL, you won't update NONMAIN region through BSL, right?
    • In your secondary BSL project, do you use any Flash-control code in your main.c to erase/write NONMAIN region?
    • When you want to program the original BSL code including IWDT part, what is the state of the device? is it still in Flash programming mode, or it has jumped into application code? From what you said, when you stop feed IWDT, IWDT will trigger reset every 2s and application programming failed. is it possible that the device still always stuck in this continuous reset status when you want to program your original BSL code, then the continuous 2s reset make you can't program new BSL code into the device?
    • Because the boot diagnostic reason is 0x36 which means that NONMAIN region has error, please double check again whether you have operation to NONMAIN in your BSL code part and application code part.
    • If you keep feed IWDT, this issue won't occur, right? I think feeding IWDT is what we need to do when doing development. Could you tell me why you want to do the tests that stop feeding IWDT?
    • If you re-power the issue device and won't let it enter BSL mode, just jump to run application code, can it run application code normally? In this status, can you connect MSP core to do programming?
    • For the factory reset using DSSM, did you do following below step:

    BR,

    Janz Bai

  • Hello Janz,

    • Your secondary BSL project include NONMAIN region configuration. Your application project doesn't include NONMAIN region configuration.

    Yes.

    • When updating the application code through BSL, you won't update NONMAIN region through BSL, right?
    Yes.

    • In your secondary BSL project, do you use any Flash-control code in your main.c to erase/write NONMAIN region?
    No, we don’t have any Flash-control code to erase/write NONMAIN region.

    • When you want to program the original BSL code including IWDT part, what is the state of the device? is it still in Flash programming mode, or it has jumped into application code? From what you said, when you stop feed IWDT, IWDT will trigger reset every 2s and application programming failed. is it possible that the device still always stuck in this continuous reset status when you want to program your original BSL code, then the continuous 2s reset make you can't program new BSL code into the device?
    As soon as we tried to program original BSL SW, flashing itself was not successful, and non-main region got corrupted immediately.

    is it possible that the device still always stuck in this continuous reset status when you want to program your original BSL code, then the continuous 2s reset make you can't program new BSL code into the device.
    This is where we are seeking your help to understand the functionality of the IWDT module.

    As per our understanding when we are flashing the SW through CCS or uniflash CPU will be halted. And then flashing will be performed. when we referred to the technical documents for IWDT module, it says that when CPU is halted IWDT will be stopped by default.

    please refer to the snapshot below.

    39.4 Debug Behavior of the IWDT 
    The IWDT can be configured to stop counting or continue counting when the CPU is halted for debug by the
    debug subsystem. By default, the IWDT stops counting when the CPU is halted for debug and the device is in a
    debug state. To allow the IWDT to continue to free run when the CPU is stopped for debug, set the FREE bit in
    the WDTDBGCTL register.


    Watchdog is working as per our expectation, but how to handle it when we are in debug mode or when we are flashing the new BSL SW?

    • Because the boot diagnostic reason is 0x36 which means that NONMAIN region has error, please double check again whether you have operation to NONMAIN in your BSL code part and application code part.
    Yes, we have NONMAIN region part in BSL code. When we are trying to flash the BSL code, we are erasing the NONMAIN region and flashing. But Application code does not have any NONMAIN region.

    • If you keep feed IWDT, this issue won't occur, right? I think feeding IWDT is what we need to do when doing development. Could you tell me why you want to do the tests that stop feeding IWDT?
    Yes, when we are feeding the watchdog, it was working and this issue won't occur. But I wanted to check whether wdg is working properly or not as per our requirement.

    • If you re-power the issue device and won't let it enter BSL mode, just jump to run application code, can it run application code normally? In this status, can you connect MSP core to do programming?
    No, already non-main region got corrupted, and it's not even entering BSL mode. I tried the possibilities which you have suggested but unfortunately, we have disabled the PA18 invoke BSL pin.

    Thank you for your support despite your situation. Wishing you a safe and speedy recovery.

    Regards 
    Gowtham S