Watchdog Timer Interface

Watchdog Timer Platform interface

Watchdog Timer Overview

A Watchdog Timer (WDT) is a hardware timer designed to monitor the operation of a system and ensure its proper functioning. It serves as a fail-safe mechanism by automatically resetting the system if it detects abnormal behavior, such as a software hang or malfunction.

Application Interface

Users can directly call the API’s though most of them will be called by device drivers.

The below table captures the functions that are to be called from the application layer.

API Functions

Function

Description

rs_wdt_init

To open the watchdog timer

rs_wdt_kick

To refresh the watchog timer.

rs_wdt_process

To processes the watchdog timer feature

rs_task_wdt_kick

To alled for kick the watchdog timer

rs_task_wdt_enable

To called for Enable the watchdog timer.

Error Code

  • Every API’s for the WDT returns some success or failure values. Please refer below section,

Documentation from the relevant header as follows:

Watch dog timer Specific APIs.

Defines macros and functions specific to wdt functionality

Author

Embien RAPIDSEA Team

Copyright

Embien Technologies India Pvt. Ltd.

Typedefs

typedef struct tag_rs_wdt_config rs_wdt_config_t

Structure for the WDT config.

typedef struct tag_rs_wdt_instance rs_wdt_instance_t

Structure for the WDT instance.

Functions

rs_handle_t rs_wdt_open(rs_wdt_instance_t *ptr_instance, rs_wdt_config_t *ptr_config)

Opens and initializes a hardware watchdog instance.

This function configures and initializes a hardware watchdog instance based on the provided configuration parameters.

Parameters:
  • ptr_instance[in] - A pointer to the watchdog instance.

  • ptr_config[in] - A pointer to the watchdog configuration.

Returns:

return handle om sucess or error on failure

rs_ret_val_t rs_wdt_kick(rs_handle_t handle)
struct tag_rs_wdt_config
#include <rs_wdt.h>

Structure for the WDT config.

Public Members

uint8_t wdt_index

Index of wdt.

uint8_t wdt_status

Enable/Disable wdt.

uint16_t wdt_timeout_in_sec

Timeout for reset.

struct tag_rs_wdt_instance
#include <rs_wdt.h>

Structure for the WDT instance.

Public Members

rs_wdt_config_t *ptr_config

Pointer to the wdt configuration.