Trident IoT SDK
 
Loading...
Searching...
No Matches
T32CZ20_wdog.h File Reference

This is the chip specific include file for T32CZ20 Watchdog Driver note that there is a common include file for this HAL module that contains the APIs (such as the init function) that should be used by the application. More...

#include "tr_hal_platform.h"
+ Include dependency graph for T32CZ20_wdog.h:
+ This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Data Structures

struct  WDOG_REGISTERS_T
 the struct we use so we can address registers using field names More...
 
struct  tr_hal_wdog_settings_t
 

Macros

#define CHIP_MEMORY_MAP_WDOG_BASE   (0x40010000UL)
 chip register addresses section 2.2 of the data sheet explains the Memory map. this gives the base address for how to write the chip registers the chip registers are how the software interacts and configures the HAL peripherals. We create a struct below that addresses the individual registers. This makes it so we can use this base address and a struct field to read or write a chip register
 
#define TR_HAL_WDOG_MINIMUM_INITIAL_VALUE   32000000
 
#define TR_HAL_WDOG_CTRL_LOCKOUT   0x01
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_ALSO_4096   0x1C
 
#define TR_HAL_WDOG_CTRL_RESET_ENABLED   0x20
 
#define TR_HAL_WDOG_CTRL_RESET_DISABLED   0x00
 
#define TR_HAL_WDOG_CTRL_INTERRUPT_ENABLED   0x40
 
#define TR_HAL_WDOG_CTRL_INTERRUPT_DISABLED   0x00
 
#define TR_HAL_WDOG_CTRL_TIMER_ENABLED   0x80
 
#define TR_HAL_WDOG_CTRL_TIMER_DISABLED   0x00
 
#define TR_HAL_WDOG_RESET_WATCHDOG_VALUE   0xA5A5
 
#define TR_HAL_WDOG_CLEAR_RESET_COUNTER   0x01
 
#define TR_HAL_WDOG_CLEAR_INTERRUPT   0x01
 
#define TR_HAL_WDOG_DEFAULT_MIN_TIME_BEFORE_RESET   0
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_1   0
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_16   15
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_32   31
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_128   127
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_256   255
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_1024   1023
 
#define TR_HAL_WDOG_CTRL_CLK_PRESCALAR_4096   4095
 
#define WDOG_REGISTERS   ((WDOG_REGISTERS_T *) CHIP_MEMORY_MAP_WDOG_BASE)
 
#define TR_HAL_WDOG_1_SECOND_TIMER_VALUE   32000
 
#define TR_HAL_WDOG_1_SECOND_PRESCALAR_VALUE   TR_HAL_WDOG_CLK_PRESCALAR_1024
 
#define TR_HAL_WDOG_EVENT_INT_TRIGGERED   0x00000001
 
#define DEFAULT_WDOG_CONFIG
 

Typedefs

typedef void(* tr_hal_wdog_event_callback_t) (uint32_t event_bitmask)
 

Enumerations

enum  tr_hal_wdog_prescalar_t {
  TR_HAL_WDOG_CLK_PRESCALAR_1 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_1 ,
  TR_HAL_WDOG_CLK_PRESCALAR_16 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_16 ,
  TR_HAL_WDOG_CLK_PRESCALAR_256 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_256 ,
  TR_HAL_WDOG_CLK_PRESCALAR_32 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_32 ,
  TR_HAL_WDOG_CLK_PRESCALAR_128 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_128 ,
  TR_HAL_WDOG_CLK_PRESCALAR_1024 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_1024 ,
  TR_HAL_WDOG_CLK_PRESCALAR_4096 = TR_HAL_WDOG_CTRL_CLK_PRESCALAR_4096
}
 this enum is used for setting the clock prescalar in the settings struct More...
 

Functions

WDOG_REGISTERS_Ttr_hal_wdog_get_register_address (void)
 

Detailed Description

This is the chip specific include file for T32CZ20 Watchdog Driver note that there is a common include file for this HAL module that contains the APIs (such as the init function) that should be used by the application.


SPDX-License-Identifier: LicenseRef-TridentMSLA SPDX-FileCopyrightText: 2025 Trident IoT, LLC https://www.tridentiot.com