MAX32655 Peripheral Driver API
Peripheral Driver API for the MAX32655
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  * $Date: 2018-08-28 17:03:02 -0500 (Tue, 28 Aug 2018) $
38  * $Revision: 37424 $
39  *
40  *************************************************************************** */
41 
42 /* Define to prevent redundant inclusion */
43 #ifndef _LP_H_
44 #define _LP_H_
45 
46 /* **** Includes **** */
47 #include <stdint.h>
48 #include "pwrseq_regs.h"
49 #include "mcr_regs.h"
50 #include "gcr_regs.h"
51 #include "gpio.h"
52 #include "tmr.h"
53 
54 #ifdef __cplusplus
55 extern "C" {
56 #endif
57 
68 typedef enum {
69  MXC_LP_V0_9 = 0,
70  MXC_LP_V1_0,
71  MXC_LP_V1_1
72 } mxc_lp_ovr_t;
73 
78 typedef enum {
79  MXC_LP_IPO = MXC_F_GCR_PM_IPO_PD,
80  MXC_LP_IBRO = MXC_F_GCR_PM_IBRO_PD,
82 
86 void MXC_LP_EnterSleepMode (void);
87 
91 void MXC_LP_EnterDeepSleepMode (void);
92 
97 void MXC_LP_EnterBackupMode (void);
98 
103 void MXC_LP_EnterStorageMode (void);
104 
109 void MXC_LP_EnterShutDownMode (void);
110 
116 void MXC_LP_SetOVR (mxc_lp_ovr_t ovr);
117 
121 void MXC_LP_RetentionRegEnable (void);
122 
126 void MXC_LP_RetentionRegDisable (void);
127 
134 
138 void MXC_LP_BandgapOn (void);
139 
143 void MXC_LP_BandgapOff (void);
144 
150 int MXC_LP_BandgapIsOn (void);
151 
156 
161 
168 
172 void MXC_LP_LDOEnable (void);
173 
177 void MXC_LP_LDODisable (void);
178 
184 int MXC_LP_LDOIsEnabled (void);
185 
189 void MXC_LP_FastWakeupEnable (void);
190 
194 void MXC_LP_FastWakeupDisable (void);
195 
201 int MXC_LP_FastWakeupIsEnabled (void);
202 
206 void MXC_LP_ClearWakeStatus (void);
207 
217 
225 
229 void MXC_LP_EnableRTCAlarmWakeup (void);
230 
234 void MXC_LP_DisableRTCAlarmWakeup (void);
235 
242 
249 
253 void MXC_LP_EnableUSBWakeup (void);
254 
258 void MXC_LP_DisableUSBWakeup (void);
259 
263 void MXC_LP_EnableWUTAlarmWakeup (void);
264 
268 void MXC_LP_DisableWUTAlarmWakeup (void);
269 
273 void MXC_LP_EnableHA0Wakeup (void);
274 
278 void MXC_LP_DisableHA0Wakeup (void);
282 void MXC_LP_EnableHA1Wakeup (void);
283 
287 void MXC_LP_DisableHA1Wakeup (void);
288 
299 int MXC_LP_ConfigDeepSleepClocks (uint32_t mask);
300 
304 void MXC_LP_NFCOscBypassEnable (void);
305 
309 void MXC_LP_NFCOscBypassDisable (void);
310 
317 
322 
327 
332 
337 
342 
347 
352 
357 
361 void MXC_LP_SRCCLightSleepEnable (void);
362 
367 
372 
376 void MXC_LP_ROMLightSleepEnable (void);
377 
382 
387 
392 
397 
402 
407 
412 
417 
421 void MXC_LP_SRCCLightSleepDisable (void);
422 
427 
432 
436 void MXC_LP_ROMLightSleepDisable (void);
437 
441 void MXC_LP_SysRam0Shutdown (void);
442 
446 void MXC_LP_SysRam0PowerUp (void);
447 
451 void MXC_LP_SysRam1Shutdown (void);
452 
456 void MXC_LP_SysRam1PowerUp (void);
457 
461 void MXC_LP_SysRam2Shutdown (void);
462 
466 void MXC_LP_SysRam2PowerUp (void);
467 
471 void MXC_LP_SysRam3Shutdown (void);
472 
476 void MXC_LP_SysRam3PowerUp (void);
477 
481 void MXC_LP_SysRam4Shutdown (void);
482 
486 void MXC_LP_SysRam4PowerUp (void);
487 
491 void MXC_LP_SysRam5Shutdown (void);
492 
496 void MXC_LP_SysRam5PowerUp (void);
497 
501 void MXC_LP_ICache0Shutdown (void);
502 
506 void MXC_LP_ICache0PowerUp (void);
507 
511 void MXC_LP_ICacheXIPShutdown (void);
512 
516 void MXC_LP_ICacheXIPPowerUp (void);
517 
521 void MXC_LP_SRCCShutdown (void);
522 
526 void MXC_LP_SRCCPowerUp (void);
527 
531 void MXC_LP_USBFIFOShutdown (void);
532 
536 void MXC_LP_USBFIFOPowerUp (void);
537 
541 void MXC_LP_ROMShutdown (void);
542 
546 void MXC_LP_ROMPowerUp (void);
547 
548 
551 #ifdef __cplusplus
552 }
553 #endif
554 
555 #endif /* _LP_H_ */
void MXC_LP_DisableTimerWakeup(mxc_tmr_regs_t *tmr)
Disables Timer from waking up device.
Structure type for configuring a GPIO port.
Definition: gpio.h:155
void MXC_LP_SysRam3PowerUp(void)
PowerUp System Ram 3.
int MXC_LP_LDOIsEnabled(void)
Is LDO enabled.
void MXC_LP_SysRam0Shutdown(void)
Shutdown System Ram 0.
void MXC_LP_SysRam4LightSleepEnable(void)
Enable System Ram 4 in light sleep.
void MXC_LP_EnterStorageMode(void)
Places the device into Storage mode. CPU state is not maintained in this mode, so this function never...
void MXC_LP_ClearWakeStatus(void)
clear all wake up status
void MXC_LP_PORVCOREoreMonitorDisable(void)
Disable Power on Reset VDD Core Monitor.
void MXC_LP_ICacheXIPPowerUp(void)
PowerUp Internal Cache XIP.
int MXC_LP_RetentionRegIsEnabled(void)
Is the retention regulator enabled.
void MXC_LP_SysRam4LightSleepDisable(void)
Disable System Ram 4 in light sleep.
mxc_lp_ovr_t
Enumeration type for voltage selection.
Definition: lp.h:68
void MXC_LP_EnterDeepSleepMode(void)
Places the device into DEEPSLEEP mode. This function returns once an RTC or external interrupt occur...
void MXC_LP_EnableWUTAlarmWakeup(void)
Enables the WUT alarm to wake up the device from any low power mode.
void MXC_LP_EnableHA0Wakeup(void)
Enables the HA0 to wake up the device from any low power mode.
void MXC_LP_EnterShutDownMode(void)
Places the device into Shutdown mode. CPU state is not maintained in this mode, so this function neve...
void MXC_LP_USBFIFOLightSleepEnable(void)
Enable USB in light sleep.
void MXC_LP_LDOEnable(void)
Enable LDO.
void MXC_LP_NFCOscBypassEnable(void)
Enable NFC Oscilator Bypass.
void MXC_LP_SysRam0LightSleepDisable(void)
Disable System Ram 0 in light sleep.
void MXC_LP_DisableHA1Wakeup(void)
Disables the HA1 from waking up the device.
#define MXC_F_GCR_PM_IBRO_PD
Definition: gcr_regs.h:370
int MXC_LP_NFCOscBypassIsEnabled(void)
Is NFC Oscilator Bypass Enabled.
void MXC_LP_RetentionRegDisable(void)
Disable retention regulator.
int MXC_LP_FastWakeupIsEnabled(void)
Is Fast wake up is Enabled.
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_ICacheXIPShutdown(void)
Shutdown Internal Cache XIP.
void MXC_LP_SysRam1Shutdown(void)
Shutdown System Ram 1.
void MXC_LP_PORVCOREoreMonitorEnable(void)
Enable Power on Reset VDD Core Monitor.
void MXC_LP_NFCOscBypassDisable(void)
Disable NFC Oscilator Bypass.
void MXC_LP_USBFIFOLightSleepDisable(void)
Disable USB in light sleep.
void MXC_LP_DisableHA0Wakeup(void)
Disables the HA)0 from waking up the device.
int MXC_LP_BandgapIsOn(void)
Is the bandgap on or off.
void MXC_LP_DisableRTCAlarmWakeup(void)
Disables the RTC alarm from waking up the device.
void MXC_LP_SysRam4PowerUp(void)
PowerUp System Ram 4.
void MXC_LP_SysRam3LightSleepDisable(void)
Disable System Ram 3 in light sleep.
int MXC_LP_PORVCOREoreMonitorIsEnabled(void)
Is Power on Reset VDD Core Monitor enabled.
int MXC_LP_ConfigDeepSleepClocks(uint32_t mask)
Configure which clocks are powered down at deep sleep and which are not affected. ...
void MXC_LP_EnterBackupMode(void)
Places the device into BACKUP mode. CPU state is not maintained in this mode, so this function never ...
void MXC_LP_SysRam1LightSleepEnable(void)
Enable System Ram 1 in light sleep.
void MXC_LP_ICache0LightSleepEnable(void)
Enable Icache 0 in light sleep.
void MXC_LP_SRCCLightSleepDisable(void)
Disable System Cache in light sleep.
void MXC_LP_USBFIFOShutdown(void)
Shutdown USB FIFO.
void MXC_LP_USBFIFOPowerUp(void)
PowerUp USB FIFO.
void MXC_LP_SysRam0PowerUp(void)
Wakeup System Ram 0.
void MXC_LP_RetentionRegEnable(void)
Enable retention regulator.
void MXC_LP_EnableTimerWakeup(mxc_tmr_regs_t *tmr)
Enables Timer to wakeup from any low power mode.
void MXC_LP_SysRam2PowerUp(void)
PowerUp System Ram 2.
void MXC_LP_SRCCLightSleepEnable(void)
Enable System Cache in light sleep.
void MXC_LP_DisableUSBWakeup(void)
Disables the USB from waking up the device.
void MXC_LP_SysRam3LightSleepEnable(void)
Enable System Ram 3 in light sleep.
void MXC_LP_SysRam0LightSleepEnable(void)
Enable System Ram 0 in light sleep.
void MXC_LP_ICache0PowerUp(void)
PowerUp Internal Cache.
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_EnterSleepMode(void)
Places the device into SLEEP mode. This function returns once an RTC or external interrupt occur...
void MXC_LP_FastWakeupEnable(void)
Enable Fast wakeup.
void MXC_LP_ROMLightSleepEnable(void)
Enable ROM 0 in light sleep.
void MXC_LP_LDODisable(void)
Disable LDO.
#define MXC_F_GCR_PM_IPO_PD
Definition: gcr_regs.h:367
void MXC_LP_SysRam2LightSleepEnable(void)
Enable System Ram 2 in light sleep.
void MXC_LP_SysRam1PowerUp(void)
PowerUp System Ram 1.
void MXC_LP_DisableWUTAlarmWakeup(void)
Disables the WUT alarm from waking up the device.
void MXC_LP_ICache0Shutdown(void)
Shutdown Internal Cache.
void MXC_LP_EnableHA1Wakeup(void)
Enables the HA1 to wake up the device from any low power mode.
void MXC_LP_ICacheXIPLightSleepDisable(void)
Disable Icache XIP in light sleep.
void MXC_LP_SRCCPowerUp(void)
PowerUp SRCC.
void MXC_LP_BandgapOn(void)
Turn bandgap on.
void MXC_LP_SetOVR(mxc_lp_ovr_t ovr)
Set ovr bits to set the voltage the micro will run at.
void MXC_LP_ROMShutdown(void)
Shutdown ROM.
void MXC_LP_SysRam4Shutdown(void)
Shutdown System Ram 4.
void MXC_LP_SysRam2LightSleepDisable(void)
Disable System Ram 2 in light sleep.
void MXC_LP_EnableUSBWakeup(void)
Enables the USB to wake up the device from any low power mode.
void MXC_LP_ICacheXIPLightSleepEnable(void)
Enable Icache XIP in light sleep.
void MXC_LP_CryptoLightSleepDisable(void)
Disable Crypto in light sleep.
void MXC_LP_SysRam5Shutdown(void)
Shutdown System Ram 5.
void MXC_LP_CryptoLightSleepEnable(void)
Enable Crypto in light sleep.
void MXC_LP_SysRam5PowerUp(void)
PowerUp System Ram 5.
mxc_lp_cfg_ds_pd_t
Enumeration type for PM Mode.
Definition: lp.h:78
void MXC_LP_EnableRTCAlarmWakeup(void)
Enables the RTC alarm to wake up the device from any low power mode.
void MXC_LP_SysRam5LightSleepEnable(void)
Enable System Ram 5 in light sleep.
void MXC_LP_ROMPowerUp(void)
PowerUp ROM.
void MXC_LP_FastWakeupDisable(void)
Disable Fast wakeup.
void MXC_LP_SysRam3Shutdown(void)
Shutdown System Ram 3.
void MXC_LP_SRCCShutdown(void)
Shutdown SRCC.
void MXC_LP_BandgapOff(void)
Turn bandgap off.
void MXC_LP_ICache0LightSleepDisable(void)
Disable Icache 0 in light sleep.
void MXC_LP_SysRam2Shutdown(void)
Shutdown System Ram 2.
Definition: tmr_regs.h:88
void MXC_LP_ROMLightSleepDisable(void)
Disable ROM 0 in light sleep.
void MXC_LP_SysRam5LightSleepDisable(void)
Disable System Ram 5 in light sleep.
void MXC_LP_SysRam1LightSleepDisable(void)
Disable System Ram 1 in light sleep.