浏览代码

watchdog timers update

namrota ghosh 7 月之前
父节点
当前提交
6db2de3c2b
共有 2 个文件被更改,包括 20 次插入0 次删除
  1. 1 0
      main.c
  2. 19 0
      src/wwdt/wwdt.c

+ 1 - 0
main.c

@@ -111,6 +111,7 @@ int main(void)
     DL_TimerG_startCounter(TIMER_0_INST);
     
     
+    
     while(1)
     {   
         if(picommandPending)

+ 19 - 0
src/wwdt/wwdt.c

@@ -0,0 +1,19 @@
+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){
+                                                                        
+
+    }
+}