1.24 WDT Timeout
This is a WDT test application designed to demonstrate the communication timeout feature of the WDT application available under - apps/wdt/wdt_timeout.
Description
This example uses the WDT peripheral library and serves as a test application to demonstrate Timeout scenario application available at apps/wdt/wdt_timeout.
This code demonstrates how to use a Watchdog Timer to reset the system in case of a deadlock and how to handle GPIO interrupts for a switch press. The timer periodically toggles an LED and clears the WDT to prevent a reset, ensuring the system remains responsive unless a switch press causes a deliberate deadlock.
Downloading and Building the Application
To clone or download this application from Github, go to the main page of this repository and then click Clone button to clone this repository or download as zip file. This content can also be downloaded using content manager by following these instructions.
Path of the application within the repository is apps/wdt/wdt_timeout.
To build the application, refer to the following table and open the project using its IDE.
Project Name | Description |
---|---|
pic32ak_gc_curiosity.X | MPLABX project for Curiosity Platform Development Board |
Setting Up the Hardware
The following table shows the target hardware for the application projects.
Project Name | Description |
---|---|
pic32ak_gc_curiosity.X | Curiosity Platform Development Board |
Setting Up Curiosity Platform Development Board
- To run this demo two Curiosity Platform Development Board are required.
- Connect a PIC32AK1216GC41064 General Purpose Dual In-Line Module (DIM) to the J1 header of Curiosity Board.
- Connect the Debug USB port on the board to the computer using a micro USB cable
Running the Application
- Build and Program the WDT application project using its IDE
- Build and Program the WDT application project using its IDE. Path of the WDT application within the repository is apps/wdt/wdt_timeout/firmware
- LED on curiosity board indicates the WDT
Timeout
- LED is turned ON when the WDT reaches Timeout Condition
- LED is turned OFF when the WDT reaches Deadlock Condition
Following table provides the Switch and LED names:Board Switch Name LED Name Curiosity Platform Development Board S1 LED1