MSP430 DriverLib for MSP430FR5xx_6xx Devices  2.21.00.08
 All Data Structures Functions Variables Modules Pages
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 low power reset. SVSH does not reset device, but
48 //! triggers a system NMI
49 //!
50 //!
51 //! Modified bits of \b PMMCTL0 register.
52 //!
53 //! \return None
54 //
55 //*****************************************************************************
56 extern void PMM_enableLowPowerReset(void);
57 
58 //*****************************************************************************
59 //
60 //! \brief Disables the low power reset. SVSH resets device.
61 //!
62 //!
63 //! Modified bits of \b PMMCTL0 register.
64 //!
65 //! \return None
66 //
67 //*****************************************************************************
68 extern void PMM_disableLowPowerReset(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_LPM5_INTERRUPT - LPM5 indication
155 //! - \b PMM_ALL - All interrupts
156 //!
157 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIFG register.
158 //!
159 //! \return None
160 //
161 //*****************************************************************************
162 extern void PMM_clearInterrupt(uint16_t mask);
163 
164 //*****************************************************************************
165 //
166 //! \brief Returns interrupt status
167 //!
168 //! \param mask is the mask for specifying the required flag
169 //! Mask value is the logical OR of any of the following:
170 //! - \b PMM_BOR_INTERRUPT - Software BOR interrupt
171 //! - \b PMM_RST_INTERRUPT - RESET pin interrupt
172 //! - \b PMM_POR_INTERRUPT - Software POR interrupt
173 //! - \b PMM_SVSH_INTERRUPT - SVS high side interrupt
174 //! - \b PMM_LPM5_INTERRUPT - LPM5 indication
175 //! - \b PMM_ALL - All interrupts
176 //!
177 //! \return Logical OR of any of the following:
178 //! - \b PMM_BOR_INTERRUPT Software BOR interrupt
179 //! - \b PMM_RST_INTERRUPT RESET pin interrupt
180 //! - \b PMM_POR_INTERRUPT Software POR interrupt
181 //! - \b PMM_SVSH_INTERRUPT SVS high side interrupt
182 //! - \b PMM_LPM5_INTERRUPT LPM5 indication
183 //! - \b PMM_ALL All interrupts
184 //! \n indicating the status of the selected interrupt flags
185 //
186 //*****************************************************************************
187 extern uint16_t PMM_getInterruptStatus(uint16_t mask);
188 
189 //*****************************************************************************
190 //
191 //! \brief Unlock LPM5
192 //!
193 //! LPMx.5 configuration is not locked and defaults to its reset condition.
194 //! Disable the GPIO power-on default high-impedance mode to activate
195 //! previously configured port settings.
196 //!
197 //!
198 //! \return None
199 //
200 //*****************************************************************************
201 extern void PMM_unlockLPM5(void);
202 
203 //*****************************************************************************
204 //
205 // Mark the end of the C bindings section for C++ compilers.
206 //
207 //*****************************************************************************
208 #ifdef __cplusplus
209 }
210 #endif
211 
212 #endif
213 #endif // __MSP430WARE_PMM_H__
void PMM_clearInterrupt(uint16_t mask)
Clears interrupt flags for the PMM.
Definition: pmm.c:77
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_enableLowPowerReset(void)
Enables the low power reset. SVSH does not reset device, but triggers a system NMI.
Definition: pmm.c:21
void PMM_disableLowPowerReset(void)
Disables the low power reset. SVSH resets device.
Definition: pmm.c:28

Copyright 2015, Texas Instruments Incorporated