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.

MSP432-DEBUGGERS: MSP432p401r

Part Number: MSP432-DEBUGGERS

MSP432P401R: Watchdog timer reset issue

Hi,

I am using MSP432p401r Microcontroler for my project. I would like to reset my MSP at a certain time.

Here is my Watch dog timer interrupt code. Watch dog timer interrupt is 250msec interval.

Watchdog interrupt is working properly. But reset is not happened. MSP stopped / hanged after reset command executed.

Here is the code.

void WDT_A_IRQHandler() // 250 Msec Timer Interval
{
     WDT_A_holdTimer();
     WDT_A_clearTimer();

    if(glDo_rtc_update == FALSE)                // Suresh: Gateway Restart Testing purpose
    {
         Restart_Hour = 10;
         Restart_Min = 8;
         if(((rtc_c_calender.hours) == Restart_Hour) && ((rtc_c_calender.minutes) == Restart_Min))
         {
              Debug_TextOut(0,"\r\n\r\nGateway Restart Initiated \r\n");
              
             // MAP_ResetCtl_initiateHardReset();          // Main Reset
             
             WDTCTL = WDTPW+WDTCNTCL+WDTSSEL1+WDTIS_7;       // Watch Dog Reset
             
        }
    }
    WDT_A_startTimer();
}

I want to reset my MSP by software.

I used MAP_ResetCtl_initiateHardReset(); function also. But MSP stopped / hanged after the reset command executed.

Please help me to reset the MSP432p401r.

Thanks & Regards

Suresh P

  • How do you tell that the MSP is hung? If you pause in the debugger, where is it executing?

    As I understand it, you want to use the WDT in Interval timer mode until a certain time, at which point you set it to Reset mode to trigger the reset (~2ms later).

    What does Debug_TextOut do? Can it take a long time?

  • Hi,

      Sorry, I'm currently traveling. I will reply you next Monday. 

  • Hi All,

    Thanks for your Support everyone.

    I solved the Reset Issue in MSP432P401R.

    Here is the code.

    void WDT_A_IRQHandler() // 250 Msec Timer Interval
    {
         WDT_A_holdTimer();
         WDT_A_clearTimer();

        if(glDo_rtc_update == FALSE)                // Suresh: Gateway Restart Testing purpose
        {
             Restart_Hour = 10;
             Restart_Min = 8;
             if(((rtc_c_calender.hours) == Restart_Hour) && ((rtc_c_calender.minutes) == Restart_Min))
             {
                  Debug_TextOut(0,"\r\n\r\nGateway Restart Initiated \r\n");
                  
                 // MAP_ResetCtl_initiateHardReset();          // Main Reset


                 SysCtl_setWDTTimeoutResetType(0); // 0b = WDT timeout event generates Soft reset // 1b = WDT timeout event generates Hard reset
                 
                 WDTCTL = WDTPW+WDTCNTCL+WDTSSEL1+WDTIS_7;       // Watch Dog Reset
                 
            }
        }
        WDT_A_startTimer();
    }

    Additionally i added Reset Type in the Sys control Register.

    Now my WDT Reset is working as i expected.