TOP Contributors

  1. MIKROE (2653 codes)
  2. Alcides Ramos (351 codes)
  3. Shawon Shahryiar (307 codes)
  4. jm_palomino (112 codes)
  5. Chisanga Mumba (90 codes)
  6. S P (73 codes)
  7. dany (71 codes)
  8. MikroBUS.NET Team (35 codes)
  9. NART SCHINACKOW (34 codes)
  10. Armstrong Subero (27 codes)

Most Downloaded

  1. Timer Calculator (136650 times)
  2. FAT32 Library (69863 times)
  3. Network Ethernet Library (55899 times)
  4. USB Device Library (46244 times)
  5. Network WiFi Library (41870 times)
  6. FT800 Library (41106 times)
  7. GSM click (28960 times)
  8. PID Library (26403 times)
  9. mikroSDK (26324 times)
  10. microSD click (25340 times)
Libstock prefers package manager

Package Manager

We strongly encourage users to use Package manager for sharing their code on Libstock website, because it boosts your efficiency and leaves the end user with no room for error. [more info]

< Back
mikroSDK Library

Watchdog click

Rating:

5

Author: MIKROE

Last Updated: 2021-02-15

Package Version: 1.0.0.0

mikroSDK Library: 1.0.0.0

Category: Clock & Timing

Downloaded: 1609 times

Not followed.

License: MIT license  

Watchdog Click is a compact add-on board that contains a simple countdown timer for a wide variety of applications. This board features the TPS3430, a standalone watchdog timer with a programmable watchdog window and programmable reset delay from Texas Instruments.

No Abuse Reported

Do you want to subscribe in order to receive notifications regarding "Watchdog click" changes.

Do you want to unsubscribe in order to stop receiving notifications regarding "Watchdog click" changes.

Do you want to report abuse regarding "Watchdog click".

  • mikroSDK Library 2.0.0.0
  • Comments (0)
DOWNLOAD LINK RELATED COMPILER CONTAINS
mikroBasic PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroBasic PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroC PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for ARM
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for AVR
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for dsPIC30/33 & PIC24
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for FT90x
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc
mikroPascal PRO for PIC32
  • lib
  • src
  • exa
  • hlp
  • hex
  • sch
  • pcb
  • doc

mikroSDK Library Blog

Watchdog Click

Watchdog Click

Native view of the Watchdog Click board.

View full image
Watchdog Click

Watchdog Click

Front and back view of the Watchdog Click board.

View full image

Library Description

The library covers all the necessary functions to control the Watchdog click board.

Key functions:

  • void watchdog_send_pulse ( uuint16_t p_duration_ms ) - Send pulse function.
  • void watchdog_setup_time ( uint8_t setup_time_mode ) - Set the watchdog time function.
  • void watchdog_reset_time ( void ) - Reset time function.

Examples description

The application is composed of three sections :

  • System Initialization - Initializes GPIO, set RST, CS and PWM pin as outputs,
     set INT pin as input and begins to write log.
  • Application Initialization - Initialization driver enables - GPIO,
     configure the watchdog window, enable watchdog and init. Timer Interrupt,
     also write log.
  • Application Task - (code snippet) This is an example that demonstrates the use of the Watchdog click board. In the first part of the example, we send pulses in a valid time window (Correct Operation). The second part of the example sends pulses outside the valid time window and then the watchdog detects a fault condition, display "Fault", performs the reset and turn on the LED ( WDT FLT ) on the Watchdog click board. Results are being sent to the Usart Terminal where you can track their changes.
void application_task ( )
{
    watchdog_reset_time( );
    watchdog_set_config( 50, 5 );

    n_cnt = 100;
    while ( n_cnt > 0 )
    {
        if ( watchdog_get_wdo( ) != 0 )
        {
            mikrobus_logWrite( "  Correct Operation  ", _LOG_LINE );
            Delay_ms( 1 );
            n_cnt--;
        }
    }
    mikrobus_logWrite( "---------------------", _LOG_LINE );

    watchdog_reset_time( );
    watchdog_set_config( 120, 1 );

    n_cnt = 50;
    while ( n_cnt > 0 )
    {
        if ( watchdog_get_wdo( ) == 0 )
        {
            mikrobus_logWrite( "        Fault        ", _LOG_LINE );
            Delay_ms( 1 );
            n_cnt--;
        }
    }
    mikrobus_logWrite( "---------------------", _LOG_LINE );
}

Other mikroE Libraries used in the example:

  • GPIO
  • UART

Additional notes and informations

Depending on the development board you are using, you may need USB UART clickUSB UART 2 click or RS232 click to connect to your PC, for development systems with no UART to USB interface available on the board. The terminal available in all MikroElektronika compilers, or any other terminal application of your choice, can be used to read the message.

ALSO FROM THIS AUTHOR

Ultra-Low Press click

0

Ultra-Low Press Click is a compact add-on board containing a mountable gage pressure sensor for pneumatic pressure measurements.

[Learn More]

DMX click

5

DMX Click is a device used to establish communication between the MCU and equipment that uses the DMX512-A communication protocol.

[Learn More]

Serializer click

0

Serializer Click is a compact add-on board that contains a digital input translator/serializer. This board features the MAX31910, an eight-channel digital input serializer for high-channel density digital input modules in industrial and process automation from Analog Devices. The MAX31910 translates, conditions, and serializes the 24V digital output of sensors and switches to 5V CMOS-compatible signals required by the MCU. It provides the front-end interface circuit of a programmable logic controller (PLC) digital input module. It communicates with MCU via the SPI interface and comes in configuration with an installed digital isolator. This Click board™ is suited for various applications such as industrial, process, and building automation, digital input modules for PLCs, and more.

[Learn More]