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.

AWR2944: AWR2944

Part Number: AWR2944
Other Parts Discussed in Thread: AWR1642

Hello, 

I've 2 questions please , 
1)  how can I add watchdog functionality to my project on DSS on AWR294x ?

2) in the datasheet

Timers and Watchdog Module
– Five Real Time Interrupts (RTI) modules, three in MSS and two in DSS.
– Two Watchdog modules, one in DSS and one in MSS (Same RTI IP but in Watchdog configuration)

15.1.1 Features
The RTI module has the following features:
• Two independent 64 bit counter blocks
• Windowed Watchdog Timer (WWDT) Feature
• Four configurable compares for generating operating system ticks or DMA requests. Each event can be
driven by either counter block 0 or counter block 1.
• Fast enabling/disabling of events
• Two time stamp (capture) functions for system or peripheral interrupts, one for each counter block
• Digital windowed watchdog


Is there 2 types of watchdogs ( digital and not digital) ?

  • Hi Bishoy,

    I would recommend you referring watchdog driver example available at below path (from mmWave MCU Plus SDK installation) to get more understanding of using watchdog in your application.

    /mmwave_mcuplus_sdk_04_04_00_01/mcu_plus_sdk_awr294x_08_06_00_28/examples/drivers/watchdog/watchdog_interrupt/awr294x-evm/c66ss0_nortos

    .

    You are right about no. of instances of RTI and WDT.

    There is only one type of watchdog that can be configured to use in windowed mode. Hope above example gives you more insight.

    .

    Regards,

    Jitendra

  • Hello Jitendra,

    Thanks for reply , i checked the example but still can't understand fully , i tried to check other threads for watchdog like this one 
    "AWR1642: How to set the watchdog configurations exactly on DSS ?" but not the same target 

    the example in /mmwave_mcuplus_sdk_04_04_00_01/mcu_plus_sdk_awr294x_08_06_00_28/examples/drivers/watchdog/watchdog_interrupt/awr294x-evm/c66ss0_nortos

    has the following code 

    ""

    void watchdogCallback(void *arg)
    {
    gWatchdogInt++;
    if (gWatchdogInt < 10)
    {
    Watchdog_clear(gWatchdogHandle[CONFIG_WDT0]);
    }
    return;
    }

    void watchdog_interrupt_main(void *args)
    {

    /* Open drivers to open the UART driver for console */
    Drivers_open();
    Board_driversOpen();
    #if defined(SOC_AM64X) || defined(SOC_AM243X)
    HwiP_Params hwiPrms;
    int32_t status = SystemP_SUCCESS;
    static HwiP_Object gRtiHwiObject;
    /* Register interrupt */
    HwiP_Params_init(&hwiPrms);
    hwiPrms.intNum = CONFIG_WDT0_INTR;
    hwiPrms.callback = &watchdogCallback;
    status = HwiP_construct(&gRtiHwiObject, &hwiPrms);
    DebugP_assert(status == SystemP_SUCCESS);
    #endif
    DebugP_log("Watchdog interrupt Mode Test Started ...\r\n");

    while (gWatchdogInt == 0);

    DebugP_log("Watchdog Driver NMI received\r\n");

    DebugP_log("All tests have passed!!\r\n");

    Board_driversClose();
    Drivers_close();

    }


    ""

    1) what is the check here doing "#if defined(SOC_AM64X) || defined(SOC_AM243X)" ?

    2) what is the relation between hwi and configuring the watchdog ?

    3) why i can't find something like Watchdog_open fucntion used ?




    I did initially  the below code but not sure what else is needed 

    ""

    Watchdog_Handle watchdogHandle = NULL;

    void watchdogCallback(void *arg)
    {
    Watchdog_clear(watchdogHandle);
    return;
    }
    static int32_t watchdogInit(void)
    {

    Watchdog_Params watchdogParams;

    /* Initialize the Watchdog driver */
    Watchdog_init();

    /* Initialize the Watchdog driver default parameters */
    Watchdog_paramsInit(&watchdogParams);

    watchdogParams.resetMode = Watchdog_RESET_OFF;
    watchdogParams.callbackFxn = watchdogCallback;
    watchdogParams.debugStallMode = Watchdog_DEBUG_STALL_ON;
    watchdogParams.windowSize = Watchdog_WINDOW_100_PERCENT;
    watchdogParams.expirationTime= 100; //100 ms

    /* Open the Watchdog driver */
    watchdogHandle = Watchdog_open(0, &watchdogParams);
    if (watchdogHandle == NULL)
    {
    return -1;
    }

    return 0;
    }


    ""

  • Hello Bishoy,

    1) what is the check here doing "#if defined(SOC_AM64X) || defined(SOC_AM243X)" ?

    This is set to check what device it is and to run the condition under the preprocessor directive.

    2) what is the relation between hwi and configuring the watchdog ?

    HWI is the hardware interrupt module and in the code using the hwi code you can configure the hardware interrupt. In this case you are doing the same for watchdog interrupt

    3) why i can't find something like Watchdog_open fucntion used ?

    There is no such function, the watchdog is configured in the syscfg and then it is generating the code using the syscfg configuration and you will be able to see how the driver is initialized.

    Regards,
    Saswat Kumar

  • 3) why i can't find something like Watchdog_open fucntion used ?

    There is no such function, the watchdog is configured in the syscfg and then it is generating the code using the syscfg configuration and you will be able to see how the driver is initialized.

    BE: why there is no such fucntion ? I can find it in the watchdg driver (watchdog_rti.h)

    /**
    * \brief Opens a Watchdog object with the index and parameters specified, and
    * returns a Watchdog_Handle.
    *
    * \param index Logical peripheral number for the Watchdog indexed
    * into the Watchdog_Config table
    *
    * \param params Pointer to an parameter block, if NULL it will use
    * default values.
    *
    * \return A Watchdog_Handle on success or a NULL on an error or if it has been
    * opened already.
    */
    Watchdog_Handle Watchdog_open(uint8_t index, Watchdog_Params *params);


    4) is there a guide on generating the code using the syscfg configuration

  • Hello Bishoy,

    You have to build the example using the make command, then the syscfg files will be generated.
    Please refer this: C:/ti/mmwave_mcuplus_sdk_04_04_00_01/mcu_plus_sdk_awr294x_08_06_00_28/docs/api_guide_awr294x/DRIVERS_WATCHDOG_PAGE.html

    Regards,
    Saswat Kumar