MSP430 DriverLib for MSP430F5xx_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__
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 level parameter for
28 // functions: PMM_setVCoreUp(), PMM_setVCoreDown(), and PMM_setVCore().
29 //
30 //*****************************************************************************
31 #define PMM_CORE_LEVEL_0 PMMCOREV_0
32 #define PMM_CORE_LEVEL_1 PMMCOREV_1
33 #define PMM_CORE_LEVEL_2 PMMCOREV_2
34 #define PMM_CORE_LEVEL_3 PMMCOREV_3
35 
36 //*****************************************************************************
37 //
38 // The following are values that can be passed to the mask parameter for
39 // functions: PMM_getInterruptStatus() as well as returned by the
40 // PMM_getInterruptStatus() function.
41 //
42 //*****************************************************************************
43 #define PMM_SVSMLDLYIFG SVSMLDLYIFG
44 #define PMM_SVMLIFG SVMLIFG
45 #define PMM_SVMLVLRIFG SVMLVLRIFG
46 #define PMM_SVSMHDLYIFG SVSMHDLYIFG
47 #define PMM_SVMHIFG SVMHIFG
48 #define PMM_SVMHVLRIFG SVMHVLRIFG
49 #define PMM_PMMBORIFG PMMBORIFG
50 #define PMM_PMMRSTIFG PMMRSTIFG
51 #define PMM_PMMPORIFG PMMPORIFG
52 #define PMM_SVSHIFG SVSHIFG
53 #define PMM_SVSLIFG SVSLIFG
54 #define PMM_PMMLPM5IFG PMMLPM5IFG
55 
56 //*****************************************************************************
57 //
58 // Prototypes for the APIs.
59 //
60 //*****************************************************************************
61 
62 //*****************************************************************************
63 //
64 //! \brief Enables the low-side SVS circuitry
65 //!
66 //!
67 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
68 //!
69 //! \return None
70 //
71 //*****************************************************************************
72 extern void PMM_enableSvsL(void);
73 
74 //*****************************************************************************
75 //
76 //! \brief Disables the low-side SVS circuitry
77 //!
78 //!
79 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
80 //!
81 //! \return None
82 //
83 //*****************************************************************************
84 extern void PMM_disableSvsL(void);
85 
86 //*****************************************************************************
87 //
88 //! \brief Enables the low-side SVM circuitry
89 //!
90 //!
91 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
92 //!
93 //! \return None
94 //
95 //*****************************************************************************
96 extern void PMM_enableSvmL(void);
97 
98 //*****************************************************************************
99 //
100 //! \brief Disables the low-side SVM circuitry
101 //!
102 //!
103 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
104 //!
105 //! \return None
106 //
107 //*****************************************************************************
108 extern void PMM_disableSvmL(void);
109 
110 //*****************************************************************************
111 //
112 //! \brief Enables the high-side SVS circuitry
113 //!
114 //!
115 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
116 //!
117 //! \return None
118 //
119 //*****************************************************************************
120 extern void PMM_enableSvsH(void);
121 
122 //*****************************************************************************
123 //
124 //! \brief Disables the high-side SVS circuitry
125 //!
126 //!
127 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
128 //!
129 //! \return None
130 //
131 //*****************************************************************************
132 extern void PMM_disableSvsH(void);
133 
134 //*****************************************************************************
135 //
136 //! \brief Enables the high-side SVM circuitry
137 //!
138 //!
139 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
140 //!
141 //! \return None
142 //
143 //*****************************************************************************
144 extern void PMM_enableSvmH(void);
145 
146 //*****************************************************************************
147 //
148 //! \brief Disables the high-side SVM circuitry
149 //!
150 //!
151 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
152 //!
153 //! \return None
154 //
155 //*****************************************************************************
156 extern void PMM_disableSvmH(void);
157 
158 //*****************************************************************************
159 //
160 //! \brief Enables the low-side SVS and SVM circuitry
161 //!
162 //!
163 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
164 //!
165 //! \return None
166 //
167 //*****************************************************************************
168 extern void PMM_enableSvsLSvmL(void);
169 
170 //*****************************************************************************
171 //
172 //! \brief Disables the low-side SVS and SVM circuitry
173 //!
174 //!
175 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
176 //!
177 //! \return None
178 //
179 //*****************************************************************************
180 extern void PMM_disableSvsLSvmL(void);
181 
182 //*****************************************************************************
183 //
184 //! \brief Enables the high-side SVS and SVM circuitry
185 //!
186 //!
187 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
188 //!
189 //! \return None
190 //
191 //*****************************************************************************
192 extern void PMM_enableSvsHSvmH(void);
193 
194 //*****************************************************************************
195 //
196 //! \brief Disables the high-side SVS and SVM circuitry
197 //!
198 //!
199 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
200 //!
201 //! \return None
202 //
203 //*****************************************************************************
204 extern void PMM_disableSvsHSvmH(void);
205 
206 //*****************************************************************************
207 //
208 //! \brief Enables the POR signal generation when a low-voltage event is
209 //! registered by the low-side SVS
210 //!
211 //!
212 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
213 //!
214 //! \return None
215 //
216 //*****************************************************************************
217 extern void PMM_enableSvsLReset(void);
218 
219 //*****************************************************************************
220 //
221 //! \brief Disables the POR signal generation when a low-voltage event is
222 //! registered by the low-side SVS
223 //!
224 //!
225 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
226 //!
227 //! \return None
228 //
229 //*****************************************************************************
230 extern void PMM_disableSvsLReset(void);
231 
232 //*****************************************************************************
233 //
234 //! \brief Enables the interrupt generation when a low-voltage event is
235 //! registered by the low-side SVM
236 //!
237 //!
238 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
239 //!
240 //! \return None
241 //
242 //*****************************************************************************
243 extern void PMM_enableSvmLInterrupt(void);
244 
245 //*****************************************************************************
246 //
247 //! \brief Disables the interrupt generation when a low-voltage event is
248 //! registered by the low-side SVM
249 //!
250 //!
251 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
252 //!
253 //! \return None
254 //
255 //*****************************************************************************
256 extern void PMM_disableSvmLInterrupt(void);
257 
258 //*****************************************************************************
259 //
260 //! \brief Enables the POR signal generation when a low-voltage event is
261 //! registered by the high-side SVS
262 //!
263 //!
264 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
265 //!
266 //! \return None
267 //
268 //*****************************************************************************
269 extern void PMM_enableSvsHReset(void);
270 
271 //*****************************************************************************
272 //
273 //! \brief Disables the POR signal generation when a low-voltage event is
274 //! registered by the high-side SVS
275 //!
276 //!
277 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
278 //!
279 //! \return None
280 //
281 //*****************************************************************************
282 extern void PMM_disableSvsHReset(void);
283 
284 //*****************************************************************************
285 //
286 //! \brief Enables the interrupt generation when a low-voltage event is
287 //! registered by the high-side SVM
288 //!
289 //!
290 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
291 //!
292 //! \return None
293 //
294 //*****************************************************************************
295 extern void PMM_enableSvmHInterrupt(void);
296 
297 //*****************************************************************************
298 //
299 //! \brief Disables the interrupt generation when a low-voltage event is
300 //! registered by the high-side SVM
301 //!
302 //!
303 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIE register.
304 //!
305 //! \return None
306 //
307 //*****************************************************************************
308 extern void PMM_disableSvmHInterrupt(void);
309 
310 //*****************************************************************************
311 //
312 //! \brief Clear all interrupt flags for the PMM
313 //!
314 //!
315 //! Modified bits of \b PMMCTL0 register and bits of \b PMMIFG register.
316 //!
317 //! \return None
318 //
319 //*****************************************************************************
320 extern void PMM_clearPMMIFGS(void);
321 
322 //*****************************************************************************
323 //
324 //! \brief Enables supervisor low side in LPM with twake-up-fast from LPM2,
325 //! LPM3, and LPM4
326 //!
327 //!
328 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
329 //!
330 //! \return None
331 //
332 //*****************************************************************************
333 extern void PMM_enableSvsLInLPMFastWake(void);
334 
335 //*****************************************************************************
336 //
337 //! \brief Enables supervisor low side in LPM with twake-up-slow from LPM2,
338 //! LPM3, and LPM4
339 //!
340 //!
341 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
342 //!
343 //! \return None
344 //
345 //*****************************************************************************
346 extern void PMM_enableSvsLInLPMSlowWake(void);
347 
348 //*****************************************************************************
349 //
350 //! \brief Disables supervisor low side in LPM with twake-up-fast from LPM2,
351 //! LPM3, and LPM4
352 //!
353 //!
354 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
355 //!
356 //! \return None
357 //
358 //*****************************************************************************
359 extern void PMM_disableSvsLInLPMFastWake(void);
360 
361 //*****************************************************************************
362 //
363 //! \brief Disables supervisor low side in LPM with twake-up-slow from LPM2,
364 //! LPM3, and LPM4
365 //!
366 //!
367 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
368 //!
369 //! \return None
370 //
371 //*****************************************************************************
372 extern void PMM_disableSvsLInLPMSlowWake(void);
373 
374 //*****************************************************************************
375 //
376 //! \brief Enables supervisor high side in LPM with tpd = 20 s(1)
377 //!
378 //!
379 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
380 //!
381 //! \return None
382 //
383 //*****************************************************************************
384 extern void PMM_enableSvsHInLPMNormPerf(void);
385 
386 //*****************************************************************************
387 //
388 //! \brief Enables supervisor high side in LPM with tpd = 2.5 s(1)
389 //!
390 //!
391 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
392 //!
393 //! \return None
394 //
395 //*****************************************************************************
396 extern void PMM_enableSvsHInLPMFullPerf(void);
397 
398 //*****************************************************************************
399 //
400 //! \brief Disables supervisor high side in LPM with tpd = 20 s(1)
401 //!
402 //!
403 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
404 //!
405 //! \return None
406 //
407 //*****************************************************************************
408 extern void PMM_disableSvsHInLPMNormPerf(void);
409 
410 //*****************************************************************************
411 //
412 //! \brief Disables supervisor high side in LPM with tpd = 2.5 s(1)
413 //!
414 //!
415 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMHCTL register.
416 //!
417 //! \return None
418 //
419 //*****************************************************************************
420 extern void PMM_disableSvsHInLPMFullPerf(void);
421 
422 //*****************************************************************************
423 //
424 //! \brief Optimized to provide twake-up-fast from LPM2, LPM3, and LPM4 with
425 //! least power
426 //!
427 //!
428 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
429 //!
430 //! \return None
431 //
432 //*****************************************************************************
433 extern void PMM_optimizeSvsLInLPMFastWake(void);
434 
435 //*****************************************************************************
436 //
437 //! \brief Optimized to provide tpd = 2.5 s(1) in LPM with least power
438 //!
439 //!
440 //! Modified bits of \b PMMCTL0 register and bits of \b SVSMLCTL register.
441 //!
442 //! \return None
443 //
444 //*****************************************************************************
445 extern void PMM_optimizeSvsHInLPMFullPerf(void);
446 
447 //*****************************************************************************
448 //
449 //! \brief Increase Vcore by one level
450 //!
451 //! \param level level to which Vcore needs to be increased
452 //! Valid values are:
453 //! - \b PMM_CORE_LEVEL_0 [Default]
454 //! - \b PMM_CORE_LEVEL_1
455 //! - \b PMM_CORE_LEVEL_2
456 //! - \b PMM_CORE_LEVEL_3
457 //!
458 //! Modified bits of \b PMMCTL0 register, bits of \b PMMIFG register, bits of
459 //! \b PMMRIE register, bits of \b SVSMHCTL register and bits of \b SVSMLCTL
460 //! register.
461 //!
462 //! \return STATUS_SUCCESS or STATUS_FAIL
463 //
464 //*****************************************************************************
465 extern uint16_t PMM_setVCoreUp(uint8_t level);
466 
467 //*****************************************************************************
468 //
469 //! \brief Decrease Vcore by one level
470 //!
471 //! \param level level to which Vcore needs to be decreased
472 //! Valid values are:
473 //! - \b PMM_CORE_LEVEL_0 [Default]
474 //! - \b PMM_CORE_LEVEL_1
475 //! - \b PMM_CORE_LEVEL_2
476 //! - \b PMM_CORE_LEVEL_3
477 //!
478 //! Modified bits of \b PMMCTL0 register, bits of \b PMMIFG register, bits of
479 //! \b PMMRIE register, bits of \b SVSMHCTL register and bits of \b SVSMLCTL
480 //! register.
481 //!
482 //! \return STATUS_SUCCESS
483 //
484 //*****************************************************************************
485 extern uint16_t PMM_setVCoreDown(uint8_t level);
486 
487 //*****************************************************************************
488 //
489 //! \brief Set Vcore to expected level
490 //!
491 //! \param level level to which Vcore needs to be decreased/increased
492 //! Valid values are:
493 //! - \b PMM_CORE_LEVEL_0 [Default]
494 //! - \b PMM_CORE_LEVEL_1
495 //! - \b PMM_CORE_LEVEL_2
496 //! - \b PMM_CORE_LEVEL_3
497 //!
498 //! Modified bits of \b PMMCTL0 register, bits of \b PMMIFG register, bits of
499 //! \b PMMRIE register, bits of \b SVSMHCTL register and bits of \b SVSMLCTL
500 //! register.
501 //!
502 //! \return STATUS_SUCCESS or STATUS_FAIL
503 //
504 //*****************************************************************************
505 extern bool PMM_setVCore(uint8_t level);
506 
507 //*****************************************************************************
508 //
509 //! \brief Returns interrupt status
510 //!
511 //! \param mask is the mask for specifying the required flag
512 //! Mask value is the logical OR of any of the following:
513 //! - \b PMM_SVSMLDLYIFG
514 //! - \b PMM_SVMLIFG
515 //! - \b PMM_SVMLVLRIFG
516 //! - \b PMM_SVSMHDLYIFG
517 //! - \b PMM_SVMHIFG
518 //! - \b PMM_SVMHVLRIFG
519 //! - \b PMM_PMMBORIFG
520 //! - \b PMM_PMMRSTIFG
521 //! - \b PMM_PMMPORIFG
522 //! - \b PMM_SVSHIFG
523 //! - \b PMM_SVSLIFG
524 //! - \b PMM_PMMLPM5IFG
525 //!
526 //! \return Logical OR of any of the following:
527 //! - \b PMM_SVSMLDLYIFG
528 //! - \b PMM_SVMLIFG
529 //! - \b PMM_SVMLVLRIFG
530 //! - \b PMM_SVSMHDLYIFG
531 //! - \b PMM_SVMHIFG
532 //! - \b PMM_SVMHVLRIFG
533 //! - \b PMM_PMMBORIFG
534 //! - \b PMM_PMMRSTIFG
535 //! - \b PMM_PMMPORIFG
536 //! - \b PMM_SVSHIFG
537 //! - \b PMM_SVSLIFG
538 //! - \b PMM_PMMLPM5IFG
539 //! \n indicating the status of the masked interrupts
540 //
541 //*****************************************************************************
542 extern uint16_t PMM_getInterruptStatus(uint16_t mask);
543 
544 //*****************************************************************************
545 //
546 // Mark the end of the C bindings section for C++ compilers.
547 //
548 //*****************************************************************************
549 #ifdef __cplusplus
550 }
551 #endif
552 
553 #endif
554 #endif // __MSP430WARE_PMM_H__
void PMM_enableSvmLInterrupt(void)
Enables the interrupt generation when a low-voltage event is registered by the low-side SVM...
Definition: pmm.c:119
void PMM_disableSvsL(void)
Disables the low-side SVS circuitry.
Definition: pmm.c:28
void PMM_disableSvsLReset(void)
Disables the POR signal generation when a low-voltage event is registered by the low-side SVS...
Definition: pmm.c:112
void PMM_clearPMMIFGS(void)
Clear all interrupt flags for the PMM.
Definition: pmm.c:161
void PMM_enableSvsHInLPMNormPerf(void)
Enables supervisor high side in LPM with tpd = 20 s(1)
Definition: pmm.c:200
bool PMM_setVCore(uint8_t level)
Set Vcore to expected level.
Definition: pmm.c:461
void PMM_enableSvsHInLPMFullPerf(void)
Enables supervisor high side in LPM with tpd = 2.5 s(1)
Definition: pmm.c:208
void PMM_enableSvsH(void)
Enables the high-side SVS circuitry.
Definition: pmm.c:49
uint16_t PMM_getInterruptStatus(uint16_t mask)
Returns interrupt status.
Definition: pmm.c:497
void PMM_enableSvsHReset(void)
Enables the POR signal generation when a low-voltage event is registered by the high-side SVS...
Definition: pmm.c:133
void PMM_enableSvmL(void)
Enables the low-side SVM circuitry.
Definition: pmm.c:35
uint16_t PMM_setVCoreDown(uint8_t level)
Decrease Vcore by one level.
Definition: pmm.c:374
void PMM_disableSvsHInLPMFullPerf(void)
Disables supervisor high side in LPM with tpd = 2.5 s(1)
Definition: pmm.c:223
void PMM_disableSvsHSvmH(void)
Disables the high-side SVS and SVM circuitry.
Definition: pmm.c:98
void PMM_disableSvmL(void)
Disables the low-side SVM circuitry.
Definition: pmm.c:42
void PMM_disableSvmH(void)
Disables the high-side SVM circuitry.
Definition: pmm.c:70
void PMM_disableSvsHInLPMNormPerf(void)
Disables supervisor high side in LPM with tpd = 20 s(1)
Definition: pmm.c:216
void PMM_enableSvsLInLPMSlowWake(void)
Enables supervisor low side in LPM with twake-up-slow from LPM2, LPM3, and LPM4.
Definition: pmm.c:177
void PMM_optimizeSvsLInLPMFastWake(void)
Optimized to provide twake-up-fast from LPM2, LPM3, and LPM4 with least power.
Definition: pmm.c:231
void PMM_disableSvsLInLPMFastWake(void)
Disables supervisor low side in LPM with twake-up-fast from LPM2, LPM3, and LPM4. ...
Definition: pmm.c:185
void PMM_disableSvsLInLPMSlowWake(void)
Disables supervisor low side in LPM with twake-up-slow from LPM2, LPM3, and LPM4. ...
Definition: pmm.c:193
void PMM_disableSvsH(void)
Disables the high-side SVS circuitry.
Definition: pmm.c:56
void PMM_enableSvsHSvmH(void)
Enables the high-side SVS and SVM circuitry.
Definition: pmm.c:91
void PMM_enableSvmHInterrupt(void)
Enables the interrupt generation when a low-voltage event is registered by the high-side SVM...
Definition: pmm.c:147
void PMM_optimizeSvsHInLPMFullPerf(void)
Optimized to provide tpd = 2.5 s(1) in LPM with least power.
Definition: pmm.c:239
void PMM_enableSvsLSvmL(void)
Enables the low-side SVS and SVM circuitry.
Definition: pmm.c:77
void PMM_enableSvsL(void)
Enables the low-side SVS circuitry.
Definition: pmm.c:21
void PMM_enableSvmH(void)
Enables the high-side SVM circuitry.
Definition: pmm.c:63
void PMM_disableSvmLInterrupt(void)
Disables the interrupt generation when a low-voltage event is registered by the low-side SVM...
Definition: pmm.c:126
void PMM_disableSvsHReset(void)
Disables the POR signal generation when a low-voltage event is registered by the high-side SVS...
Definition: pmm.c:140
uint16_t PMM_setVCoreUp(uint8_t level)
Increase Vcore by one level.
Definition: pmm.c:246
void PMM_disableSvmHInterrupt(void)
Disables the interrupt generation when a low-voltage event is registered by the high-side SVM...
Definition: pmm.c:154
void PMM_disableSvsLSvmL(void)
Disables the low-side SVS and SVM circuitry.
Definition: pmm.c:84
void PMM_enableSvsLReset(void)
Enables the POR signal generation when a low-voltage event is registered by the low-side SVS...
Definition: pmm.c:105
void PMM_enableSvsLInLPMFastWake(void)
Enables supervisor low side in LPM with twake-up-fast from LPM2, LPM3, and LPM4.
Definition: pmm.c:168

Copyright 2020, Texas Instruments Incorporated