libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
f4/pwr.h
Go to the documentation of this file.
1
/** @defgroup pwr_defines PWR Defines
2
3
@brief <b>Defined Constants and Types for the STM32F4xx Power Control</b>
4
5
@ingroup STM32F4xx_defines
6
7
@version 1.0.0
8
9
@author @htmlonly © @endhtmlonly 2011 Stephen Caudle <scaudle@doceme.com>
10
11
@date 4 March 2013
12
13
LGPL License Terms @ref lgpl_license
14
*/
15
/*
16
* This file is part of the libopencm3 project.
17
*
18
* Copyright (C) 2011 Stephen Caudle <scaudle@doceme.com>
19
*
20
* This library is free software: you can redistribute it and/or modify
21
* it under the terms of the GNU Lesser General Public License as published by
22
* the Free Software Foundation, either version 3 of the License, or
23
* (at your option) any later version.
24
*
25
* This library is distributed in the hope that it will be useful,
26
* but WITHOUT ANY WARRANTY; without even the implied warranty of
27
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
28
* GNU Lesser General Public License for more details.
29
*
30
* You should have received a copy of the GNU Lesser General Public License
31
* along with this library. If not, see <http://www.gnu.org/licenses/>.
32
*/
33
34
#ifndef LIBOPENCM3_PWR_H
35
#define LIBOPENCM3_PWR_H
36
37
#include <
libopencm3/stm32/common/pwr_common_v1.h
>
38
39
/*
40
* This file extends the common STM32 version with definitions only
41
* applicable to the STM32F4 series of devices.
42
*/
43
/** @addtogroup pwr_defines
44
* @{*/
45
46
/* --- PWR_CR values ------------------------------------------------------- */
47
48
/** VOS: Regulator voltage scaling output selection */
49
#define PWR_CR_VOS_SHIFT 14
50
#define PWR_CR_VOS_MASK 0x3
51
52
/** ADCDC1: Masks extra flash accesses by prefetch (see AN4073) */
53
#define PWR_CR_ADCDC1 (1 << 13)
54
55
/** MRLVDS/MRUDS: Main regulator Low Voltage / Under drive in Deep Sleep */
56
#define PWR_CR_MRLVDS (1 << 11)
57
#define PWR_CR_MRUDS PWR_CR_MRLVDS
58
59
/** LPLVDS/LPUDS: Low-power regulator Low Voltage / Under drive in Deep Sleep */
60
#define PWR_CR_LPLVDS (1 << 10)
61
#define PWR_CR_LPUDS PWR_CR_LPLVDS
62
63
/** FPDS: Flash power down in stop mode */
64
#define PWR_CR_FPDS (1 << 9)
65
66
/* --- PWR_CSR values ------------------------------------------------------ */
67
68
/** VOSRDY: Regulator voltage scaling output selection ready bit */
69
#define PWR_CSR_VOSRDY (1 << 14)
70
71
/** BRE: Backup regulator enable */
72
#define PWR_CSR_BRE (1 << 9)
73
74
/** BRR: Backup regulator ready */
75
#define PWR_CSR_BRR (1 << 3)
76
77
/* --- Function prototypes ------------------------------------------------- */
78
79
enum
pwr_vos_scale
{
80
PWR_SCALE1
= 0x3,
81
PWR_SCALE2
= 0x2,
82
PWR_SCALE3
= 0x1,
83
};
84
85
BEGIN_DECLS
86
87
void
pwr_set_vos_scale
(
enum
pwr_vos_scale
scale);
88
89
END_DECLS
90
91
/**@}*/
92
93
#endif
END_DECLS
#define END_DECLS
Definition:
common.h:34
BEGIN_DECLS
#define BEGIN_DECLS
Definition:
common.h:33
pwr_set_vos_scale
void pwr_set_vos_scale(enum pwr_vos_scale scale)
Definition:
pwr.c:41
pwr_vos_scale
pwr_vos_scale
Definition:
f4/pwr.h:79
PWR_SCALE1
@ PWR_SCALE1
Definition:
f4/pwr.h:80
PWR_SCALE2
@ PWR_SCALE2
Definition:
f4/pwr.h:81
PWR_SCALE3
@ PWR_SCALE3
Definition:
f4/pwr.h:82
pwr_common_v1.h
include
libopencm3
stm32
f4
pwr.h
Generated on Tue Mar 7 2023 16:11:41 for libopencm3 by
1.9.4