1 /* 2 * Copyright (c) 2024 ENE Technology Inc. 3 * 4 * SPDX-License-Identifier: Apache-2.0 5 */ 6 7 #ifndef ENE_KB1200_WDT_H 8 #define ENE_KB1200_WDT_H 9 10 /** 11 * brief Structure type to access Watch Dog Timer (WDT). 12 */ 13 struct wdt_regs { 14 volatile uint8_t WDTCFG; /*Configuration Register */ 15 volatile uint8_t WDTCFG_T; /*Configuration Reset Type Register */ 16 volatile uint16_t Reserved0; /*Reserved */ 17 volatile uint8_t WDTIE; /*Interrupt Enable Register */ 18 volatile uint8_t Reserved1[3]; /*Reserved */ 19 volatile uint8_t WDTPF; /*Event Pending Flag Register */ 20 volatile uint8_t Reserved2[3]; /*Reserved */ 21 volatile uint16_t WDTM; /*WDT Match Value Register */ 22 volatile uint16_t Reserved3; /*Reserved */ 23 volatile uint8_t WDTSCR[4]; /*FW Scratch(4 bytes) Register */ 24 }; 25 26 #define WDT_MIN_CNT 3U 27 #define WDT_TICK_TIME_US 31250 28 29 #define WDT_RESET_WHOLE_CHIP_WO_GPIO 0 30 #define WDT_RESET_WHOLE_CHIP 1 31 #define WDT_RESET_ONLY_MCU 2 32 33 #define WDT_DISABLE_PASSWORD 0x90 34 #define WDT_ADCO32K 0x00 35 #define WDT_PHER32K 0x02 36 #define WDT_FUNCTON_ENABLE 0x01 37 38 #define WDT_HALF_WAY_EVENT 0x01 39 #define WDT_RESET_EVENT 0x02 40 41 #endif /* ENE_KB1200_WDT_H */ 42