Azure Sphere MT3620 M4 API Reference Manual
 All Data Structures Functions Variables Typedefs Enumerations Enumerator Groups Pages
os_hal_lp.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_LP_H__
37 #define __OS_HAL_LP_H__
38 
39 #include <stdint.h>
40 
130 typedef enum {
135 } dslp_check;
136 
141 typedef enum {
148 } lp_scenario;
149 
154 typedef enum {
156  EINT_WAKEUP_SRC_0 = (1 << 0),
158  EINT_WAKEUP_SRC_1 = (1 << 1),
160  EINT_WAKEUP_SRC_2 = (1 << 2),
162  EINT_WAKEUP_SRC_3 = (1 << 3),
164  EINT_WAKEUP_SRC_4 = (1 << 4),
166  EINT_WAKEUP_SRC_5 = (1 << 5),
168  EINT_WAKEUP_SRC_6 = (1 << 6),
170  EINT_WAKEUP_SRC_7 = (1 << 7),
172  EINT_WAKEUP_SRC_8 = (1 << 8),
174  EINT_WAKEUP_SRC_9 = (1 << 9),
176  EINT_WAKEUP_SRC_10 = (1 << 10),
178  EINT_WAKEUP_SRC_11 = (1 << 11),
180  EINT_WAKEUP_SRC_12 = (1 << 12),
182  EINT_WAKEUP_SRC_13 = (1 << 13),
184  EINT_WAKEUP_SRC_14 = (1 << 14),
186  EINT_WAKEUP_SRC_15 = (1 << 15),
188  EINT_WAKEUP_SRC_16 = (1 << 16),
190  EINT_WAKEUP_SRC_17 = (1 << 17),
192  EINT_WAKEUP_SRC_18 = (1 << 18),
194  EINT_WAKEUP_SRC_19 = (1 << 19),
196  EINT_WAKEUP_SRC_20 = (1 << 20),
198  EINT_WAKEUP_SRC_21 = (1 << 21),
200  EINT_WAKEUP_SRC_22 = (1 << 22),
202  EINT_WAKEUP_SRC_23 = (1 << 23),
204  GPT3_WAKEUP_SRC_24 = (1 << 24),
207 } lp_wakeup_src;
208 
220 #ifdef __cplusplus
221 extern "C" {
222 #endif
223 
232 void mtk_os_hal_lp_config_gpt3_timeout(uint32_t time_val);
233 
245 
260 int mtk_os_hal_lp_enter(uint32_t wakeup_src, lp_scenario lp);
261 
262 #ifdef __cplusplus
263 }
264 #endif
265 
275 #endif
Wake-up source EINT5 is 5.
Definition: os_hal_lp.h:166
Wake-up source EINT10 is 10.
Definition: os_hal_lp.h:176
Wake-up source EINT2 is 2.
Definition: os_hal_lp.h:160
int mtk_os_hal_lp_enter(uint32_t wakeup_src, lp_scenario lp)
This function is used to enter different low power scenarios.
Wake-up source EINT4 is 4.
Definition: os_hal_lp.h:164
int mtk_os_hal_lp_dslp_check(dslp_check stage)
This function is used to check whether ARM Cortex-M4F I/O subsystems have entered DSLP...
Wake-up source GPT3 is 24.
Definition: os_hal_lp.h:204
Wake-up source EINT21 is 21.
Definition: os_hal_lp.h:198
Wake-up source EINT13 is 13.
Definition: os_hal_lp.h:182
void mtk_os_hal_lp_config_gpt3_timeout(uint32_t time_val)
This function is used to configure timeout value of GPT3.
Wake-up source EINT18 is 18.
Definition: os_hal_lp.h:192
lp_wakeup_src
LP wake-up source definition Users should select the following parameter to configure wake-up source ...
Definition: os_hal_lp.h:154
Wake-up source EINT8 is 8.
Definition: os_hal_lp.h:172
Wake-up source EINT1 is 1.
Definition: os_hal_lp.h:158
Wake-up source EINT6 is 6.
Definition: os_hal_lp.h:168
Wake-up source EINT0 is 0.
Definition: os_hal_lp.h:156
Total wake-up source number is 25.
Definition: os_hal_lp.h:206
Wake-up source EINT3 is 3.
Definition: os_hal_lp.h:162
Wake-up source EINT20 is 20.
Definition: os_hal_lp.h:196
Legacy Sleep is 1.
Definition: os_hal_lp.h:145
Wake-up source EINT16 is 16.
Definition: os_hal_lp.h:188
lp_scenario
LP three scenarios definition Users should select the following parameters when entering related low ...
Definition: os_hal_lp.h:141
dslp_check
DSLP enter/exit stage definition Before entering DSLP, user should use the PRE_DEEP_SLEEP parameter t...
Definition: os_hal_lp.h:130
Wake-up source EINT15 is 15.
Definition: os_hal_lp.h:186
Deep Sleep is 2.
Definition: os_hal_lp.h:147
Wake-up source EINT12 is 12.
Definition: os_hal_lp.h:180
Wake-up source EINT17 is 17.
Definition: os_hal_lp.h:190
Wake-up source EINT9 is 9.
Definition: os_hal_lp.h:174
Wake-up source EINT22 is 22.
Definition: os_hal_lp.h:200
CPU Clock Gating is 0.
Definition: os_hal_lp.h:143
Wake-up source EINT14 is 14.
Definition: os_hal_lp.h:184
Wake-up source EINT11 is 11.
Definition: os_hal_lp.h:178
Wake-up source EINT23 is 23.
Definition: os_hal_lp.h:202
It is used after exiting DSLP stage.
Definition: os_hal_lp.h:134
Wake-up source EINT7 is 7.
Definition: os_hal_lp.h:170
It is used before entering DSLP stage.
Definition: os_hal_lp.h:132
Wake-up source EINT19 is 19.
Definition: os_hal_lp.h:194