Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
os_hal_wdt.h
1 /*
2  * (C) 2005-2020 MediaTek Inc. All rights reserved.
3  *
4  * Copyright Statement:
5  *
6  * This MT3620 driver software/firmware and related documentation
7  * ("MediaTek Software") are protected under relevant copyright laws.
8  * The information contained herein is confidential and proprietary to
9  * MediaTek Inc. ("MediaTek"). You may only use, reproduce, modify, or
10  * distribute (as applicable) MediaTek Software if you have agreed to and been
11  * bound by this Statement and the applicable license agreement with MediaTek
12  * ("License Agreement") and been granted explicit permission to do so within
13  * the License Agreement ("Permitted User"). If you are not a Permitted User,
14  * please cease any access or use of MediaTek Software immediately.
15  *
16  * BY OPENING THIS FILE, RECEIVER HEREBY UNEQUIVOCALLY ACKNOWLEDGES AND AGREES
17  * THAT MEDIATEK SOFTWARE RECEIVED FROM MEDIATEK AND/OR ITS REPRESENTATIVES ARE
18  * PROVIDED TO RECEIVER ON AN "AS-IS" BASIS ONLY. MEDIATEK EXPRESSLY DISCLAIMS
19  * ANY AND ALL WARRANTIES, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE
20  * IMPLIED WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE OR
21  * NONINFRINGEMENT. NEITHER DOES MEDIATEK PROVIDE ANY WARRANTY WHATSOEVER WITH
22  * RESPECT TO THE SOFTWARE OF ANY THIRD PARTY WHICH MAY BE USED BY,
23  * INCORPORATED IN, OR SUPPLIED WITH MEDIATEK SOFTWARE, AND RECEIVER AGREES TO
24  * LOOK ONLY TO SUCH THIRD PARTY FOR ANY WARRANTY CLAIM RELATING THERETO.
25  * RECEIVER EXPRESSLY ACKNOWLEDGES THAT IT IS RECEIVER'S SOLE RESPONSIBILITY TO
26  * OBTAIN FROM ANY THIRD PARTY ALL PROPER LICENSES CONTAINED IN MEDIATEK
27  * SOFTWARE. MEDIATEK SHALL ALSO NOT BE RESPONSIBLE FOR ANY MEDIATEK SOFTWARE
28  * RELEASES MADE TO RECEIVER'S SPECIFICATION OR TO CONFORM TO A PARTICULAR
29  * STANDARD OR OPEN FORUM. RECEIVER'S SOLE AND EXCLUSIVE REMEDY AND MEDIATEK'S
30  * ENTIRE AND CUMULATIVE LIABILITY WITH RESPECT TO MEDIATEK SOFTWARE RELEASED
31  * HEREUNDER WILL BE ANY SOFTWARE LICENSE FEES OR SERVICE CHARGE PAID BY
32  * RECEIVER TO MEDIATEK DURING THE PRECEDING TWELVE (12) MONTHS FOR SUCH
33  * MEDIATEK SOFTWARE AT ISSUE.
34  */
35 
36 #ifndef __OS_HAL_WDT_H__
37 #define __OS_HAL_WDT_H__
38 
130 struct os_wdt_int {
132  void (*wdt_cb_hdl)(void *);
136  void *wdt_cb_data;
137 };
138 
158 };
159 
171 };
172 
182 #ifdef __cplusplus
183 extern "C" {
184 #endif
185 
193 void mtk_os_hal_wdt_enable(void);
194 
202 void mtk_os_hal_wdt_disable(void);
203 
211 int mtk_os_hal_wdt_set_timeout(unsigned int sec);
212 
220 void mtk_os_hal_wdt_restart(void);
221 
233 void mtk_os_hal_wdt_sw_reset(void);
234 
246 void mtk_os_hal_wdt_hw_reset(void);
247 
259 
270 void mtk_os_hal_wdt_config(enum os_wdt_mode mode);
271 
283 void mtk_os_hal_wdt_register_irq(struct os_wdt_int *wdt_int);
284 
295 void mtk_os_hal_wdt_init(void);
296 
297 #ifdef __cplusplus
298 }
299 #endif
300 
310 #endif /* __OS_HAL_WDT_H__ */
void mtk_os_hal_wdt_disable(void)
This function is used to disable WDT.
void mtk_os_hal_wdt_enable(void)
This function is used to enable WDT.
No abnormal reset status.
Definition: os_hal_wdt.h:166
Configure WDT to IRQ mode.
Definition: os_hal_wdt.h:157
Reset by WDT swrst function.
Definition: os_hal_wdt.h:168
void mtk_os_hal_wdt_hw_reset(void)
This function is used to reset the M4 core immediately by WDT counter timeout.
Configure WDT to reset mode.
Definition: os_hal_wdt.h:155
os_wdt_mode
The enum definition of WDT event mode.
Definition: os_hal_wdt.h:153
enum os_wdt_rst_sta mtk_os_hal_wdt_get_reset_status(void)
This function is used to get core last reset status value.
void * wdt_cb_data
The pointer of WDT interrupt callback data, which will be passed into user interrupt handle...
Definition: os_hal_wdt.h:136
void mtk_os_hal_wdt_restart(void)
This function is used to restart WDT counter.
void mtk_os_hal_wdt_init(void)
This function is used to initialize WDT device(with disable WDT) and to make WDT driver effective...
void mtk_os_hal_wdt_sw_reset(void)
This function is used to reset the M4 core immediately by WDT software reset.
os_wdt_rst_sta
The enum definition of system reset status.
Definition: os_hal_wdt.h:164
The definition of WDT user interrupt handle structure.
Definition: os_hal_wdt.h:130
int mtk_os_hal_wdt_set_timeout(unsigned int sec)
This function is used to set WDT timeout value.
void mtk_os_hal_wdt_register_irq(struct os_wdt_int *wdt_int)
This function is used to register user interrupt handle for WDT.
void(* wdt_cb_hdl)(void *)
The user interrupt handle of WDT.
Definition: os_hal_wdt.h:132
Reset by WDT counter timeout.
Definition: os_hal_wdt.h:170
void mtk_os_hal_wdt_config(enum os_wdt_mode mode)
This function is used to config WDT irq mode.