TOP Contributors

  1. MIKROE (2657 codes)
  2. Alcides Ramos (354 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 (136901 times)
  2. FAT32 Library (70034 times)
  3. Network Ethernet Library (56005 times)
  4. USB Device Library (46308 times)
  5. Network WiFi Library (41934 times)
  6. FT800 Library (41232 times)
  7. GSM click (29022 times)
  8. PID Library (26434 times)
  9. mikroSDK (26401 times)
  10. microSD click (25387 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: 1632 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

Accel 13 click

0

Accel 13 Click features an ultra-low power triaxial accelerometer sensor with embedded intelligence, labeled as the IIS2DLPC.

[Learn More]

EEG click

5

EEG Click is a Click board that allows monitoring of brain activity. Although not suitable for clinical examination, it is quite sufficient to allow some insight into brain activity.

[Learn More]

EEPROM 8 click

0

EEPROM 8 Click is a compact add-on board that contains a highly reliable nonvolatile memory solution. This board features the CAV24C512, a 512-Kb electrically erasable programmable memory with enhanced hardware write protection for entire memory from ON Semiconductor. Internally organized as 65,536 words of 8 bits each, the CAV24C512 comes up with the compatible I2C serial interface. The CAV24C512 combines unprecedented data storage with excellent energy efficiency. It lasts one million full-memory read/write/erase cycles with more than 100 years of data retention.

[Learn More]