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.

IWR6843ISK: IWR6843ISK IWR6843 watchdog timer code example

Part Number: IWR6843ISK

I would like to implement the watchdog timer for my IWR6843ISK. I have read the Technical Reference Manual -> Reset section https://www.ti.com/lit/ug/swru522e/swru522e.pdf?ts=1632855308426 and the Watchdog Timer Application Note https://www.ti.com/lit/an/swra590a/swra590a.pdf?ts=1632932660775&ref_url=https%253A%252F%252F . However, it's still not clear exactly how I would implement the watchdog in C code in Code Composer Studio. Do you have a code example for the watchdog timer? I found this thread https://e2e.ti.com/support/sensors-group/sensors/f/sensors-forum/993789/iwr6843isk-ods-watchdog-problem but I am not sure if I can use it for IWR6843ISK.

  • Hello,

    Please go to the following path for our SDK's documentation for Watchdog Timer:

    Watchdog Timer Documenation
    <MMWAVE_SDK_INSTALL_PATH>\packages\ti\drivers\watchdog

    This will give you some examples in the test folder for you to look at.

    Best regards,

    Connor Desmond

  • I see C code in the said folder ( \ti\mmwave_sdk_03_05_00_04\packages\ti\drivers\watchdog\test\xwr68xx ). Are there instructions on how to run the sample code? Do I compile it and flash the radar with the binary? Looking at the source code in main_mss.c, looks like there is going to be user interaction (snippet below). How do I run the code so there is a way for user to interact with the program?

    static void Test_initTask(UArg arg0, UArg arg1)
    {
        int32_t         retVal = 0;

        /* Initialize the test logger framework: */
        MCPI_Initialize ();

        while (1)
        {
            System_printf ("********************************************************\n");
            System_printf ("Watchdog Unit Test                                      \n");
            System_printf ("Please select the type of test to execute:  \n");
            System_printf ("1. Watchdog reset test                      \n");
            System_printf ("2. Watchdog interrupt CPU test              \n");
            System_printf ("3. Watchdog DSP interrupt CPU test          \n");
            System_printf ("*******************************************************\n");
            System_printf ("> Enter your selection: ");

            while (testSelection == 0);

            /* Validate the selection: */
            if ((testSelection >= WATCHDOG_APP_TEST_RESET) && (testSelection <= WATCHDOG_APP_TEST_DSP_INTERRUPT))
                break;
        }
        if (testSelection == WATCHDOG_APP_TEST_RESET)
        {
            System_printf("Debug: Testing watchdog reset mode\n");
            retVal = watchdogTest();
        }
        else if (testSelection == WATCHDOG_APP_TEST_INTERRUPT)
        {
            System_printf("Debug: Testing watchdog interrupt mode\n");
            retVal = watchdogTest();
        }
        else if (testSelection == WATCHDOG_APP_TEST_DSP_INTERRUPT)
        {
            System_printf("Debug: Waiting for watchdog interrupt from DSP\n");
            retVal = watchdogNotifyTest();
        }

        if (retVal == -1)
            MCPI_setFeatureTestResult("Watchdog testing", MCPI_TestResult_FAIL);
        else
            MCPI_setFeatureTestResult("Watchdog testing", MCPI_TestResult_PASS);

        if (retVal < 0)
        {
            System_printf("Debug: Watchdog testing failed\n");
        }

        MCPI_setTestResult ();

        /* Exit BIOS */
        BIOS_exit(0);

        return;
    }
  • Hello,

    The best way to go about this is to take the .xer4f and .xe674 and run debug in ccs. Then I would change the testSelection variable to what test you want to run and that will take you out of the while loop. Alternatively, you can use the make file to generate the binary, but I would go into the code and change what the testSelection variable is initialized to match which test you want to run.

    Best regards,

    Connor Desmond