libopencm3
A free/libre/open-source firmware library for various ARM Cortex-M3 microcontrollers.
l0/flash.h
Go to the documentation of this file.
1
/** @defgroup flash_defines FLASH Defines
2
*
3
* @brief <b>Defined Constants and Types for the STM32L0xx Flash memory</b>
4
*
5
* @ingroup STM32L0xx_defines
6
*
7
* @version 1.0.0
8
*
9
* LGPL License Terms @ref lgpl_license
10
*/
11
/*
12
* This file is part of the libopencm3 project.
13
*
14
* Copyright (C) 2017 Karl Palsson <karlp@tweak.net.au>
15
*
16
* This library is free software: you can redistribute it and/or modify
17
* it under the terms of the GNU Lesser General Public License as published by
18
* the Free Software Foundation, either version 3 of the License, or
19
* (at your option) any later version.
20
*
21
* This library is distributed in the hope that it will be useful,
22
* but WITHOUT ANY WARRANTY; without even the implied warranty of
23
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
24
* GNU Lesser General Public License for more details.
25
*
26
* You should have received a copy of the GNU Lesser General Public License
27
* along with this library. If not, see <http://www.gnu.org/licenses/>.
28
*/
29
30
#ifndef LIBOPENCM3_FLASH_H
31
#define LIBOPENCM3_FLASH_H
32
/**@{*/
33
34
#include <
libopencm3/stm32/common/flash_common_all.h
>
35
#include <
libopencm3/stm32/common/flash_common_l01.h
>
36
37
/* --- FLASH registers ----------------------------------------------------- */
38
/* L0 has some alternative names for the same registers */
39
#define FLASH_OPTR FLASH_OBR
40
#define FLASH_WRPROT1 FLASH_WRPR1
41
#define FLASH_WRPROT2 FLASH_WRPR2
42
43
/* --- FLASH_ACR values ---------------------------------------------------- */
44
#define FLASH_ACR_PRE_READ (1 << 6)
45
#define FLASH_ACR_DISAB_BUF (1 << 5)
46
47
/* --- FLASH_PECR values ---------------------------------------------------- */
48
#define FLASH_PECR_NZDISABLE (1 << 23)
49
50
/* --- FLASH_SR values ----------------------------------------------------- */
51
#define FLASH_SR_RDERR (1 << 13)
52
#define FLASH_SR_NOTZEROERR (1 << 16)
53
#define FLASH_SR_FWWERR (1 << 17)
54
55
/* --- FLASH_OPTR values ----------------------------------------------------- */
56
#define FLASH_OPTR_NBOOT1 (1 << 31)
57
58
#define FLASH_HALF_PAGE_SIZE 16
59
60
BEGIN_DECLS
61
62
END_DECLS
63
/**@}*/
64
65
#endif
END_DECLS
#define END_DECLS
Definition:
common.h:34
BEGIN_DECLS
#define BEGIN_DECLS
Definition:
common.h:33
flash_common_all.h
flash_common_l01.h
include
libopencm3
stm32
l0
flash.h
Generated on Tue Mar 7 2023 16:12:00 for libopencm3 by
1.9.4