MAX78002 Peripheral Driver API
Peripheral Driver API for the MAX78002
lp.h
1
6/******************************************************************************
7 *
8 * Copyright (C) 2022-2023 Maxim Integrated Products, Inc. (now owned by
9 * Analog Devices, Inc.),
10 * Copyright (C) 2023-2024 Analog Devices, Inc.
11 *
12 * Licensed under the Apache License, Version 2.0 (the "License");
13 * you may not use this file except in compliance with the License.
14 * You may obtain a copy of the License at
15 *
16 * http://www.apache.org/licenses/LICENSE-2.0
17 *
18 * Unless required by applicable law or agreed to in writing, software
19 * distributed under the License is distributed on an "AS IS" BASIS,
20 * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
21 * See the License for the specific language governing permissions and
22 * limitations under the License.
23 *
24 ******************************************************************************/
25
26/* Define to prevent redundant inclusion */
27#ifndef LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_LP_H_
28#define LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_LP_H_
29
30/* **** Includes **** */
31#include <stdint.h>
32#include "pwrseq_regs.h"
33#include "mcr_regs.h"
34#include "gcr_regs.h"
35#include "lpcmp.h"
36#include "gpio.h"
37#include "tmr.h"
38
39#ifdef __cplusplus
40extern "C" {
41#endif
42
53typedef enum { MXC_LP_V0_9 = 0, MXC_LP_V1_0, MXC_LP_V1_1 } mxc_lp_ovr_t;
54
59typedef enum {
60 MXC_LP_IPO = MXC_F_GCR_PM_IPO_PD,
61 MXC_LP_IBRO = MXC_F_GCR_PM_IBRO_PD,
63
68
73
78
83
89
95
102
107
112
119
124
129
136
141
146
153
158
163
170
175
180
187
192
202
210
215
220
227
234
239
244
248void MXC_LP_EnableLPCMPWakeup(mxc_lpcmp_cmpsel_t cmp);
249
253void MXC_LP_DisableLPCMPWakeup(mxc_lpcmp_cmpsel_t cmp);
254
266
271
276
281
286
291
296
301
306
309#ifdef __cplusplus
310}
311#endif
312
313#endif // LIBRARIES_PERIPHDRIVERS_INCLUDE_MAX78002_LP_H_
Registers, Bit Masks and Bit Positions for the GCR Peripheral Module.
#define MXC_F_GCR_PM_IPO_PD
Definition: gcr_regs.h:372
#define MXC_F_GCR_PM_IBRO_PD
Definition: gcr_regs.h:375
Structure type for configuring a GPIO port.
Definition: gpio.h:165
void MXC_LP_PORVCOREoreMonitorDisable(void)
Disable Power on Reset VDD Core Monitor.
void MXC_LP_FastWakeupDisable(void)
Disable Fast wakeup.
void MXC_LP_RetentionRegDisable(void)
Disable retention regulator.
void MXC_LP_BandgapOn(void)
Turn bandgap on.
void MXC_LP_EnableLPCMPWakeup(mxc_lpcmp_cmpsel_t cmp)
Enables the LPCMP to wake up the device from any low power mode.
void MXC_LP_EnableWUTAlarmWakeup(void)
Enables the WUT alarm to wake up the device from any low power mode.
void MXC_LP_SysRam1Shutdown(void)
Shutdown System Ram 1.
int MXC_LP_LDOIsEnabled(void)
Is LDO enabled.
void MXC_LP_SysRam1PowerUp(void)
PowerUp System Ram 1.
int MXC_LP_FastWakeupIsEnabled(void)
Is Fast wake up is Enabled.
void MXC_LP_LDODisable(void)
Disable LDO.
void MXC_LP_EnableGPIOWakeup(mxc_gpio_cfg_t *wu_pins)
Enables the selected GPIO port and its selected pins to wake up the device from any low power mode....
void MXC_LP_EnableRTCAlarmWakeup(void)
Enables the RTC alarm to wake up the device from any low power mode.
mxc_lp_ovr_t
Enumeration type for voltage selection.
Definition: lp.h:53
void MXC_LP_FastWakeupEnable(void)
Enable Fast wakeup.
void MXC_LP_PORVCOREoreMonitorEnable(void)
Enable Power on Reset VDD Core Monitor.
void MXC_LP_EnterMicroPowerMode(void)
Places the device into Micro Power mode. This function returns once an RTC or external interrupt occu...
void MXC_LP_SysRam3PowerUp(void)
PowerUp System Ram 3.
void MXC_LP_EnterStandbyMode(void)
Places the device into Standby mode. This function returns once an RTC or external interrupt occur.
void MXC_LP_SysRam3Shutdown(void)
Shutdown System Ram 3.
void MXC_LP_SysRam2PowerUp(void)
PowerUp System Ram 2.
void MXC_LP_EnterBackupMode(void)
Places the device into BACKUP mode. CPU state is not maintained in this mode, so this function never ...
int MXC_LP_PORVCOREoreMonitorIsEnabled(void)
Is Power on Reset VDD Core Monitor enabled.
void MXC_LP_ClearWakeStatus(void)
clear all wake up status
void MXC_LP_RetentionRegEnable(void)
Enable retention regulator.
void MXC_LP_SetOVR(mxc_lp_ovr_t ovr)
Set ovr bits to set the voltage the micro will run at.
void MXC_LP_DisableTimerWakeup(mxc_tmr_regs_t *tmr)
Disables Timer from waking up device.
void MXC_LP_BandgapOff(void)
Turn bandgap off.
void MXC_LP_DisableWUTAlarmWakeup(void)
Disables the WUT alarm from waking up the device.
void MXC_LP_DisableRTCAlarmWakeup(void)
Disables the RTC alarm from waking up the device.
void MXC_LP_EnableTimerWakeup(mxc_tmr_regs_t *tmr)
Enables Timer to wakeup from any low power mode.
void MXC_LP_DisableLPCMPWakeup(mxc_lpcmp_cmpsel_t cmp)
Disables the LPCMP from waking up the device.
void MXC_LP_DisableGPIOWakeup(mxc_gpio_cfg_t *wu_pins)
Disables the selected GPIO port and its selected pins as a wake up source. Call this function multipl...
void MXC_LP_EnterPowerDownMode(void)
Places the device into Shutdown mode. CPU state is not maintained in this mode, so this function neve...
int MXC_LP_RetentionRegIsEnabled(void)
Is the retention regulator enabled.
void MXC_LP_LDOEnable(void)
Enable LDO.
mxc_lp_cfg_ds_pd_t
Enumeration type for PM Mode.
Definition: lp.h:59
int MXC_LP_ConfigDeepSleepClocks(uint32_t mask)
Configure which clocks are powered down at deep sleep and which are not affected.
void MXC_LP_EnterSleepMode(void)
Places the device into SLEEP mode. This function returns once an RTC or external interrupt occur.
void MXC_LP_SysRam0PowerUp(void)
Wakeup System Ram 0.
void MXC_LP_SysRam0Shutdown(void)
Shutdown System Ram 0.
void MXC_LP_EnterLowPowerMode(void)
Places the device into Low Power mode. This function returns once an RTC or external interrupt occur.
int MXC_LP_BandgapIsOn(void)
Is the bandgap on or off.
void MXC_LP_SysRam2Shutdown(void)
Shutdown System Ram 2.
Definition: tmr_regs.h:76
Registers, Bit Masks and Bit Positions for the MCR Peripheral Module.
Registers, Bit Masks and Bit Positions for the PWRSEQ Peripheral Module.