mbed library sources
Dependents: frdm_kl05z_gpio_test
Fork of mbed-src by
targets/cmsis/TARGET_STM/TARGET_NUCLEO_L152RE/stm32l1xx_flash.h@323:9e901b0a5aa1, 2014-09-13 (annotated)
- Committer:
- shaoziyang
- Date:
- Sat Sep 13 14:25:46 2014 +0000
- Revision:
- 323:9e901b0a5aa1
- Parent:
- 106:ced8cbb51063
test with CLOCK_SETUP = 0
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
mbed_official | 76:aeb1df146756 | 1 | /** |
mbed_official | 76:aeb1df146756 | 2 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 3 | * @file stm32l1xx_flash.h |
mbed_official | 76:aeb1df146756 | 4 | * @author MCD Application Team |
mbed_official | 80:66393a7b209d | 5 | * @version V1.3.0 |
mbed_official | 80:66393a7b209d | 6 | * @date 31-January-2014 |
mbed_official | 76:aeb1df146756 | 7 | * @brief This file contains all the functions prototypes for the FLASH |
mbed_official | 76:aeb1df146756 | 8 | * firmware library. |
mbed_official | 76:aeb1df146756 | 9 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 10 | * @attention |
mbed_official | 76:aeb1df146756 | 11 | * |
mbed_official | 106:ced8cbb51063 | 12 | * <h2><center>© COPYRIGHT(c) 2014 STMicroelectronics</center></h2> |
mbed_official | 76:aeb1df146756 | 13 | * |
mbed_official | 106:ced8cbb51063 | 14 | * Redistribution and use in source and binary forms, with or without modification, |
mbed_official | 106:ced8cbb51063 | 15 | * are permitted provided that the following conditions are met: |
mbed_official | 106:ced8cbb51063 | 16 | * 1. Redistributions of source code must retain the above copyright notice, |
mbed_official | 106:ced8cbb51063 | 17 | * this list of conditions and the following disclaimer. |
mbed_official | 106:ced8cbb51063 | 18 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
mbed_official | 106:ced8cbb51063 | 19 | * this list of conditions and the following disclaimer in the documentation |
mbed_official | 106:ced8cbb51063 | 20 | * and/or other materials provided with the distribution. |
mbed_official | 106:ced8cbb51063 | 21 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
mbed_official | 106:ced8cbb51063 | 22 | * may be used to endorse or promote products derived from this software |
mbed_official | 106:ced8cbb51063 | 23 | * without specific prior written permission. |
mbed_official | 76:aeb1df146756 | 24 | * |
mbed_official | 106:ced8cbb51063 | 25 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
mbed_official | 106:ced8cbb51063 | 26 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
mbed_official | 106:ced8cbb51063 | 27 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
mbed_official | 106:ced8cbb51063 | 28 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
mbed_official | 106:ced8cbb51063 | 29 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
mbed_official | 106:ced8cbb51063 | 30 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
mbed_official | 106:ced8cbb51063 | 31 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
mbed_official | 106:ced8cbb51063 | 32 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
mbed_official | 106:ced8cbb51063 | 33 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
mbed_official | 106:ced8cbb51063 | 34 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
mbed_official | 76:aeb1df146756 | 35 | * |
mbed_official | 76:aeb1df146756 | 36 | ****************************************************************************** |
mbed_official | 76:aeb1df146756 | 37 | */ |
mbed_official | 76:aeb1df146756 | 38 | |
mbed_official | 76:aeb1df146756 | 39 | /* Define to prevent recursive inclusion -------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 40 | #ifndef __STM32L1xx_FLASH_H |
mbed_official | 76:aeb1df146756 | 41 | #define __STM32L1xx_FLASH_H |
mbed_official | 76:aeb1df146756 | 42 | |
mbed_official | 76:aeb1df146756 | 43 | #ifdef __cplusplus |
mbed_official | 76:aeb1df146756 | 44 | extern "C" { |
mbed_official | 76:aeb1df146756 | 45 | #endif |
mbed_official | 76:aeb1df146756 | 46 | |
mbed_official | 76:aeb1df146756 | 47 | /* Includes ------------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 48 | #include "stm32l1xx.h" |
mbed_official | 76:aeb1df146756 | 49 | |
mbed_official | 76:aeb1df146756 | 50 | /** @addtogroup STM32L1xx_StdPeriph_Driver |
mbed_official | 76:aeb1df146756 | 51 | * @{ |
mbed_official | 76:aeb1df146756 | 52 | */ |
mbed_official | 76:aeb1df146756 | 53 | |
mbed_official | 76:aeb1df146756 | 54 | /** @addtogroup FLASH |
mbed_official | 76:aeb1df146756 | 55 | * @{ |
mbed_official | 76:aeb1df146756 | 56 | */ |
mbed_official | 76:aeb1df146756 | 57 | |
mbed_official | 76:aeb1df146756 | 58 | /* Exported types ------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 59 | |
mbed_official | 76:aeb1df146756 | 60 | /** |
mbed_official | 76:aeb1df146756 | 61 | * @brief FLASH Status |
mbed_official | 76:aeb1df146756 | 62 | */ |
mbed_official | 76:aeb1df146756 | 63 | typedef enum |
mbed_official | 76:aeb1df146756 | 64 | { |
mbed_official | 76:aeb1df146756 | 65 | FLASH_BUSY = 1, |
mbed_official | 76:aeb1df146756 | 66 | FLASH_ERROR_WRP, |
mbed_official | 76:aeb1df146756 | 67 | FLASH_ERROR_PROGRAM, |
mbed_official | 76:aeb1df146756 | 68 | FLASH_COMPLETE, |
mbed_official | 76:aeb1df146756 | 69 | FLASH_TIMEOUT |
mbed_official | 76:aeb1df146756 | 70 | }FLASH_Status; |
mbed_official | 76:aeb1df146756 | 71 | |
mbed_official | 76:aeb1df146756 | 72 | /* Exported constants --------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 73 | |
mbed_official | 76:aeb1df146756 | 74 | /** @defgroup FLASH_Exported_Constants |
mbed_official | 76:aeb1df146756 | 75 | * @{ |
mbed_official | 76:aeb1df146756 | 76 | */ |
mbed_official | 76:aeb1df146756 | 77 | |
mbed_official | 76:aeb1df146756 | 78 | /** @defgroup FLASH_Latency |
mbed_official | 76:aeb1df146756 | 79 | * @{ |
mbed_official | 76:aeb1df146756 | 80 | */ |
mbed_official | 76:aeb1df146756 | 81 | #define FLASH_Latency_0 ((uint8_t)0x00) /*!< FLASH Zero Latency cycle */ |
mbed_official | 76:aeb1df146756 | 82 | #define FLASH_Latency_1 ((uint8_t)0x01) /*!< FLASH One Latency cycle */ |
mbed_official | 76:aeb1df146756 | 83 | |
mbed_official | 76:aeb1df146756 | 84 | #define IS_FLASH_LATENCY(LATENCY) (((LATENCY) == FLASH_Latency_0) || \ |
mbed_official | 76:aeb1df146756 | 85 | ((LATENCY) == FLASH_Latency_1)) |
mbed_official | 76:aeb1df146756 | 86 | /** |
mbed_official | 76:aeb1df146756 | 87 | * @} |
mbed_official | 76:aeb1df146756 | 88 | */ |
mbed_official | 76:aeb1df146756 | 89 | |
mbed_official | 76:aeb1df146756 | 90 | /** @defgroup FLASH_Interrupts |
mbed_official | 76:aeb1df146756 | 91 | * @{ |
mbed_official | 76:aeb1df146756 | 92 | */ |
mbed_official | 76:aeb1df146756 | 93 | |
mbed_official | 76:aeb1df146756 | 94 | #define FLASH_IT_EOP FLASH_PECR_EOPIE /*!< End of programming interrupt source */ |
mbed_official | 76:aeb1df146756 | 95 | #define FLASH_IT_ERR FLASH_PECR_ERRIE /*!< Error interrupt source */ |
mbed_official | 76:aeb1df146756 | 96 | #define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFFFCFFFF) == 0x00000000) && (((IT) != 0x00000000))) |
mbed_official | 76:aeb1df146756 | 97 | /** |
mbed_official | 76:aeb1df146756 | 98 | * @} |
mbed_official | 76:aeb1df146756 | 99 | */ |
mbed_official | 76:aeb1df146756 | 100 | |
mbed_official | 76:aeb1df146756 | 101 | /** @defgroup FLASH_Address |
mbed_official | 76:aeb1df146756 | 102 | * @{ |
mbed_official | 76:aeb1df146756 | 103 | */ |
mbed_official | 76:aeb1df146756 | 104 | |
mbed_official | 80:66393a7b209d | 105 | #define IS_FLASH_DATA_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08080000) && ((ADDRESS) <= 0x08083FFF)) |
mbed_official | 80:66393a7b209d | 106 | #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0807FFFF)) |
mbed_official | 76:aeb1df146756 | 107 | |
mbed_official | 76:aeb1df146756 | 108 | /** |
mbed_official | 76:aeb1df146756 | 109 | * @} |
mbed_official | 76:aeb1df146756 | 110 | */ |
mbed_official | 76:aeb1df146756 | 111 | |
mbed_official | 76:aeb1df146756 | 112 | /** @defgroup Option_Bytes_Write_Protection |
mbed_official | 76:aeb1df146756 | 113 | * @{ |
mbed_official | 76:aeb1df146756 | 114 | */ |
mbed_official | 76:aeb1df146756 | 115 | |
mbed_official | 76:aeb1df146756 | 116 | #define OB_WRP_Pages0to15 ((uint32_t)0x00000001) /* Write protection of Sector0 */ |
mbed_official | 76:aeb1df146756 | 117 | #define OB_WRP_Pages16to31 ((uint32_t)0x00000002) /* Write protection of Sector1 */ |
mbed_official | 76:aeb1df146756 | 118 | #define OB_WRP_Pages32to47 ((uint32_t)0x00000004) /* Write protection of Sector2 */ |
mbed_official | 76:aeb1df146756 | 119 | #define OB_WRP_Pages48to63 ((uint32_t)0x00000008) /* Write protection of Sector3 */ |
mbed_official | 76:aeb1df146756 | 120 | #define OB_WRP_Pages64to79 ((uint32_t)0x00000010) /* Write protection of Sector4 */ |
mbed_official | 76:aeb1df146756 | 121 | #define OB_WRP_Pages80to95 ((uint32_t)0x00000020) /* Write protection of Sector5 */ |
mbed_official | 76:aeb1df146756 | 122 | #define OB_WRP_Pages96to111 ((uint32_t)0x00000040) /* Write protection of Sector6 */ |
mbed_official | 76:aeb1df146756 | 123 | #define OB_WRP_Pages112to127 ((uint32_t)0x00000080) /* Write protection of Sector7 */ |
mbed_official | 76:aeb1df146756 | 124 | #define OB_WRP_Pages128to143 ((uint32_t)0x00000100) /* Write protection of Sector8 */ |
mbed_official | 76:aeb1df146756 | 125 | #define OB_WRP_Pages144to159 ((uint32_t)0x00000200) /* Write protection of Sector9 */ |
mbed_official | 76:aeb1df146756 | 126 | #define OB_WRP_Pages160to175 ((uint32_t)0x00000400) /* Write protection of Sector10 */ |
mbed_official | 76:aeb1df146756 | 127 | #define OB_WRP_Pages176to191 ((uint32_t)0x00000800) /* Write protection of Sector11 */ |
mbed_official | 76:aeb1df146756 | 128 | #define OB_WRP_Pages192to207 ((uint32_t)0x00001000) /* Write protection of Sector12 */ |
mbed_official | 76:aeb1df146756 | 129 | #define OB_WRP_Pages208to223 ((uint32_t)0x00002000) /* Write protection of Sector13 */ |
mbed_official | 76:aeb1df146756 | 130 | #define OB_WRP_Pages224to239 ((uint32_t)0x00004000) /* Write protection of Sector14 */ |
mbed_official | 76:aeb1df146756 | 131 | #define OB_WRP_Pages240to255 ((uint32_t)0x00008000) /* Write protection of Sector15 */ |
mbed_official | 76:aeb1df146756 | 132 | #define OB_WRP_Pages256to271 ((uint32_t)0x00010000) /* Write protection of Sector16 */ |
mbed_official | 76:aeb1df146756 | 133 | #define OB_WRP_Pages272to287 ((uint32_t)0x00020000) /* Write protection of Sector17 */ |
mbed_official | 76:aeb1df146756 | 134 | #define OB_WRP_Pages288to303 ((uint32_t)0x00040000) /* Write protection of Sector18 */ |
mbed_official | 76:aeb1df146756 | 135 | #define OB_WRP_Pages304to319 ((uint32_t)0x00080000) /* Write protection of Sector19 */ |
mbed_official | 76:aeb1df146756 | 136 | #define OB_WRP_Pages320to335 ((uint32_t)0x00100000) /* Write protection of Sector20 */ |
mbed_official | 76:aeb1df146756 | 137 | #define OB_WRP_Pages336to351 ((uint32_t)0x00200000) /* Write protection of Sector21 */ |
mbed_official | 76:aeb1df146756 | 138 | #define OB_WRP_Pages352to367 ((uint32_t)0x00400000) /* Write protection of Sector22 */ |
mbed_official | 76:aeb1df146756 | 139 | #define OB_WRP_Pages368to383 ((uint32_t)0x00800000) /* Write protection of Sector23 */ |
mbed_official | 76:aeb1df146756 | 140 | #define OB_WRP_Pages384to399 ((uint32_t)0x01000000) /* Write protection of Sector24 */ |
mbed_official | 76:aeb1df146756 | 141 | #define OB_WRP_Pages400to415 ((uint32_t)0x02000000) /* Write protection of Sector25 */ |
mbed_official | 76:aeb1df146756 | 142 | #define OB_WRP_Pages416to431 ((uint32_t)0x04000000) /* Write protection of Sector26 */ |
mbed_official | 76:aeb1df146756 | 143 | #define OB_WRP_Pages432to447 ((uint32_t)0x08000000) /* Write protection of Sector27 */ |
mbed_official | 76:aeb1df146756 | 144 | #define OB_WRP_Pages448to463 ((uint32_t)0x10000000) /* Write protection of Sector28 */ |
mbed_official | 76:aeb1df146756 | 145 | #define OB_WRP_Pages464to479 ((uint32_t)0x20000000) /* Write protection of Sector29 */ |
mbed_official | 76:aeb1df146756 | 146 | #define OB_WRP_Pages480to495 ((uint32_t)0x40000000) /* Write protection of Sector30 */ |
mbed_official | 76:aeb1df146756 | 147 | #define OB_WRP_Pages496to511 ((uint32_t)0x80000000) /* Write protection of Sector31 */ |
mbed_official | 76:aeb1df146756 | 148 | |
mbed_official | 76:aeb1df146756 | 149 | #define OB_WRP_AllPages ((uint32_t)0xFFFFFFFF) /*!< Write protection of all Sectors */ |
mbed_official | 76:aeb1df146756 | 150 | |
mbed_official | 76:aeb1df146756 | 151 | #define OB_WRP1_Pages512to527 ((uint32_t)0x00000001) /* Write protection of Sector32 */ |
mbed_official | 76:aeb1df146756 | 152 | #define OB_WRP1_Pages528to543 ((uint32_t)0x00000002) /* Write protection of Sector33 */ |
mbed_official | 76:aeb1df146756 | 153 | #define OB_WRP1_Pages544to559 ((uint32_t)0x00000004) /* Write protection of Sector34 */ |
mbed_official | 76:aeb1df146756 | 154 | #define OB_WRP1_Pages560to575 ((uint32_t)0x00000008) /* Write protection of Sector35 */ |
mbed_official | 76:aeb1df146756 | 155 | #define OB_WRP1_Pages576to591 ((uint32_t)0x00000010) /* Write protection of Sector36 */ |
mbed_official | 76:aeb1df146756 | 156 | #define OB_WRP1_Pages592to607 ((uint32_t)0x00000020) /* Write protection of Sector37 */ |
mbed_official | 76:aeb1df146756 | 157 | #define OB_WRP1_Pages608to623 ((uint32_t)0x00000040) /* Write protection of Sector38 */ |
mbed_official | 76:aeb1df146756 | 158 | #define OB_WRP1_Pages624to639 ((uint32_t)0x00000080) /* Write protection of Sector39 */ |
mbed_official | 76:aeb1df146756 | 159 | #define OB_WRP1_Pages640to655 ((uint32_t)0x00000100) /* Write protection of Sector40 */ |
mbed_official | 76:aeb1df146756 | 160 | #define OB_WRP1_Pages656to671 ((uint32_t)0x00000200) /* Write protection of Sector41 */ |
mbed_official | 76:aeb1df146756 | 161 | #define OB_WRP1_Pages672to687 ((uint32_t)0x00000400) /* Write protection of Sector42 */ |
mbed_official | 76:aeb1df146756 | 162 | #define OB_WRP1_Pages688to703 ((uint32_t)0x00000800) /* Write protection of Sector43 */ |
mbed_official | 76:aeb1df146756 | 163 | #define OB_WRP1_Pages704to719 ((uint32_t)0x00001000) /* Write protection of Sector44 */ |
mbed_official | 76:aeb1df146756 | 164 | #define OB_WRP1_Pages720to735 ((uint32_t)0x00002000) /* Write protection of Sector45 */ |
mbed_official | 76:aeb1df146756 | 165 | #define OB_WRP1_Pages736to751 ((uint32_t)0x00004000) /* Write protection of Sector46 */ |
mbed_official | 76:aeb1df146756 | 166 | #define OB_WRP1_Pages752to767 ((uint32_t)0x00008000) /* Write protection of Sector47 */ |
mbed_official | 76:aeb1df146756 | 167 | #define OB_WRP1_Pages768to783 ((uint32_t)0x00010000) /* Write protection of Sector48 */ |
mbed_official | 76:aeb1df146756 | 168 | #define OB_WRP1_Pages784to799 ((uint32_t)0x00020000) /* Write protection of Sector49 */ |
mbed_official | 76:aeb1df146756 | 169 | #define OB_WRP1_Pages800to815 ((uint32_t)0x00040000) /* Write protection of Sector50 */ |
mbed_official | 76:aeb1df146756 | 170 | #define OB_WRP1_Pages816to831 ((uint32_t)0x00080000) /* Write protection of Sector51 */ |
mbed_official | 76:aeb1df146756 | 171 | #define OB_WRP1_Pages832to847 ((uint32_t)0x00100000) /* Write protection of Sector52 */ |
mbed_official | 76:aeb1df146756 | 172 | #define OB_WRP1_Pages848to863 ((uint32_t)0x00200000) /* Write protection of Sector53 */ |
mbed_official | 76:aeb1df146756 | 173 | #define OB_WRP1_Pages864to879 ((uint32_t)0x00400000) /* Write protection of Sector54 */ |
mbed_official | 76:aeb1df146756 | 174 | #define OB_WRP1_Pages880to895 ((uint32_t)0x00800000) /* Write protection of Sector55 */ |
mbed_official | 76:aeb1df146756 | 175 | #define OB_WRP1_Pages896to911 ((uint32_t)0x01000000) /* Write protection of Sector56 */ |
mbed_official | 76:aeb1df146756 | 176 | #define OB_WRP1_Pages912to927 ((uint32_t)0x02000000) /* Write protection of Sector57 */ |
mbed_official | 76:aeb1df146756 | 177 | #define OB_WRP1_Pages928to943 ((uint32_t)0x04000000) /* Write protection of Sector58 */ |
mbed_official | 76:aeb1df146756 | 178 | #define OB_WRP1_Pages944to959 ((uint32_t)0x08000000) /* Write protection of Sector59 */ |
mbed_official | 76:aeb1df146756 | 179 | #define OB_WRP1_Pages960to975 ((uint32_t)0x10000000) /* Write protection of Sector60 */ |
mbed_official | 76:aeb1df146756 | 180 | #define OB_WRP1_Pages976to991 ((uint32_t)0x20000000) /* Write protection of Sector61 */ |
mbed_official | 76:aeb1df146756 | 181 | #define OB_WRP1_Pages992to1007 ((uint32_t)0x40000000) /* Write protection of Sector62 */ |
mbed_official | 76:aeb1df146756 | 182 | #define OB_WRP1_Pages1008to1023 ((uint32_t)0x80000000) /* Write protection of Sector63 */ |
mbed_official | 76:aeb1df146756 | 183 | |
mbed_official | 76:aeb1df146756 | 184 | #define OB_WRP1_AllPages ((uint32_t)0xFFFFFFFF) /*!< Write protection of all Sectors */ |
mbed_official | 76:aeb1df146756 | 185 | |
mbed_official | 76:aeb1df146756 | 186 | #define OB_WRP2_Pages1024to1039 ((uint32_t)0x00000001) /* Write protection of Sector64 */ |
mbed_official | 76:aeb1df146756 | 187 | #define OB_WRP2_Pages1040to1055 ((uint32_t)0x00000002) /* Write protection of Sector65 */ |
mbed_official | 76:aeb1df146756 | 188 | #define OB_WRP2_Pages1056to1071 ((uint32_t)0x00000004) /* Write protection of Sector66 */ |
mbed_official | 76:aeb1df146756 | 189 | #define OB_WRP2_Pages1072to1087 ((uint32_t)0x00000008) /* Write protection of Sector67 */ |
mbed_official | 76:aeb1df146756 | 190 | #define OB_WRP2_Pages1088to1103 ((uint32_t)0x00000010) /* Write protection of Sector68 */ |
mbed_official | 76:aeb1df146756 | 191 | #define OB_WRP2_Pages1104to1119 ((uint32_t)0x00000020) /* Write protection of Sector69 */ |
mbed_official | 76:aeb1df146756 | 192 | #define OB_WRP2_Pages1120to1135 ((uint32_t)0x00000040) /* Write protection of Sector70 */ |
mbed_official | 76:aeb1df146756 | 193 | #define OB_WRP2_Pages1136to1151 ((uint32_t)0x00000080) /* Write protection of Sector71 */ |
mbed_official | 76:aeb1df146756 | 194 | #define OB_WRP2_Pages1152to1167 ((uint32_t)0x00000100) /* Write protection of Sector72 */ |
mbed_official | 76:aeb1df146756 | 195 | #define OB_WRP2_Pages1168to1183 ((uint32_t)0x00000200) /* Write protection of Sector73 */ |
mbed_official | 76:aeb1df146756 | 196 | #define OB_WRP2_Pages1184to1199 ((uint32_t)0x00000400) /* Write protection of Sector74 */ |
mbed_official | 76:aeb1df146756 | 197 | #define OB_WRP2_Pages1200to1215 ((uint32_t)0x00000800) /* Write protection of Sector75 */ |
mbed_official | 76:aeb1df146756 | 198 | #define OB_WRP2_Pages1216to1231 ((uint32_t)0x00001000) /* Write protection of Sector76 */ |
mbed_official | 76:aeb1df146756 | 199 | #define OB_WRP2_Pages1232to1247 ((uint32_t)0x00002000) /* Write protection of Sector77 */ |
mbed_official | 76:aeb1df146756 | 200 | #define OB_WRP2_Pages1248to1263 ((uint32_t)0x00004000) /* Write protection of Sector78 */ |
mbed_official | 76:aeb1df146756 | 201 | #define OB_WRP2_Pages1264to1279 ((uint32_t)0x00008000) /* Write protection of Sector79 */ |
mbed_official | 76:aeb1df146756 | 202 | #define OB_WRP2_Pages1280to1295 ((uint32_t)0x00010000) /* Write protection of Sector80 */ |
mbed_official | 76:aeb1df146756 | 203 | #define OB_WRP2_Pages1296to1311 ((uint32_t)0x00020000) /* Write protection of Sector81 */ |
mbed_official | 76:aeb1df146756 | 204 | #define OB_WRP2_Pages1312to1327 ((uint32_t)0x00040000) /* Write protection of Sector82 */ |
mbed_official | 76:aeb1df146756 | 205 | #define OB_WRP2_Pages1328to1343 ((uint32_t)0x00080000) /* Write protection of Sector83 */ |
mbed_official | 76:aeb1df146756 | 206 | #define OB_WRP2_Pages1344to1359 ((uint32_t)0x00100000) /* Write protection of Sector84 */ |
mbed_official | 76:aeb1df146756 | 207 | #define OB_WRP2_Pages1360to1375 ((uint32_t)0x00200000) /* Write protection of Sector85 */ |
mbed_official | 76:aeb1df146756 | 208 | #define OB_WRP2_Pages1376to1391 ((uint32_t)0x00400000) /* Write protection of Sector86 */ |
mbed_official | 76:aeb1df146756 | 209 | #define OB_WRP2_Pages1392to1407 ((uint32_t)0x00800000) /* Write protection of Sector87 */ |
mbed_official | 76:aeb1df146756 | 210 | #define OB_WRP2_Pages1408to1423 ((uint32_t)0x01000000) /* Write protection of Sector88 */ |
mbed_official | 76:aeb1df146756 | 211 | #define OB_WRP2_Pages1424to1439 ((uint32_t)0x02000000) /* Write protection of Sector89 */ |
mbed_official | 76:aeb1df146756 | 212 | #define OB_WRP2_Pages1440to1455 ((uint32_t)0x04000000) /* Write protection of Sector90 */ |
mbed_official | 76:aeb1df146756 | 213 | #define OB_WRP2_Pages1456to1471 ((uint32_t)0x08000000) /* Write protection of Sector91 */ |
mbed_official | 76:aeb1df146756 | 214 | #define OB_WRP2_Pages1472to1487 ((uint32_t)0x10000000) /* Write protection of Sector92 */ |
mbed_official | 76:aeb1df146756 | 215 | #define OB_WRP2_Pages1488to1503 ((uint32_t)0x20000000) /* Write protection of Sector93 */ |
mbed_official | 76:aeb1df146756 | 216 | #define OB_WRP2_Pages1504to1519 ((uint32_t)0x40000000) /* Write protection of Sector94 */ |
mbed_official | 76:aeb1df146756 | 217 | #define OB_WRP2_Pages1520to1535 ((uint32_t)0x80000000) /* Write protection of Sector95 */ |
mbed_official | 76:aeb1df146756 | 218 | |
mbed_official | 76:aeb1df146756 | 219 | #define OB_WRP2_AllPages ((uint32_t)0xFFFFFFFF) /*!< Write protection of all Sectors */ |
mbed_official | 76:aeb1df146756 | 220 | |
mbed_official | 76:aeb1df146756 | 221 | #define IS_OB_WRP(PAGE) (((PAGE) != 0x0000000)) |
mbed_official | 76:aeb1df146756 | 222 | |
mbed_official | 76:aeb1df146756 | 223 | /** |
mbed_official | 76:aeb1df146756 | 224 | * @} |
mbed_official | 76:aeb1df146756 | 225 | */ |
mbed_official | 76:aeb1df146756 | 226 | |
mbed_official | 76:aeb1df146756 | 227 | |
mbed_official | 76:aeb1df146756 | 228 | /** @defgroup Selection_Protection_Mode |
mbed_official | 76:aeb1df146756 | 229 | * @{ |
mbed_official | 76:aeb1df146756 | 230 | */ |
mbed_official | 76:aeb1df146756 | 231 | #define OB_PcROP_Enable ((uint16_t)0x0100) /*!< Disabled PcROP, nWPRi bits used for Write Protection on sector i */ |
mbed_official | 76:aeb1df146756 | 232 | #define OB_PcROP_Disable ((uint16_t)0x0000) /*!< Enable PcROP, nWPRi bits used for PCRoP Protection on sector i */ |
mbed_official | 76:aeb1df146756 | 233 | #define IS_OB_PCROP_SELECT(OB_PcROP) (((OB_PcROP) == OB_PcROP_Enable) || ((OB_PcROP) == OB_PcROP_Disable)) |
mbed_official | 76:aeb1df146756 | 234 | /** |
mbed_official | 76:aeb1df146756 | 235 | * @} |
mbed_official | 76:aeb1df146756 | 236 | */ |
mbed_official | 76:aeb1df146756 | 237 | |
mbed_official | 76:aeb1df146756 | 238 | |
mbed_official | 76:aeb1df146756 | 239 | /** @defgroup Option_Bytes_Read_Protection |
mbed_official | 76:aeb1df146756 | 240 | * @{ |
mbed_official | 76:aeb1df146756 | 241 | */ |
mbed_official | 76:aeb1df146756 | 242 | |
mbed_official | 76:aeb1df146756 | 243 | /** |
mbed_official | 76:aeb1df146756 | 244 | * @brief Read Protection Level |
mbed_official | 76:aeb1df146756 | 245 | */ |
mbed_official | 76:aeb1df146756 | 246 | #define OB_RDP_Level_0 ((uint8_t)0xAA) |
mbed_official | 76:aeb1df146756 | 247 | #define OB_RDP_Level_1 ((uint8_t)0xBB) |
mbed_official | 76:aeb1df146756 | 248 | /*#define OB_RDP_Level_2 ((uint8_t)0xCC)*/ /* Warning: When enabling read protection level 2 |
mbed_official | 76:aeb1df146756 | 249 | it's no more possible to go back to level 1 or 0 */ |
mbed_official | 76:aeb1df146756 | 250 | |
mbed_official | 76:aeb1df146756 | 251 | #define IS_OB_RDP(LEVEL) (((LEVEL) == OB_RDP_Level_0)||\ |
mbed_official | 76:aeb1df146756 | 252 | ((LEVEL) == OB_RDP_Level_1))/*||\ |
mbed_official | 76:aeb1df146756 | 253 | ((LEVEL) == OB_RDP_Level_2))*/ |
mbed_official | 76:aeb1df146756 | 254 | /** |
mbed_official | 76:aeb1df146756 | 255 | * @} |
mbed_official | 76:aeb1df146756 | 256 | */ |
mbed_official | 76:aeb1df146756 | 257 | |
mbed_official | 76:aeb1df146756 | 258 | /** @defgroup Option_Bytes_IWatchdog |
mbed_official | 76:aeb1df146756 | 259 | * @{ |
mbed_official | 76:aeb1df146756 | 260 | */ |
mbed_official | 76:aeb1df146756 | 261 | |
mbed_official | 76:aeb1df146756 | 262 | #define OB_IWDG_SW ((uint8_t)0x10) /*!< Software WDG selected */ |
mbed_official | 76:aeb1df146756 | 263 | #define OB_IWDG_HW ((uint8_t)0x00) /*!< Hardware WDG selected */ |
mbed_official | 76:aeb1df146756 | 264 | #define IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW)) |
mbed_official | 76:aeb1df146756 | 265 | |
mbed_official | 76:aeb1df146756 | 266 | /** |
mbed_official | 76:aeb1df146756 | 267 | * @} |
mbed_official | 76:aeb1df146756 | 268 | */ |
mbed_official | 76:aeb1df146756 | 269 | |
mbed_official | 76:aeb1df146756 | 270 | /** @defgroup Option_Bytes_nRST_STOP |
mbed_official | 76:aeb1df146756 | 271 | * @{ |
mbed_official | 76:aeb1df146756 | 272 | */ |
mbed_official | 76:aeb1df146756 | 273 | |
mbed_official | 76:aeb1df146756 | 274 | #define OB_STOP_NoRST ((uint8_t)0x20) /*!< No reset generated when entering in STOP */ |
mbed_official | 76:aeb1df146756 | 275 | #define OB_STOP_RST ((uint8_t)0x00) /*!< Reset generated when entering in STOP */ |
mbed_official | 76:aeb1df146756 | 276 | #define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST)) |
mbed_official | 76:aeb1df146756 | 277 | |
mbed_official | 76:aeb1df146756 | 278 | /** |
mbed_official | 76:aeb1df146756 | 279 | * @} |
mbed_official | 76:aeb1df146756 | 280 | */ |
mbed_official | 76:aeb1df146756 | 281 | |
mbed_official | 76:aeb1df146756 | 282 | /** @defgroup Option_Bytes_nRST_STDBY |
mbed_official | 76:aeb1df146756 | 283 | * @{ |
mbed_official | 76:aeb1df146756 | 284 | */ |
mbed_official | 76:aeb1df146756 | 285 | |
mbed_official | 76:aeb1df146756 | 286 | #define OB_STDBY_NoRST ((uint8_t)0x40) /*!< No reset generated when entering in STANDBY */ |
mbed_official | 76:aeb1df146756 | 287 | #define OB_STDBY_RST ((uint8_t)0x00) /*!< Reset generated when entering in STANDBY */ |
mbed_official | 76:aeb1df146756 | 288 | #define IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NoRST) || ((SOURCE) == OB_STDBY_RST)) |
mbed_official | 76:aeb1df146756 | 289 | |
mbed_official | 76:aeb1df146756 | 290 | /** |
mbed_official | 76:aeb1df146756 | 291 | * @} |
mbed_official | 76:aeb1df146756 | 292 | */ |
mbed_official | 76:aeb1df146756 | 293 | |
mbed_official | 76:aeb1df146756 | 294 | /** @defgroup Option_Bytes_BOOT |
mbed_official | 76:aeb1df146756 | 295 | * @{ |
mbed_official | 76:aeb1df146756 | 296 | */ |
mbed_official | 76:aeb1df146756 | 297 | |
mbed_official | 76:aeb1df146756 | 298 | #define OB_BOOT_BANK2 ((uint8_t)0x00) /*!< At startup, if boot pins are set in boot from user Flash position |
mbed_official | 76:aeb1df146756 | 299 | and this parameter is selected the device will boot from Bank 2 |
mbed_official | 76:aeb1df146756 | 300 | or Bank 1, depending on the activation of the bank */ |
mbed_official | 76:aeb1df146756 | 301 | #define OB_BOOT_BANK1 ((uint8_t)0x80) /*!< At startup, if boot pins are set in boot from user Flash position |
mbed_official | 76:aeb1df146756 | 302 | and this parameter is selected the device will boot from Bank1(Default) */ |
mbed_official | 76:aeb1df146756 | 303 | #define IS_OB_BOOT_BANK(BANK) (((BANK) == OB_BOOT_BANK2) || ((BANK) == OB_BOOT_BANK1)) |
mbed_official | 76:aeb1df146756 | 304 | |
mbed_official | 76:aeb1df146756 | 305 | /** |
mbed_official | 76:aeb1df146756 | 306 | * @} |
mbed_official | 76:aeb1df146756 | 307 | */ |
mbed_official | 76:aeb1df146756 | 308 | |
mbed_official | 76:aeb1df146756 | 309 | /** @defgroup Option_Bytes_BOR_Level |
mbed_official | 76:aeb1df146756 | 310 | * @{ |
mbed_official | 76:aeb1df146756 | 311 | */ |
mbed_official | 76:aeb1df146756 | 312 | |
mbed_official | 76:aeb1df146756 | 313 | #define OB_BOR_OFF ((uint8_t)0x00) /*!< BOR is disabled at power down, the reset is asserted when the VDD |
mbed_official | 76:aeb1df146756 | 314 | power supply reaches the PDR(Power Down Reset) threshold (1.5V) */ |
mbed_official | 76:aeb1df146756 | 315 | #define OB_BOR_LEVEL1 ((uint8_t)0x08) /*!< BOR Reset threshold levels for 1.7V - 1.8V VDD power supply */ |
mbed_official | 76:aeb1df146756 | 316 | #define OB_BOR_LEVEL2 ((uint8_t)0x09) /*!< BOR Reset threshold levels for 1.9V - 2.0V VDD power supply */ |
mbed_official | 76:aeb1df146756 | 317 | #define OB_BOR_LEVEL3 ((uint8_t)0x0A) /*!< BOR Reset threshold levels for 2.3V - 2.4V VDD power supply */ |
mbed_official | 76:aeb1df146756 | 318 | #define OB_BOR_LEVEL4 ((uint8_t)0x0B) /*!< BOR Reset threshold levels for 2.55V - 2.65V VDD power supply */ |
mbed_official | 76:aeb1df146756 | 319 | #define OB_BOR_LEVEL5 ((uint8_t)0x0C) /*!< BOR Reset threshold levels for 2.8V - 2.9V VDD power supply */ |
mbed_official | 76:aeb1df146756 | 320 | |
mbed_official | 76:aeb1df146756 | 321 | #define IS_OB_BOR_LEVEL(LEVEL) (((LEVEL) == OB_BOR_OFF) || \ |
mbed_official | 76:aeb1df146756 | 322 | ((LEVEL) == OB_BOR_LEVEL1) || \ |
mbed_official | 76:aeb1df146756 | 323 | ((LEVEL) == OB_BOR_LEVEL2) || \ |
mbed_official | 76:aeb1df146756 | 324 | ((LEVEL) == OB_BOR_LEVEL3) || \ |
mbed_official | 76:aeb1df146756 | 325 | ((LEVEL) == OB_BOR_LEVEL4) || \ |
mbed_official | 76:aeb1df146756 | 326 | ((LEVEL) == OB_BOR_LEVEL5)) |
mbed_official | 76:aeb1df146756 | 327 | |
mbed_official | 76:aeb1df146756 | 328 | /** |
mbed_official | 76:aeb1df146756 | 329 | * @} |
mbed_official | 76:aeb1df146756 | 330 | */ |
mbed_official | 76:aeb1df146756 | 331 | |
mbed_official | 76:aeb1df146756 | 332 | /** @defgroup FLASH_Flags |
mbed_official | 76:aeb1df146756 | 333 | * @{ |
mbed_official | 76:aeb1df146756 | 334 | */ |
mbed_official | 76:aeb1df146756 | 335 | |
mbed_official | 76:aeb1df146756 | 336 | #define FLASH_FLAG_BSY FLASH_SR_BSY /*!< FLASH Busy flag */ |
mbed_official | 76:aeb1df146756 | 337 | #define FLASH_FLAG_EOP FLASH_SR_EOP /*!< FLASH End of Programming flag */ |
mbed_official | 76:aeb1df146756 | 338 | #define FLASH_FLAG_ENDHV FLASH_SR_ENHV /*!< FLASH End of High Voltage flag */ |
mbed_official | 76:aeb1df146756 | 339 | #define FLASH_FLAG_READY FLASH_SR_READY /*!< FLASH Ready flag after low power mode */ |
mbed_official | 76:aeb1df146756 | 340 | #define FLASH_FLAG_WRPERR FLASH_SR_WRPERR /*!< FLASH Write protected error flag */ |
mbed_official | 76:aeb1df146756 | 341 | #define FLASH_FLAG_PGAERR FLASH_SR_PGAERR /*!< FLASH Programming Alignment error flag */ |
mbed_official | 76:aeb1df146756 | 342 | #define FLASH_FLAG_SIZERR FLASH_SR_SIZERR /*!< FLASH Size error flag */ |
mbed_official | 76:aeb1df146756 | 343 | #define FLASH_FLAG_OPTVERR FLASH_SR_OPTVERR /*!< FLASH Option Validity error flag */ |
mbed_official | 76:aeb1df146756 | 344 | #define FLASH_FLAG_OPTVERRUSR FLASH_SR_OPTVERRUSR /*!< FLASH Option User Validity error flag */ |
mbed_official | 76:aeb1df146756 | 345 | #define FLASH_FLAG_RDERR FLASH_SR_RDERR /*!< FLASH Read protected error flag |
mbed_official | 76:aeb1df146756 | 346 | (available only in STM32L1XX_MDP devices) */ |
mbed_official | 76:aeb1df146756 | 347 | |
mbed_official | 76:aeb1df146756 | 348 | #define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFC0FD) == 0x00000000) && ((FLAG) != 0x00000000)) |
mbed_official | 76:aeb1df146756 | 349 | |
mbed_official | 76:aeb1df146756 | 350 | #define IS_FLASH_GET_FLAG(FLAG) (((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_EOP) || \ |
mbed_official | 76:aeb1df146756 | 351 | ((FLAG) == FLASH_FLAG_ENDHV) || ((FLAG) == FLASH_FLAG_READY ) || \ |
mbed_official | 76:aeb1df146756 | 352 | ((FLAG) == FLASH_FLAG_WRPERR) || ((FLAG) == FLASH_FLAG_PGAERR ) || \ |
mbed_official | 76:aeb1df146756 | 353 | ((FLAG) == FLASH_FLAG_SIZERR) || ((FLAG) == FLASH_FLAG_OPTVERR) || \ |
mbed_official | 76:aeb1df146756 | 354 | ((FLAG) == FLASH_FLAG_OPTVERRUSR) || ((FLAG) == FLASH_FLAG_RDERR)) |
mbed_official | 76:aeb1df146756 | 355 | /** |
mbed_official | 76:aeb1df146756 | 356 | * @} |
mbed_official | 76:aeb1df146756 | 357 | */ |
mbed_official | 76:aeb1df146756 | 358 | |
mbed_official | 76:aeb1df146756 | 359 | /** @defgroup FLASH_Keys |
mbed_official | 76:aeb1df146756 | 360 | * @{ |
mbed_official | 76:aeb1df146756 | 361 | */ |
mbed_official | 76:aeb1df146756 | 362 | |
mbed_official | 76:aeb1df146756 | 363 | #define FLASH_PDKEY1 ((uint32_t)0x04152637) /*!< Flash power down key1 */ |
mbed_official | 76:aeb1df146756 | 364 | #define FLASH_PDKEY2 ((uint32_t)0xFAFBFCFD) /*!< Flash power down key2: used with FLASH_PDKEY1 |
mbed_official | 76:aeb1df146756 | 365 | to unlock the RUN_PD bit in FLASH_ACR */ |
mbed_official | 76:aeb1df146756 | 366 | |
mbed_official | 76:aeb1df146756 | 367 | #define FLASH_PEKEY1 ((uint32_t)0x89ABCDEF) /*!< Flash program erase key1 */ |
mbed_official | 76:aeb1df146756 | 368 | #define FLASH_PEKEY2 ((uint32_t)0x02030405) /*!< Flash program erase key: used with FLASH_PEKEY2 |
mbed_official | 76:aeb1df146756 | 369 | to unlock the write access to the FLASH_PECR register and |
mbed_official | 76:aeb1df146756 | 370 | data EEPROM */ |
mbed_official | 76:aeb1df146756 | 371 | |
mbed_official | 76:aeb1df146756 | 372 | #define FLASH_PRGKEY1 ((uint32_t)0x8C9DAEBF) /*!< Flash program memory key1 */ |
mbed_official | 76:aeb1df146756 | 373 | #define FLASH_PRGKEY2 ((uint32_t)0x13141516) /*!< Flash program memory key2: used with FLASH_PRGKEY2 |
mbed_official | 76:aeb1df146756 | 374 | to unlock the program memory */ |
mbed_official | 76:aeb1df146756 | 375 | |
mbed_official | 76:aeb1df146756 | 376 | #define FLASH_OPTKEY1 ((uint32_t)0xFBEAD9C8) /*!< Flash option key1 */ |
mbed_official | 76:aeb1df146756 | 377 | #define FLASH_OPTKEY2 ((uint32_t)0x24252627) /*!< Flash option key2: used with FLASH_OPTKEY1 to |
mbed_official | 76:aeb1df146756 | 378 | unlock the write access to the option byte block */ |
mbed_official | 76:aeb1df146756 | 379 | /** |
mbed_official | 76:aeb1df146756 | 380 | * @} |
mbed_official | 76:aeb1df146756 | 381 | */ |
mbed_official | 76:aeb1df146756 | 382 | |
mbed_official | 76:aeb1df146756 | 383 | /** @defgroup Timeout_definition |
mbed_official | 76:aeb1df146756 | 384 | * @{ |
mbed_official | 76:aeb1df146756 | 385 | */ |
mbed_official | 76:aeb1df146756 | 386 | #define FLASH_ER_PRG_TIMEOUT ((uint32_t)0x8000) |
mbed_official | 76:aeb1df146756 | 387 | |
mbed_official | 76:aeb1df146756 | 388 | /** |
mbed_official | 76:aeb1df146756 | 389 | * @} |
mbed_official | 76:aeb1df146756 | 390 | */ |
mbed_official | 76:aeb1df146756 | 391 | |
mbed_official | 76:aeb1df146756 | 392 | /** @defgroup CMSIS_Legacy |
mbed_official | 76:aeb1df146756 | 393 | * @{ |
mbed_official | 76:aeb1df146756 | 394 | */ |
mbed_official | 76:aeb1df146756 | 395 | #if defined ( __ICCARM__ ) |
mbed_official | 76:aeb1df146756 | 396 | #define InterruptType_ACTLR_DISMCYCINT_Msk IntType_ACTLR_DISMCYCINT_Msk |
mbed_official | 76:aeb1df146756 | 397 | #endif |
mbed_official | 76:aeb1df146756 | 398 | /** |
mbed_official | 76:aeb1df146756 | 399 | * @} |
mbed_official | 76:aeb1df146756 | 400 | */ |
mbed_official | 76:aeb1df146756 | 401 | /** |
mbed_official | 76:aeb1df146756 | 402 | * @} |
mbed_official | 76:aeb1df146756 | 403 | */ |
mbed_official | 76:aeb1df146756 | 404 | |
mbed_official | 76:aeb1df146756 | 405 | /* Exported macro ------------------------------------------------------------*/ |
mbed_official | 76:aeb1df146756 | 406 | /* Exported functions ------------------------------------------------------- */ |
mbed_official | 76:aeb1df146756 | 407 | |
mbed_official | 76:aeb1df146756 | 408 | /** |
mbed_official | 76:aeb1df146756 | 409 | * @brief FLASH memory functions that can be executed from FLASH. |
mbed_official | 76:aeb1df146756 | 410 | */ |
mbed_official | 76:aeb1df146756 | 411 | /* FLASH Interface configuration functions ************************************/ |
mbed_official | 76:aeb1df146756 | 412 | void FLASH_SetLatency(uint32_t FLASH_Latency); |
mbed_official | 76:aeb1df146756 | 413 | void FLASH_PrefetchBufferCmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 414 | void FLASH_ReadAccess64Cmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 415 | void FLASH_SLEEPPowerDownCmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 416 | |
mbed_official | 76:aeb1df146756 | 417 | /* FLASH Memory Programming functions *****************************************/ |
mbed_official | 76:aeb1df146756 | 418 | void FLASH_Unlock(void); |
mbed_official | 76:aeb1df146756 | 419 | void FLASH_Lock(void); |
mbed_official | 76:aeb1df146756 | 420 | FLASH_Status FLASH_ErasePage(uint32_t Page_Address); |
mbed_official | 76:aeb1df146756 | 421 | FLASH_Status FLASH_FastProgramWord(uint32_t Address, uint32_t Data); |
mbed_official | 76:aeb1df146756 | 422 | |
mbed_official | 76:aeb1df146756 | 423 | /* DATA EEPROM Programming functions ******************************************/ |
mbed_official | 76:aeb1df146756 | 424 | void DATA_EEPROM_Unlock(void); |
mbed_official | 76:aeb1df146756 | 425 | void DATA_EEPROM_Lock(void); |
mbed_official | 76:aeb1df146756 | 426 | void DATA_EEPROM_FixedTimeProgramCmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 427 | FLASH_Status DATA_EEPROM_EraseByte(uint32_t Address); |
mbed_official | 76:aeb1df146756 | 428 | FLASH_Status DATA_EEPROM_EraseHalfWord(uint32_t Address); |
mbed_official | 76:aeb1df146756 | 429 | FLASH_Status DATA_EEPROM_EraseWord(uint32_t Address); |
mbed_official | 76:aeb1df146756 | 430 | FLASH_Status DATA_EEPROM_FastProgramByte(uint32_t Address, uint8_t Data); |
mbed_official | 76:aeb1df146756 | 431 | FLASH_Status DATA_EEPROM_FastProgramHalfWord(uint32_t Address, uint16_t Data); |
mbed_official | 76:aeb1df146756 | 432 | FLASH_Status DATA_EEPROM_FastProgramWord(uint32_t Address, uint32_t Data); |
mbed_official | 76:aeb1df146756 | 433 | FLASH_Status DATA_EEPROM_ProgramByte(uint32_t Address, uint8_t Data); |
mbed_official | 76:aeb1df146756 | 434 | FLASH_Status DATA_EEPROM_ProgramHalfWord(uint32_t Address, uint16_t Data); |
mbed_official | 76:aeb1df146756 | 435 | FLASH_Status DATA_EEPROM_ProgramWord(uint32_t Address, uint32_t Data); |
mbed_official | 76:aeb1df146756 | 436 | |
mbed_official | 76:aeb1df146756 | 437 | /* Option Bytes Programming functions *****************************************/ |
mbed_official | 76:aeb1df146756 | 438 | void FLASH_OB_Unlock(void); |
mbed_official | 76:aeb1df146756 | 439 | void FLASH_OB_Lock(void); |
mbed_official | 76:aeb1df146756 | 440 | void FLASH_OB_Launch(void); |
mbed_official | 76:aeb1df146756 | 441 | FLASH_Status FLASH_OB_WRPConfig(uint32_t OB_WRP, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 442 | FLASH_Status FLASH_OB_WRP1Config(uint32_t OB_WRP1, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 443 | FLASH_Status FLASH_OB_WRP2Config(uint32_t OB_WRP2, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 444 | FLASH_Status FLASH_OB_RDPConfig(uint8_t OB_RDP); |
mbed_official | 76:aeb1df146756 | 445 | FLASH_Status FLASH_OB_PCROPConfig(uint32_t OB_WRP, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 446 | FLASH_Status FLASH_OB_PCROP1Config(uint32_t OB_WRP1, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 447 | FLASH_Status FLASH_OB_PCROPSelectionConfig(uint16_t OB_PcROP); |
mbed_official | 76:aeb1df146756 | 448 | FLASH_Status FLASH_OB_UserConfig(uint8_t OB_IWDG, uint8_t OB_STOP, uint8_t OB_STDBY); |
mbed_official | 76:aeb1df146756 | 449 | FLASH_Status FLASH_OB_BORConfig(uint8_t OB_BOR); |
mbed_official | 76:aeb1df146756 | 450 | FLASH_Status FLASH_OB_BootConfig(uint8_t OB_BOOT); |
mbed_official | 76:aeb1df146756 | 451 | uint8_t FLASH_OB_GetUser(void); |
mbed_official | 76:aeb1df146756 | 452 | uint32_t FLASH_OB_GetWRP(void); |
mbed_official | 76:aeb1df146756 | 453 | uint32_t FLASH_OB_GetWRP1(void); |
mbed_official | 76:aeb1df146756 | 454 | uint32_t FLASH_OB_GetWRP2(void); |
mbed_official | 76:aeb1df146756 | 455 | FlagStatus FLASH_OB_GetRDP(void); |
mbed_official | 76:aeb1df146756 | 456 | FlagStatus FLASH_OB_GetSPRMOD(void); |
mbed_official | 76:aeb1df146756 | 457 | uint8_t FLASH_OB_GetBOR(void); |
mbed_official | 76:aeb1df146756 | 458 | |
mbed_official | 76:aeb1df146756 | 459 | /* Interrupts and flags management functions **********************************/ |
mbed_official | 76:aeb1df146756 | 460 | void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 461 | FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG); |
mbed_official | 76:aeb1df146756 | 462 | void FLASH_ClearFlag(uint32_t FLASH_FLAG); |
mbed_official | 76:aeb1df146756 | 463 | FLASH_Status FLASH_GetStatus(void); |
mbed_official | 76:aeb1df146756 | 464 | FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout); |
mbed_official | 76:aeb1df146756 | 465 | |
mbed_official | 76:aeb1df146756 | 466 | /** |
mbed_official | 76:aeb1df146756 | 467 | * @brief FLASH memory functions that should be executed from internal SRAM. |
mbed_official | 76:aeb1df146756 | 468 | * These functions are defined inside the "stm32l1xx_flash_ramfunc.c" |
mbed_official | 76:aeb1df146756 | 469 | * file. |
mbed_official | 76:aeb1df146756 | 470 | */ |
mbed_official | 76:aeb1df146756 | 471 | __RAM_FUNC FLASH_RUNPowerDownCmd(FunctionalState NewState); |
mbed_official | 76:aeb1df146756 | 472 | __RAM_FUNC FLASH_EraseParallelPage(uint32_t Page_Address1, uint32_t Page_Address2); |
mbed_official | 76:aeb1df146756 | 473 | __RAM_FUNC FLASH_ProgramHalfPage(uint32_t Address, uint32_t* pBuffer); |
mbed_official | 76:aeb1df146756 | 474 | __RAM_FUNC FLASH_ProgramParallelHalfPage(uint32_t Address1, uint32_t* pBuffer1, uint32_t Address2, uint32_t* pBuffer2); |
mbed_official | 76:aeb1df146756 | 475 | __RAM_FUNC DATA_EEPROM_EraseDoubleWord(uint32_t Address); |
mbed_official | 76:aeb1df146756 | 476 | __RAM_FUNC DATA_EEPROM_ProgramDoubleWord(uint32_t Address, uint64_t Data); |
mbed_official | 76:aeb1df146756 | 477 | |
mbed_official | 76:aeb1df146756 | 478 | #ifdef __cplusplus |
mbed_official | 76:aeb1df146756 | 479 | } |
mbed_official | 76:aeb1df146756 | 480 | #endif |
mbed_official | 76:aeb1df146756 | 481 | |
mbed_official | 76:aeb1df146756 | 482 | #endif /* __STM32L1xx_FLASH_H */ |
mbed_official | 76:aeb1df146756 | 483 | |
mbed_official | 76:aeb1df146756 | 484 | /** |
mbed_official | 76:aeb1df146756 | 485 | * @} |
mbed_official | 76:aeb1df146756 | 486 | */ |
mbed_official | 76:aeb1df146756 | 487 | |
mbed_official | 76:aeb1df146756 | 488 | /** |
mbed_official | 76:aeb1df146756 | 489 | * @} |
mbed_official | 76:aeb1df146756 | 490 | */ |
mbed_official | 76:aeb1df146756 | 491 | |
mbed_official | 76:aeb1df146756 | 492 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |