MAX32675 Peripheral Driver API
Peripheral Driver API for the MAX32675
lp.h
1 
6 /* ****************************************************************************
7  * Copyright (C) 2019 Maxim Integrated Products, Inc., All Rights Reserved.
8  *
9  * Permission is hereby granted, free of charge, to any person obtaining a
10  * copy of this software and associated documentation files (the "Software"),
11  * to deal in the Software without restriction, including without limitation
12  * the rights to use, copy, modify, merge, publish, distribute, sublicense,
13  * and/or sell copies of the Software, and to permit persons to whom the
14  * Software is furnished to do so, subject to the following conditions:
15  *
16  * The above copyright notice and this permission notice shall be included
17  * in all copies or substantial portions of the Software.
18  *
19  * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS
20  * OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
21  * MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT.
22  * IN NO EVENT SHALL MAXIM INTEGRATED BE LIABLE FOR ANY CLAIM, DAMAGES
23  * OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE,
24  * ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR
25  * OTHER DEALINGS IN THE SOFTWARE.
26  *
27  * Except as contained in this notice, the name of Maxim Integrated
28  * Products, Inc. shall not be used except as stated in the Maxim Integrated
29  * Products, Inc. Branding Policy.
30  *
31  * The mere transfer of this software does not imply any licenses
32  * of trade secrets, proprietary technology, copyrights, patents,
33  * trademarks, maskwork rights, or any other form of intellectual
34  * property whatsoever. Maxim Integrated Products, Inc. retains all
35  * ownership rights.
36  *
37  *************************************************************************** */
38 
39 /* Define to prevent redundant inclusion */
40 #ifndef _LP_H_
41 #define _LP_H_
42 
43 /* **** Includes **** */
44 #include <stdint.h>
45 #include "pwrseq_regs.h"
46 #include "mcr_regs.h"
47 #include "gcr_regs.h"
48 #include "gpio.h"
49 #include "tmr.h"
50 
51 #ifdef __cplusplus
52 extern "C" {
53 #endif
54 
65 typedef enum {
66  MXC_LP_V0_9 = 0,
67  MXC_LP_V1_0,
68  MXC_LP_V1_1
69 } mxc_lp_ovr_t;
70 
75 typedef enum {
76  MXC_LP_IPO = MXC_F_GCR_PM_IPO_PD,
77  MXC_LP_IBRO = MXC_F_GCR_PM_IBRO_PD,
78  MXC_LP_XRFO = MXC_F_GCR_PM_ERFO_PD
80 
84 void MXC_LP_EnterSleepMode (void);
85 
89 void MXC_LP_EnterDeepSleepMode (void);
90 
95 void MXC_LP_EnterBackupMode (void);
96 
101 void MXC_LP_EnterStorageMode (void);
102 
107 void MXC_LP_EnterShutDownMode (void);
108 
114 void MXC_LP_SetOVR (mxc_lp_ovr_t ovr);
115 
119 void MXC_LP_RetentionRegEnable (void);
120 
124 void MXC_LP_RetentionRegDisable (void);
125 
132 
136 void MXC_LP_BandgapOn (void);
137 
141 void MXC_LP_BandgapOff (void);
142 
148 int MXC_LP_BandgapIsOn (void);
149 
154 
159 
166 
170 void MXC_LP_LDOEnable (void);
171 
175 void MXC_LP_LDODisable (void);
176 
182 int MXC_LP_LDOIsEnabled (void);
183 
187 void MXC_LP_FastWakeupEnable (void);
188 
192 void MXC_LP_FastWakeupDisable (void);
193 
199 int MXC_LP_FastWakeupIsEnabled (void);
200 
204 void MXC_LP_ClearWakeStatus (void);
205 
214 
222 
226 void MXC_LP_EnableRTCAlarmWakeup (void);
227 
231 void MXC_LP_DisableRTCAlarmWakeup (void);
232 
239 
246 
250 void MXC_LP_EnableUSBWakeup (void);
251 
255 void MXC_LP_DisableUSBWakeup (void);
256 
260 void MXC_LP_EnableHA0Wakeup (void);
261 
265 void MXC_LP_DisableHA0Wakeup (void);
269 void MXC_LP_EnableHA1Wakeup (void);
270 
274 void MXC_LP_DisableHA1Wakeup (void);
275 
286 int MXC_LP_ConfigDeepSleepClocks (uint32_t mask);
287 
291 void MXC_LP_NFCOscBypassEnable (void);
292 
296 void MXC_LP_NFCOscBypassDisable (void);
297 
304 
309 
314 
319 
324 
329 
334 
339 
344 
348 void MXC_LP_SRCCLightSleepEnable (void);
349 
354 
359 
363 void MXC_LP_ROMLightSleepEnable (void);
364 
369 
374 
379 
384 
389 
394 
399 
404 
408 void MXC_LP_SRCCLightSleepDisable (void);
409 
414 
419 
423 void MXC_LP_ROMLightSleepDisable (void);
424 
428 void MXC_LP_SysRam0Shutdown (void);
429 
433 void MXC_LP_SysRam0PowerUp (void);
434 
438 void MXC_LP_SysRam1Shutdown (void);
439 
443 void MXC_LP_SysRam1PowerUp (void);
444 
448 void MXC_LP_SysRam2Shutdown (void);
449 
453 void MXC_LP_SysRam2PowerUp (void);
454 
458 void MXC_LP_SysRam3Shutdown (void);
459 
463 void MXC_LP_SysRam3PowerUp (void);
464 
468 void MXC_LP_SysRam4Shutdown (void);
469 
473 void MXC_LP_SysRam4PowerUp (void);
474 
478 void MXC_LP_SysRam5Shutdown (void);
479 
483 void MXC_LP_SysRam5PowerUp (void);
484 
488 void MXC_LP_ICache0Shutdown (void);
489 
493 void MXC_LP_ICache0PowerUp (void);
494 
498 void MXC_LP_ICacheXIPShutdown (void);
499 
503 void MXC_LP_ICacheXIPPowerUp (void);
504 
508 void MXC_LP_SRCCShutdown (void);
509 
513 void MXC_LP_SRCCPowerUp (void);
514 
518 void MXC_LP_USBFIFOShutdown (void);
519 
523 void MXC_LP_USBFIFOPowerUp (void);
524 
528 void MXC_LP_ROMShutdown (void);
529 
533 void MXC_LP_ROMPowerUp (void);
534 
537 #ifdef __cplusplus
538 }
539 #endif
540 
541 #endif /* _LP_H_ */
MXC_LP_ICache0LightSleepEnable
void MXC_LP_ICache0LightSleepEnable(void)
Enable Icache 0 in light sleep.
MXC_LP_SRCCLightSleepDisable
void MXC_LP_SRCCLightSleepDisable(void)
Disable System Cache in light sleep.
MXC_LP_DisableUSBWakeup
void MXC_LP_DisableUSBWakeup(void)
Disables the USB from waking up the device.
MXC_LP_SysRam0LightSleepDisable
void MXC_LP_SysRam0LightSleepDisable(void)
Disable System Ram 0 in light sleep.
MXC_LP_ICacheXIPLightSleepEnable
void MXC_LP_ICacheXIPLightSleepEnable(void)
Enable Icache XIP in light sleep.
MXC_LP_EnableTimerWakeup
void MXC_LP_EnableTimerWakeup(mxc_tmr_regs_t *tmr)
Enables Timer to wakeup from any low power mode.
MXC_LP_DisableGPIOWakeup
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...
MXC_LP_ICacheXIPPowerUp
void MXC_LP_ICacheXIPPowerUp(void)
PowerUp Internal Cache XIP.
MXC_LP_EnterDeepSleepMode
void MXC_LP_EnterDeepSleepMode(void)
Places the device into DEEPSLEEP mode. This function returns once an RTC or external interrupt occur.
MXC_LP_NFCOscBypassIsEnabled
int MXC_LP_NFCOscBypassIsEnabled(void)
Is NFC Oscilator Bypass Enabled.
MXC_LP_SRCCShutdown
void MXC_LP_SRCCShutdown(void)
Shutdown SRCC.
MXC_LP_SysRam4PowerUp
void MXC_LP_SysRam4PowerUp(void)
PowerUp System Ram 4.
MXC_LP_SysRam3LightSleepEnable
void MXC_LP_SysRam3LightSleepEnable(void)
Enable System Ram 3 in light sleep.
MXC_LP_ICacheXIPShutdown
void MXC_LP_ICacheXIPShutdown(void)
Shutdown Internal Cache XIP.
MXC_LP_ICache0PowerUp
void MXC_LP_ICache0PowerUp(void)
PowerUp Internal Cache.
MXC_LP_ICacheXIPLightSleepDisable
void MXC_LP_ICacheXIPLightSleepDisable(void)
Disable Icache XIP in light sleep.
MXC_LP_PORVCOREoreMonitorIsEnabled
int MXC_LP_PORVCOREoreMonitorIsEnabled(void)
Is Power on Reset VDD Core Monitor enabled.
MXC_LP_BandgapOn
void MXC_LP_BandgapOn(void)
Turn bandgap on.
MXC_LP_LDOEnable
void MXC_LP_LDOEnable(void)
Enable LDO.
MXC_LP_FastWakeupEnable
void MXC_LP_FastWakeupEnable(void)
Enable Fast wakeup.
MXC_LP_EnterBackupMode
void MXC_LP_EnterBackupMode(void)
Places the device into BACKUP mode. CPU state is not maintained in this mode, so this function never ...
MXC_LP_SysRam2LightSleepEnable
void MXC_LP_SysRam2LightSleepEnable(void)
Enable System Ram 2 in light sleep.
MXC_LP_EnterShutDownMode
void MXC_LP_EnterShutDownMode(void)
Places the device into Shutdown mode. CPU state is not maintained in this mode, so this function neve...
MXC_LP_SysRam2Shutdown
void MXC_LP_SysRam2Shutdown(void)
Shutdown System Ram 2.
MXC_LP_SysRam0Shutdown
void MXC_LP_SysRam0Shutdown(void)
Shutdown System Ram 0.
MXC_LP_ROMLightSleepDisable
void MXC_LP_ROMLightSleepDisable(void)
Disable ROM 0 in light sleep.
MXC_LP_EnterStorageMode
void MXC_LP_EnterStorageMode(void)
Places the device into Storage mode. CPU state is not maintained in this mode, so this function never...
MXC_F_GCR_PM_IBRO_PD
#define MXC_F_GCR_PM_IBRO_PD
Definition: gcr_regs.h:367
MXC_LP_ClearWakeStatus
void MXC_LP_ClearWakeStatus(void)
clear all wake up status
MXC_LP_PORVCOREoreMonitorDisable
void MXC_LP_PORVCOREoreMonitorDisable(void)
Disable Power on Reset VDD Core Monitor.
MXC_LP_FastWakeupIsEnabled
int MXC_LP_FastWakeupIsEnabled(void)
Is Fast wake up is Enabled.
MXC_LP_EnableGPIOWakeup
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....
MXC_LP_SysRam1Shutdown
void MXC_LP_SysRam1Shutdown(void)
Shutdown System Ram 1.
mxc_lp_ovr_t
mxc_lp_ovr_t
Enumeration type for voltage selection.
Definition: lp.h:65
MXC_LP_PORVCOREoreMonitorEnable
void MXC_LP_PORVCOREoreMonitorEnable(void)
Enable Power on Reset VDD Core Monitor.
MXC_LP_CryptoLightSleepEnable
void MXC_LP_CryptoLightSleepEnable(void)
Enable Crypto in light sleep.
MXC_LP_EnterSleepMode
void MXC_LP_EnterSleepMode(void)
Places the device into SLEEP mode. This function returns once an RTC or external interrupt occur.
MXC_LP_NFCOscBypassEnable
void MXC_LP_NFCOscBypassEnable(void)
Enable NFC Oscilator Bypass.
MXC_LP_DisableHA0Wakeup
void MXC_LP_DisableHA0Wakeup(void)
Disables the HA)0 from waking up the device.
mxc_lp_cfg_ds_pd_t
mxc_lp_cfg_ds_pd_t
Enumeration type for PM Mode.
Definition: lp.h:75
MXC_LP_DisableHA1Wakeup
void MXC_LP_DisableHA1Wakeup(void)
Disables the HA1 from waking up the device.
MXC_LP_EnableRTCAlarmWakeup
void MXC_LP_EnableRTCAlarmWakeup(void)
Enables the RTC alarm to wake up the device from any low power mode.
MXC_LP_EnableHA0Wakeup
void MXC_LP_EnableHA0Wakeup(void)
Enables the HA0 to wake up the device from any low power mode.
MXC_LP_ICache0Shutdown
void MXC_LP_ICache0Shutdown(void)
Shutdown Internal Cache.
MXC_LP_SysRam1LightSleepDisable
void MXC_LP_SysRam1LightSleepDisable(void)
Disable System Ram 1 in light sleep.
MXC_LP_USBFIFOShutdown
void MXC_LP_USBFIFOShutdown(void)
Shutdown USB FIFO.
MXC_LP_SysRam4LightSleepEnable
void MXC_LP_SysRam4LightSleepEnable(void)
Enable System Ram 4 in light sleep.
MXC_LP_SysRam1PowerUp
void MXC_LP_SysRam1PowerUp(void)
PowerUp System Ram 1.
MXC_LP_RetentionRegDisable
void MXC_LP_RetentionRegDisable(void)
Disable retention regulator.
MXC_LP_NFCOscBypassDisable
void MXC_LP_NFCOscBypassDisable(void)
Disable NFC Oscilator Bypass.
MXC_LP_SysRam2LightSleepDisable
void MXC_LP_SysRam2LightSleepDisable(void)
Disable System Ram 2 in light sleep.
MXC_LP_SysRam5LightSleepDisable
void MXC_LP_SysRam5LightSleepDisable(void)
Disable System Ram 5 in light sleep.
MXC_LP_SysRam2PowerUp
void MXC_LP_SysRam2PowerUp(void)
PowerUp System Ram 2.
MXC_LP_SRCCLightSleepEnable
void MXC_LP_SRCCLightSleepEnable(void)
Enable System Cache in light sleep.
MXC_LP_RetentionRegIsEnabled
int MXC_LP_RetentionRegIsEnabled(void)
Is the retention regulator enabled.
MXC_LP_BandgapIsOn
int MXC_LP_BandgapIsOn(void)
Is the bandgap on or off.
MXC_LP_SetOVR
void MXC_LP_SetOVR(mxc_lp_ovr_t ovr)
Set ovr bits to set the voltage the micro will run at.
MXC_LP_SysRam5PowerUp
void MXC_LP_SysRam5PowerUp(void)
PowerUp System Ram 5.
MXC_LP_SysRam3LightSleepDisable
void MXC_LP_SysRam3LightSleepDisable(void)
Disable System Ram 3 in light sleep.
MXC_LP_ROMPowerUp
void MXC_LP_ROMPowerUp(void)
PowerUp ROM.
MXC_LP_ROMLightSleepEnable
void MXC_LP_ROMLightSleepEnable(void)
Enable ROM 0 in light sleep.
MXC_LP_SysRam1LightSleepEnable
void MXC_LP_SysRam1LightSleepEnable(void)
Enable System Ram 1 in light sleep.
MXC_LP_DisableRTCAlarmWakeup
void MXC_LP_DisableRTCAlarmWakeup(void)
Disables the RTC alarm from waking up the device.
MXC_LP_USBFIFOLightSleepEnable
void MXC_LP_USBFIFOLightSleepEnable(void)
Enable USB in light sleep.
MXC_LP_SysRam0PowerUp
void MXC_LP_SysRam0PowerUp(void)
Wakeup System Ram 0.
MXC_LP_LDODisable
void MXC_LP_LDODisable(void)
Disable LDO.
MXC_F_GCR_PM_IPO_PD
#define MXC_F_GCR_PM_IPO_PD
Definition: gcr_regs.h:364
MXC_LP_SRCCPowerUp
void MXC_LP_SRCCPowerUp(void)
PowerUp SRCC.
mxc_gpio_cfg_t
Structure type for configuring a GPIO port.
Definition: gpio.h:160
MXC_LP_BandgapOff
void MXC_LP_BandgapOff(void)
Turn bandgap off.
MXC_LP_FastWakeupDisable
void MXC_LP_FastWakeupDisable(void)
Disable Fast wakeup.
MXC_LP_USBFIFOPowerUp
void MXC_LP_USBFIFOPowerUp(void)
PowerUp USB FIFO.
MXC_LP_SysRam0LightSleepEnable
void MXC_LP_SysRam0LightSleepEnable(void)
Enable System Ram 0 in light sleep.
MXC_LP_EnableUSBWakeup
void MXC_LP_EnableUSBWakeup(void)
Enables the USB to wake up the device from any low power mode.
MXC_LP_ICache0LightSleepDisable
void MXC_LP_ICache0LightSleepDisable(void)
Disable Icache 0 in light sleep.
MXC_LP_USBFIFOLightSleepDisable
void MXC_LP_USBFIFOLightSleepDisable(void)
Disable USB in light sleep.
MXC_LP_CryptoLightSleepDisable
void MXC_LP_CryptoLightSleepDisable(void)
Disable Crypto in light sleep.
MXC_LP_SysRam5Shutdown
void MXC_LP_SysRam5Shutdown(void)
Shutdown System Ram 5.
mxc_tmr_regs_t
Definition: tmr_regs.h:88
MXC_LP_SysRam3PowerUp
void MXC_LP_SysRam3PowerUp(void)
PowerUp System Ram 3.
MXC_LP_SysRam5LightSleepEnable
void MXC_LP_SysRam5LightSleepEnable(void)
Enable System Ram 5 in light sleep.
MXC_LP_LDOIsEnabled
int MXC_LP_LDOIsEnabled(void)
Is LDO enabled.
MXC_LP_EnableHA1Wakeup
void MXC_LP_EnableHA1Wakeup(void)
Enables the HA1 to wake up the device from any low power mode.
MXC_LP_ConfigDeepSleepClocks
int MXC_LP_ConfigDeepSleepClocks(uint32_t mask)
Configure which clocks are powered down at deep sleep and which are not affected.
MXC_LP_SysRam3Shutdown
void MXC_LP_SysRam3Shutdown(void)
Shutdown System Ram 3.
MXC_LP_ROMShutdown
void MXC_LP_ROMShutdown(void)
Shutdown ROM.
MXC_LP_SysRam4LightSleepDisable
void MXC_LP_SysRam4LightSleepDisable(void)
Disable System Ram 4 in light sleep.
MXC_LP_SysRam4Shutdown
void MXC_LP_SysRam4Shutdown(void)
Shutdown System Ram 4.
MXC_F_GCR_PM_ERFO_PD
#define MXC_F_GCR_PM_ERFO_PD
Definition: gcr_regs.h:361
MXC_LP_RetentionRegEnable
void MXC_LP_RetentionRegEnable(void)
Enable retention regulator.
MXC_LP_DisableTimerWakeup
void MXC_LP_DisableTimerWakeup(mxc_tmr_regs_t *tmr)
Disables Timer from waking up device.