MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.91.13.01
pmm.h
1 //*****************************************************************************
2 //
3 // pmm.h - Driver for the PMM Module.
4 //
5 //*****************************************************************************
6 
7 #ifndef __MSP430WARE_PMM_H__
8 #define __MSP430WARE_PMM_H__
9 
10 #include "inc/hw_memmap.h"
11 
12 #ifdef __MSP430_HAS_PMM_FRAM__
13 
14 //*****************************************************************************
15 //
16 // If building with a C++ compiler, make all of the definitions in this header
17 // have a C binding.
18 //
19 //*****************************************************************************
20 #ifdef __cplusplus
21 extern "C"
22 {
23 #endif
24 
25 //*****************************************************************************
26 //
27 // The following are values that can be passed to the mask parameter for
28 // functions: PMM_clearInterrupt(), and PMM_getInterruptStatus() as well as
29 // returned by the PMM_getInterruptStatus() function.
30 //
31 //*****************************************************************************
32 #define PMM_BOR_INTERRUPT PMMBORIFG
33 #define PMM_RST_INTERRUPT PMMRSTIFG
34 #define PMM_POR_INTERRUPT PMMPORIFG
35 #define PMM_SVSH_INTERRUPT SVSHIFG
36 #define PMM_LPM5_INTERRUPT PMMLPM5IFG
37 #define PMM_ALL (0xA7)
38 
39 //*****************************************************************************
40 //
41 // Prototypes for the APIs.
42 //
43 //*****************************************************************************
44 
45 //*****************************************************************************
46 //
47 //! \brief Enables the high-side SVS circuitry
48 //!
49 //!
50 //! Modified bits of \b PMMCTL0 register.
51 //!
52 //! \return None
53 //
54 //*****************************************************************************
55 extern void PMM_enableSVSH(void);
56 
57 //*****************************************************************************
58 //
59 //! \brief Disables the high-side SVS circuitry
60 //!
61 //!
62 //! Modified bits of \b PMMCTL0 register.
63 //!
64 //! \return None
65 //
66 //*****************************************************************************
67 extern void PMM_disableSVSH(void);
68 
69 //*****************************************************************************
70 //
71 //! \brief Makes the low-dropout voltage regulator (LDO) remain ON when going
72 //! into LPM 3/4.
73 //!
74 //!
75 //! Modified bits of \b PMMCTL0 register.
76 //!
77 //! \return None
78 //
79 //*****************************************************************************
80 extern void PMM_turnOnRegulator(void);
81 
82 //*****************************************************************************
83 //
84 //! \brief Turns OFF the low-dropout voltage regulator (LDO) when going into
85 //! LPM3/4, thus the system will enter LPM3.5 or LPM4.5 respectively
86 //!
87 //!
88 //! Modified bits of \b PMMCTL0 register.
89 //!
90 //! \return None
91 //
92 //*****************************************************************************
93 extern void PMM_turnOffRegulator(void);
94 
95 //*****************************************************************************
96 //
97 //! \brief Calling this function will trigger a software Power On Reset (POR).
98 //!
99 //!
100 //! Modified bits of \b PMMCTL0 register.
101 //!
102 //! \return None
103 //
104 //*****************************************************************************
105 extern void PMM_trigPOR(void);
106 
107 //*****************************************************************************
108 //
109 //! \brief Calling this function will trigger a software Brown Out Rest (BOR).
110 //!
111 //!
112 //! Modified bits of \b PMMCTL0 register.
113 //!
114 //! \return None
115 //
116 //*****************************************************************************
117 extern void PMM_trigBOR(void);
118 
119 //*****************************************************************************
120 //
121 //! \brief Clears interrupt flags for the PMM
122 //!
123 //! \param mask is the mask for specifying the required flag
124 //! Mask value is the logical OR of any of the following:
125 //! - \b PMM_BOR_INTERRUPT - Software BOR interrupt
126 //! - \b PMM_RST_INTERRUPT - RESET pin interrupt
127 //! - \b PMM_POR_INTERRUPT - Software POR interrupt
128 //! - \b PMM_SVSH_INTERRUPT - SVS high side interrupt
129 //! - \b PMM_LPM5_INTERRUPT - LPM5 indication
130 //! - \b PMM_ALL - All interrupts
131 //!
132 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIFG register.
133 //!
134 //! \return None
135 //
136 //*****************************************************************************
137 extern void PMM_clearInterrupt(uint16_t mask);
138 
139 //*****************************************************************************
140 //
141 //! \brief Returns interrupt status
142 //!
143 //! \param mask is the mask for specifying the required flag
144 //! Mask value is the logical OR of any of the following:
145 //! - \b PMM_BOR_INTERRUPT - Software BOR interrupt
146 //! - \b PMM_RST_INTERRUPT - RESET pin interrupt
147 //! - \b PMM_POR_INTERRUPT - Software POR interrupt
148 //! - \b PMM_SVSH_INTERRUPT - SVS high side interrupt
149 //! - \b PMM_LPM5_INTERRUPT - LPM5 indication
150 //! - \b PMM_ALL - All interrupts
151 //!
152 //! \return Logical OR of any of the following:
153 //! - \b PMM_BOR_INTERRUPT Software BOR interrupt
154 //! - \b PMM_RST_INTERRUPT RESET pin interrupt
155 //! - \b PMM_POR_INTERRUPT Software POR interrupt
156 //! - \b PMM_SVSH_INTERRUPT SVS high side interrupt
157 //! - \b PMM_LPM5_INTERRUPT LPM5 indication
158 //! - \b PMM_ALL All interrupts
159 //! \n indicating the status of the selected interrupt flags
160 //
161 //*****************************************************************************
162 extern uint16_t PMM_getInterruptStatus(uint16_t mask);
163 
164 //*****************************************************************************
165 //
166 //! \brief Unlock LPM5
167 //!
168 //! LPMx.5 configuration is not locked and defaults to its reset condition.
169 //! Disable the GPIO power-on default high-impedance mode to activate
170 //! previously configured port settings.
171 //!
172 //!
173 //! \return None
174 //
175 //*****************************************************************************
176 extern void PMM_unlockLPM5(void);
177 
178 //*****************************************************************************
179 //
180 // Mark the end of the C bindings section for C++ compilers.
181 //
182 //*****************************************************************************
183 #ifdef __cplusplus
184 }
185 #endif
186 
187 #endif
188 #endif // __MSP430WARE_PMM_H__
void PMM_clearInterrupt(uint16_t mask)
Clears interrupt flags for the PMM.
Definition: pmm.c:63
uint16_t PMM_getInterruptStatus(uint16_t mask)
Returns interrupt status.
Definition: pmm.c:70
void PMM_disableSVSH(void)
Disables the high-side SVS circuitry.
Definition: pmm.c:28
void PMM_enableSVSH(void)
Enables the high-side SVS circuitry.
Definition: pmm.c:21
void PMM_turnOnRegulator(void)
Makes the low-dropout voltage regulator (LDO) remain ON when going into LPM 3/4.
Definition: pmm.c:35
void PMM_trigBOR(void)
Calling this function will trigger a software Brown Out Rest (BOR).
Definition: pmm.c:56
void PMM_turnOffRegulator(void)
Turns OFF the low-dropout voltage regulator (LDO) when going into LPM3/4, thus the system will enter ...
Definition: pmm.c:42
void PMM_trigPOR(void)
Calling this function will trigger a software Power On Reset (POR).
Definition: pmm.c:49
void PMM_unlockLPM5(void)
Unlock LPM5.
Definition: pmm.c:75

Copyright 2020, Texas Instruments Incorporated