MSP430 DriverLib for MSP430FR57xx 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_FR5xx__
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_SVSL_INTERRUPT SVSLIFG
37 #define PMM_LPM5_INTERRUPT PMMLPM5IFG
38 #define PMM_ALL (0xB7)
39 
40 //*****************************************************************************
41 //
42 // Prototypes for the APIs.
43 //
44 //*****************************************************************************
45 
46 //*****************************************************************************
47 //
48 //! \brief Enables the low-side SVS circuitry
49 //!
50 //!
51 //! Modified bits of \b PMMCTL0 register.
52 //!
53 //! \return None
54 //
55 //*****************************************************************************
56 extern void PMM_enableSVSL(void);
57 
58 //*****************************************************************************
59 //
60 //! \brief Disables the low-side SVS circuitry
61 //!
62 //!
63 //! Modified bits of \b PMMCTL0 register.
64 //!
65 //! \return None
66 //
67 //*****************************************************************************
68 extern void PMM_disableSVSL(void);
69 
70 //*****************************************************************************
71 //
72 //! \brief Enables the high-side SVS circuitry
73 //!
74 //!
75 //! Modified bits of \b PMMCTL0 register.
76 //!
77 //! \return None
78 //
79 //*****************************************************************************
80 extern void PMM_enableSVSH(void);
81 
82 //*****************************************************************************
83 //
84 //! \brief Disables the high-side SVS circuitry
85 //!
86 //!
87 //! Modified bits of \b PMMCTL0 register.
88 //!
89 //! \return None
90 //
91 //*****************************************************************************
92 extern void PMM_disableSVSH(void);
93 
94 //*****************************************************************************
95 //
96 //! \brief Makes the low-dropout voltage regulator (LDO) remain ON when going
97 //! into LPM 3/4.
98 //!
99 //!
100 //! Modified bits of \b PMMCTL0 register.
101 //!
102 //! \return None
103 //
104 //*****************************************************************************
105 extern void PMM_turnOnRegulator(void);
106 
107 //*****************************************************************************
108 //
109 //! \brief Turns OFF the low-dropout voltage regulator (LDO) when going into
110 //! LPM3/4, thus the system will enter LPM3.5 or LPM4.5 respectively
111 //!
112 //!
113 //! Modified bits of \b PMMCTL0 register.
114 //!
115 //! \return None
116 //
117 //*****************************************************************************
118 extern void PMM_turnOffRegulator(void);
119 
120 //*****************************************************************************
121 //
122 //! \brief Calling this function will trigger a software Power On Reset (POR).
123 //!
124 //!
125 //! Modified bits of \b PMMCTL0 register.
126 //!
127 //! \return None
128 //
129 //*****************************************************************************
130 extern void PMM_trigPOR(void);
131 
132 //*****************************************************************************
133 //
134 //! \brief Calling this function will trigger a software Brown Out Rest (BOR).
135 //!
136 //!
137 //! Modified bits of \b PMMCTL0 register.
138 //!
139 //! \return None
140 //
141 //*****************************************************************************
142 extern void PMM_trigBOR(void);
143 
144 //*****************************************************************************
145 //
146 //! \brief Clears interrupt flags for the PMM
147 //!
148 //! \param mask is the mask for specifying the required flag
149 //! Mask value is the logical OR of any of the following:
150 //! - \b PMM_BOR_INTERRUPT - Software BOR interrupt
151 //! - \b PMM_RST_INTERRUPT - RESET pin interrupt
152 //! - \b PMM_POR_INTERRUPT - Software POR interrupt
153 //! - \b PMM_SVSH_INTERRUPT - SVS high side interrupt
154 //! - \b PMM_SVSL_INTERRUPT - SVS low side interrupt, not available for
155 //! FR58xx/59xx
156 //! - \b PMM_LPM5_INTERRUPT - LPM5 indication
157 //! - \b PMM_ALL - All interrupts
158 //!
159 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIFG register.
160 //!
161 //! \return None
162 //
163 //*****************************************************************************
164 extern void PMM_clearInterrupt(uint16_t mask);
165 
166 //*****************************************************************************
167 //
168 //! \brief Returns interrupt status
169 //!
170 //! \param mask is the mask for specifying the required flag
171 //! Mask value is the logical OR of any of the following:
172 //! - \b PMM_BOR_INTERRUPT - Software BOR interrupt
173 //! - \b PMM_RST_INTERRUPT - RESET pin interrupt
174 //! - \b PMM_POR_INTERRUPT - Software POR interrupt
175 //! - \b PMM_SVSH_INTERRUPT - SVS high side interrupt
176 //! - \b PMM_SVSL_INTERRUPT - SVS low side interrupt, not available for
177 //! FR58xx/59xx
178 //! - \b PMM_LPM5_INTERRUPT - LPM5 indication
179 //! - \b PMM_ALL - All interrupts
180 //!
181 //! \return Logical OR of any of the following:
182 //! - \b PMM_BOR_INTERRUPT Software BOR interrupt
183 //! - \b PMM_RST_INTERRUPT RESET pin interrupt
184 //! - \b PMM_POR_INTERRUPT Software POR interrupt
185 //! - \b PMM_SVSH_INTERRUPT SVS high side interrupt
186 //! - \b PMM_SVSL_INTERRUPT SVS low side interrupt, not available for
187 //! FR58xx/59xx
188 //! - \b PMM_LPM5_INTERRUPT LPM5 indication
189 //! - \b PMM_ALL All interrupts
190 //! \n indicating the status of the selected interrupt flags
191 //
192 //*****************************************************************************
193 extern uint16_t PMM_getInterruptStatus(uint16_t mask);
194 
195 //*****************************************************************************
196 //
197 //! \brief Unlock LPM5
198 //!
199 //! LPMx.5 configuration is not locked and defaults to its reset condition.
200 //! Disable the GPIO power-on default high-impedance mode to activate
201 //! previously configured port settings.
202 //!
203 //!
204 //! \return None
205 //
206 //*****************************************************************************
207 extern void PMM_unlockLPM5(void);
208 
209 //*****************************************************************************
210 //
211 // Mark the end of the C bindings section for C++ compilers.
212 //
213 //*****************************************************************************
214 #ifdef __cplusplus
215 }
216 #endif
217 
218 #endif
219 #endif // __MSP430WARE_PMM_H__
void PMM_clearInterrupt(uint16_t mask)
Clears interrupt flags for the PMM.
Definition: pmm.c:77
void PMM_disableSVSL(void)
Disables the low-side SVS circuitry.
Definition: pmm.c:28
uint16_t PMM_getInterruptStatus(uint16_t mask)
Returns interrupt status.
Definition: pmm.c:84
void PMM_disableSVSH(void)
Disables the high-side SVS circuitry.
Definition: pmm.c:42
void PMM_enableSVSH(void)
Enables the high-side SVS circuitry.
Definition: pmm.c:35
void PMM_turnOnRegulator(void)
Makes the low-dropout voltage regulator (LDO) remain ON when going into LPM 3/4.
Definition: pmm.c:49
void PMM_trigBOR(void)
Calling this function will trigger a software Brown Out Rest (BOR).
Definition: pmm.c:70
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:56
void PMM_trigPOR(void)
Calling this function will trigger a software Power On Reset (POR).
Definition: pmm.c:63
void PMM_unlockLPM5(void)
Unlock LPM5.
Definition: pmm.c:89
void PMM_enableSVSL(void)
Enables the low-side SVS circuitry.
Definition: pmm.c:21

Copyright 2020, Texas Instruments Incorporated