namrota ghosh 6 mēneši atpakaļ
vecāks
revīzija
546d0e0378
1 mainītis faili ar 10 papildinājumiem un 16 dzēšanām
  1. 10 16
      src/wwdt/wwdt.c

+ 10 - 16
src/wwdt/wwdt.c

@@ -1,19 +1,13 @@
-void pet_wwdt(){
-    //MCU petting the WWDT:
-    /*
-    When the Window Watchdog Timer is in watchdog mode it must be periodically serviced to avoid a 
-    hardware reset. This API must be called after the closed window of the watchdog has passed but before the watchdog resets the device.
-    */
-    DL_WWDT_restart(WWDT0);
-
-}
-
-void get_wwdt_behavior(){
-    /*
-    * Checks if the Window Watchdog Timer is actively running. 
-    */
-    if (DL_WWDT_isRunning() == false){
-                                                                        
+#include "ti/driverlib/dl_gpio.h"
+#include "ti/driverlib/dl_wwdt.h"
+#include "ti_msp_dl_config.h"
 
+void controllerWWDT(){
+    //initializing WWDT:
+    SYSCFG_DL_WWDT0_init();
+    //Checks if the WWDT is actively running:
+    if(DL_WWDT_isRunning(WWDT0_INST)){
+        DL_GPIO_togglePins(GPIO_ControllerBoard_PORT, GPIO_ControllerBoard_PIN_Run_PIN);
     }
+    
 }