Mangue Baja Box

Dependencies:   mbed

Committer:
einsteingustavo
Date:
Mon Jul 29 20:38:00 2019 +0000
Revision:
0:0dee8840a1c0
Mangue Baja Box

Who changed what in which revision?

UserRevisionLine numberNew contents of line
einsteingustavo 0:0dee8840a1c0 1 /**
einsteingustavo 0:0dee8840a1c0 2 ******************************************************************************
einsteingustavo 0:0dee8840a1c0 3 * @file stm32f10x_flash.h
einsteingustavo 0:0dee8840a1c0 4 * @author MCD Application Team
einsteingustavo 0:0dee8840a1c0 5 * @version V3.6.1
einsteingustavo 0:0dee8840a1c0 6 * @date 05-March-2012
einsteingustavo 0:0dee8840a1c0 7 * @brief This file contains all the functions prototypes for the FLASH
einsteingustavo 0:0dee8840a1c0 8 * firmware library.
einsteingustavo 0:0dee8840a1c0 9 *******************************************************************************
einsteingustavo 0:0dee8840a1c0 10 * Copyright (c) 2014, STMicroelectronics
einsteingustavo 0:0dee8840a1c0 11 * All rights reserved.
einsteingustavo 0:0dee8840a1c0 12 *
einsteingustavo 0:0dee8840a1c0 13 * Redistribution and use in source and binary forms, with or without
einsteingustavo 0:0dee8840a1c0 14 * modification, are permitted provided that the following conditions are met:
einsteingustavo 0:0dee8840a1c0 15 *
einsteingustavo 0:0dee8840a1c0 16 * 1. Redistributions of source code must retain the above copyright notice,
einsteingustavo 0:0dee8840a1c0 17 * this list of conditions and the following disclaimer.
einsteingustavo 0:0dee8840a1c0 18 * 2. Redistributions in binary form must reproduce the above copyright notice,
einsteingustavo 0:0dee8840a1c0 19 * this list of conditions and the following disclaimer in the documentation
einsteingustavo 0:0dee8840a1c0 20 * and/or other materials provided with the distribution.
einsteingustavo 0:0dee8840a1c0 21 * 3. Neither the name of STMicroelectronics nor the names of its contributors
einsteingustavo 0:0dee8840a1c0 22 * may be used to endorse or promote products derived from this software
einsteingustavo 0:0dee8840a1c0 23 * without specific prior written permission.
einsteingustavo 0:0dee8840a1c0 24 *
einsteingustavo 0:0dee8840a1c0 25 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
einsteingustavo 0:0dee8840a1c0 26 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
einsteingustavo 0:0dee8840a1c0 27 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
einsteingustavo 0:0dee8840a1c0 28 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
einsteingustavo 0:0dee8840a1c0 29 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
einsteingustavo 0:0dee8840a1c0 30 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
einsteingustavo 0:0dee8840a1c0 31 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
einsteingustavo 0:0dee8840a1c0 32 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
einsteingustavo 0:0dee8840a1c0 33 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
einsteingustavo 0:0dee8840a1c0 34 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
einsteingustavo 0:0dee8840a1c0 35 *******************************************************************************
einsteingustavo 0:0dee8840a1c0 36 */
einsteingustavo 0:0dee8840a1c0 37
einsteingustavo 0:0dee8840a1c0 38 /* Define to prevent recursive inclusion -------------------------------------*/
einsteingustavo 0:0dee8840a1c0 39 #ifndef __STM32F10x_FLASH_H
einsteingustavo 0:0dee8840a1c0 40 #define __STM32F10x_FLASH_H
einsteingustavo 0:0dee8840a1c0 41
einsteingustavo 0:0dee8840a1c0 42 #ifdef __cplusplus
einsteingustavo 0:0dee8840a1c0 43 extern "C" {
einsteingustavo 0:0dee8840a1c0 44 #endif
einsteingustavo 0:0dee8840a1c0 45
einsteingustavo 0:0dee8840a1c0 46 /* Includes ------------------------------------------------------------------*/
einsteingustavo 0:0dee8840a1c0 47 #include "stm32f10x.h"
einsteingustavo 0:0dee8840a1c0 48
einsteingustavo 0:0dee8840a1c0 49 /** @addtogroup STM32F10x_StdPeriph_Driver
einsteingustavo 0:0dee8840a1c0 50 * @{
einsteingustavo 0:0dee8840a1c0 51 */
einsteingustavo 0:0dee8840a1c0 52
einsteingustavo 0:0dee8840a1c0 53 /** @addtogroup FLASH
einsteingustavo 0:0dee8840a1c0 54 * @{
einsteingustavo 0:0dee8840a1c0 55 */
einsteingustavo 0:0dee8840a1c0 56
einsteingustavo 0:0dee8840a1c0 57 /** @defgroup FLASH_Exported_Types
einsteingustavo 0:0dee8840a1c0 58 * @{
einsteingustavo 0:0dee8840a1c0 59 */
einsteingustavo 0:0dee8840a1c0 60
einsteingustavo 0:0dee8840a1c0 61 /**
einsteingustavo 0:0dee8840a1c0 62 * @brief FLASH Status
einsteingustavo 0:0dee8840a1c0 63 */
einsteingustavo 0:0dee8840a1c0 64
einsteingustavo 0:0dee8840a1c0 65 typedef enum
einsteingustavo 0:0dee8840a1c0 66 {
einsteingustavo 0:0dee8840a1c0 67 FLASH_BUSY = 1,
einsteingustavo 0:0dee8840a1c0 68 FLASH_ERROR_PG,
einsteingustavo 0:0dee8840a1c0 69 FLASH_ERROR_WRP,
einsteingustavo 0:0dee8840a1c0 70 FLASH_COMPLETE,
einsteingustavo 0:0dee8840a1c0 71 FLASH_TIMEOUT
einsteingustavo 0:0dee8840a1c0 72 }FLASH_Status;
einsteingustavo 0:0dee8840a1c0 73
einsteingustavo 0:0dee8840a1c0 74 /**
einsteingustavo 0:0dee8840a1c0 75 * @}
einsteingustavo 0:0dee8840a1c0 76 */
einsteingustavo 0:0dee8840a1c0 77
einsteingustavo 0:0dee8840a1c0 78 /** @defgroup FLASH_Exported_Constants
einsteingustavo 0:0dee8840a1c0 79 * @{
einsteingustavo 0:0dee8840a1c0 80 */
einsteingustavo 0:0dee8840a1c0 81
einsteingustavo 0:0dee8840a1c0 82 /** @defgroup Flash_Latency
einsteingustavo 0:0dee8840a1c0 83 * @{
einsteingustavo 0:0dee8840a1c0 84 */
einsteingustavo 0:0dee8840a1c0 85
einsteingustavo 0:0dee8840a1c0 86 #define FLASH_Latency_0 ((uint32_t)0x00000000) /*!< FLASH Zero Latency cycle */
einsteingustavo 0:0dee8840a1c0 87 #define FLASH_Latency_1 ((uint32_t)0x00000001) /*!< FLASH One Latency cycle */
einsteingustavo 0:0dee8840a1c0 88 #define FLASH_Latency_2 ((uint32_t)0x00000002) /*!< FLASH Two Latency cycles */
einsteingustavo 0:0dee8840a1c0 89 #define IS_FLASH_LATENCY(LATENCY) (((LATENCY) == FLASH_Latency_0) || \
einsteingustavo 0:0dee8840a1c0 90 ((LATENCY) == FLASH_Latency_1) || \
einsteingustavo 0:0dee8840a1c0 91 ((LATENCY) == FLASH_Latency_2))
einsteingustavo 0:0dee8840a1c0 92 /**
einsteingustavo 0:0dee8840a1c0 93 * @}
einsteingustavo 0:0dee8840a1c0 94 */
einsteingustavo 0:0dee8840a1c0 95
einsteingustavo 0:0dee8840a1c0 96 /** @defgroup Half_Cycle_Enable_Disable
einsteingustavo 0:0dee8840a1c0 97 * @{
einsteingustavo 0:0dee8840a1c0 98 */
einsteingustavo 0:0dee8840a1c0 99
einsteingustavo 0:0dee8840a1c0 100 #define FLASH_HalfCycleAccess_Enable ((uint32_t)0x00000008) /*!< FLASH Half Cycle Enable */
einsteingustavo 0:0dee8840a1c0 101 #define FLASH_HalfCycleAccess_Disable ((uint32_t)0x00000000) /*!< FLASH Half Cycle Disable */
einsteingustavo 0:0dee8840a1c0 102 #define IS_FLASH_HALFCYCLEACCESS_STATE(STATE) (((STATE) == FLASH_HalfCycleAccess_Enable) || \
einsteingustavo 0:0dee8840a1c0 103 ((STATE) == FLASH_HalfCycleAccess_Disable))
einsteingustavo 0:0dee8840a1c0 104 /**
einsteingustavo 0:0dee8840a1c0 105 * @}
einsteingustavo 0:0dee8840a1c0 106 */
einsteingustavo 0:0dee8840a1c0 107
einsteingustavo 0:0dee8840a1c0 108 /** @defgroup Prefetch_Buffer_Enable_Disable
einsteingustavo 0:0dee8840a1c0 109 * @{
einsteingustavo 0:0dee8840a1c0 110 */
einsteingustavo 0:0dee8840a1c0 111
einsteingustavo 0:0dee8840a1c0 112 #define FLASH_PrefetchBuffer_Enable ((uint32_t)0x00000010) /*!< FLASH Prefetch Buffer Enable */
einsteingustavo 0:0dee8840a1c0 113 #define FLASH_PrefetchBuffer_Disable ((uint32_t)0x00000000) /*!< FLASH Prefetch Buffer Disable */
einsteingustavo 0:0dee8840a1c0 114 #define IS_FLASH_PREFETCHBUFFER_STATE(STATE) (((STATE) == FLASH_PrefetchBuffer_Enable) || \
einsteingustavo 0:0dee8840a1c0 115 ((STATE) == FLASH_PrefetchBuffer_Disable))
einsteingustavo 0:0dee8840a1c0 116 /**
einsteingustavo 0:0dee8840a1c0 117 * @}
einsteingustavo 0:0dee8840a1c0 118 */
einsteingustavo 0:0dee8840a1c0 119
einsteingustavo 0:0dee8840a1c0 120 /** @defgroup Option_Bytes_Write_Protection
einsteingustavo 0:0dee8840a1c0 121 * @{
einsteingustavo 0:0dee8840a1c0 122 */
einsteingustavo 0:0dee8840a1c0 123
einsteingustavo 0:0dee8840a1c0 124 /* Values to be used with STM32 Low and Medium density devices */
einsteingustavo 0:0dee8840a1c0 125 #define FLASH_WRProt_Pages0to3 ((uint32_t)0x00000001) /*!< STM32 Low and Medium density devices: Write protection of page 0 to 3 */
einsteingustavo 0:0dee8840a1c0 126 #define FLASH_WRProt_Pages4to7 ((uint32_t)0x00000002) /*!< STM32 Low and Medium density devices: Write protection of page 4 to 7 */
einsteingustavo 0:0dee8840a1c0 127 #define FLASH_WRProt_Pages8to11 ((uint32_t)0x00000004) /*!< STM32 Low and Medium density devices: Write protection of page 8 to 11 */
einsteingustavo 0:0dee8840a1c0 128 #define FLASH_WRProt_Pages12to15 ((uint32_t)0x00000008) /*!< STM32 Low and Medium density devices: Write protection of page 12 to 15 */
einsteingustavo 0:0dee8840a1c0 129 #define FLASH_WRProt_Pages16to19 ((uint32_t)0x00000010) /*!< STM32 Low and Medium density devices: Write protection of page 16 to 19 */
einsteingustavo 0:0dee8840a1c0 130 #define FLASH_WRProt_Pages20to23 ((uint32_t)0x00000020) /*!< STM32 Low and Medium density devices: Write protection of page 20 to 23 */
einsteingustavo 0:0dee8840a1c0 131 #define FLASH_WRProt_Pages24to27 ((uint32_t)0x00000040) /*!< STM32 Low and Medium density devices: Write protection of page 24 to 27 */
einsteingustavo 0:0dee8840a1c0 132 #define FLASH_WRProt_Pages28to31 ((uint32_t)0x00000080) /*!< STM32 Low and Medium density devices: Write protection of page 28 to 31 */
einsteingustavo 0:0dee8840a1c0 133
einsteingustavo 0:0dee8840a1c0 134 /* Values to be used with STM32 Medium-density devices */
einsteingustavo 0:0dee8840a1c0 135 #define FLASH_WRProt_Pages32to35 ((uint32_t)0x00000100) /*!< STM32 Medium-density devices: Write protection of page 32 to 35 */
einsteingustavo 0:0dee8840a1c0 136 #define FLASH_WRProt_Pages36to39 ((uint32_t)0x00000200) /*!< STM32 Medium-density devices: Write protection of page 36 to 39 */
einsteingustavo 0:0dee8840a1c0 137 #define FLASH_WRProt_Pages40to43 ((uint32_t)0x00000400) /*!< STM32 Medium-density devices: Write protection of page 40 to 43 */
einsteingustavo 0:0dee8840a1c0 138 #define FLASH_WRProt_Pages44to47 ((uint32_t)0x00000800) /*!< STM32 Medium-density devices: Write protection of page 44 to 47 */
einsteingustavo 0:0dee8840a1c0 139 #define FLASH_WRProt_Pages48to51 ((uint32_t)0x00001000) /*!< STM32 Medium-density devices: Write protection of page 48 to 51 */
einsteingustavo 0:0dee8840a1c0 140 #define FLASH_WRProt_Pages52to55 ((uint32_t)0x00002000) /*!< STM32 Medium-density devices: Write protection of page 52 to 55 */
einsteingustavo 0:0dee8840a1c0 141 #define FLASH_WRProt_Pages56to59 ((uint32_t)0x00004000) /*!< STM32 Medium-density devices: Write protection of page 56 to 59 */
einsteingustavo 0:0dee8840a1c0 142 #define FLASH_WRProt_Pages60to63 ((uint32_t)0x00008000) /*!< STM32 Medium-density devices: Write protection of page 60 to 63 */
einsteingustavo 0:0dee8840a1c0 143 #define FLASH_WRProt_Pages64to67 ((uint32_t)0x00010000) /*!< STM32 Medium-density devices: Write protection of page 64 to 67 */
einsteingustavo 0:0dee8840a1c0 144 #define FLASH_WRProt_Pages68to71 ((uint32_t)0x00020000) /*!< STM32 Medium-density devices: Write protection of page 68 to 71 */
einsteingustavo 0:0dee8840a1c0 145 #define FLASH_WRProt_Pages72to75 ((uint32_t)0x00040000) /*!< STM32 Medium-density devices: Write protection of page 72 to 75 */
einsteingustavo 0:0dee8840a1c0 146 #define FLASH_WRProt_Pages76to79 ((uint32_t)0x00080000) /*!< STM32 Medium-density devices: Write protection of page 76 to 79 */
einsteingustavo 0:0dee8840a1c0 147 #define FLASH_WRProt_Pages80to83 ((uint32_t)0x00100000) /*!< STM32 Medium-density devices: Write protection of page 80 to 83 */
einsteingustavo 0:0dee8840a1c0 148 #define FLASH_WRProt_Pages84to87 ((uint32_t)0x00200000) /*!< STM32 Medium-density devices: Write protection of page 84 to 87 */
einsteingustavo 0:0dee8840a1c0 149 #define FLASH_WRProt_Pages88to91 ((uint32_t)0x00400000) /*!< STM32 Medium-density devices: Write protection of page 88 to 91 */
einsteingustavo 0:0dee8840a1c0 150 #define FLASH_WRProt_Pages92to95 ((uint32_t)0x00800000) /*!< STM32 Medium-density devices: Write protection of page 92 to 95 */
einsteingustavo 0:0dee8840a1c0 151 #define FLASH_WRProt_Pages96to99 ((uint32_t)0x01000000) /*!< STM32 Medium-density devices: Write protection of page 96 to 99 */
einsteingustavo 0:0dee8840a1c0 152 #define FLASH_WRProt_Pages100to103 ((uint32_t)0x02000000) /*!< STM32 Medium-density devices: Write protection of page 100 to 103 */
einsteingustavo 0:0dee8840a1c0 153 #define FLASH_WRProt_Pages104to107 ((uint32_t)0x04000000) /*!< STM32 Medium-density devices: Write protection of page 104 to 107 */
einsteingustavo 0:0dee8840a1c0 154 #define FLASH_WRProt_Pages108to111 ((uint32_t)0x08000000) /*!< STM32 Medium-density devices: Write protection of page 108 to 111 */
einsteingustavo 0:0dee8840a1c0 155 #define FLASH_WRProt_Pages112to115 ((uint32_t)0x10000000) /*!< STM32 Medium-density devices: Write protection of page 112 to 115 */
einsteingustavo 0:0dee8840a1c0 156 #define FLASH_WRProt_Pages116to119 ((uint32_t)0x20000000) /*!< STM32 Medium-density devices: Write protection of page 115 to 119 */
einsteingustavo 0:0dee8840a1c0 157 #define FLASH_WRProt_Pages120to123 ((uint32_t)0x40000000) /*!< STM32 Medium-density devices: Write protection of page 120 to 123 */
einsteingustavo 0:0dee8840a1c0 158 #define FLASH_WRProt_Pages124to127 ((uint32_t)0x80000000) /*!< STM32 Medium-density devices: Write protection of page 124 to 127 */
einsteingustavo 0:0dee8840a1c0 159
einsteingustavo 0:0dee8840a1c0 160 /* Values to be used with STM32 High-density and STM32F10X Connectivity line devices */
einsteingustavo 0:0dee8840a1c0 161 #define FLASH_WRProt_Pages0to1 ((uint32_t)0x00000001) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 162 Write protection of page 0 to 1 */
einsteingustavo 0:0dee8840a1c0 163 #define FLASH_WRProt_Pages2to3 ((uint32_t)0x00000002) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 164 Write protection of page 2 to 3 */
einsteingustavo 0:0dee8840a1c0 165 #define FLASH_WRProt_Pages4to5 ((uint32_t)0x00000004) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 166 Write protection of page 4 to 5 */
einsteingustavo 0:0dee8840a1c0 167 #define FLASH_WRProt_Pages6to7 ((uint32_t)0x00000008) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 168 Write protection of page 6 to 7 */
einsteingustavo 0:0dee8840a1c0 169 #define FLASH_WRProt_Pages8to9 ((uint32_t)0x00000010) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 170 Write protection of page 8 to 9 */
einsteingustavo 0:0dee8840a1c0 171 #define FLASH_WRProt_Pages10to11 ((uint32_t)0x00000020) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 172 Write protection of page 10 to 11 */
einsteingustavo 0:0dee8840a1c0 173 #define FLASH_WRProt_Pages12to13 ((uint32_t)0x00000040) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 174 Write protection of page 12 to 13 */
einsteingustavo 0:0dee8840a1c0 175 #define FLASH_WRProt_Pages14to15 ((uint32_t)0x00000080) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 176 Write protection of page 14 to 15 */
einsteingustavo 0:0dee8840a1c0 177 #define FLASH_WRProt_Pages16to17 ((uint32_t)0x00000100) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 178 Write protection of page 16 to 17 */
einsteingustavo 0:0dee8840a1c0 179 #define FLASH_WRProt_Pages18to19 ((uint32_t)0x00000200) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 180 Write protection of page 18 to 19 */
einsteingustavo 0:0dee8840a1c0 181 #define FLASH_WRProt_Pages20to21 ((uint32_t)0x00000400) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 182 Write protection of page 20 to 21 */
einsteingustavo 0:0dee8840a1c0 183 #define FLASH_WRProt_Pages22to23 ((uint32_t)0x00000800) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 184 Write protection of page 22 to 23 */
einsteingustavo 0:0dee8840a1c0 185 #define FLASH_WRProt_Pages24to25 ((uint32_t)0x00001000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 186 Write protection of page 24 to 25 */
einsteingustavo 0:0dee8840a1c0 187 #define FLASH_WRProt_Pages26to27 ((uint32_t)0x00002000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 188 Write protection of page 26 to 27 */
einsteingustavo 0:0dee8840a1c0 189 #define FLASH_WRProt_Pages28to29 ((uint32_t)0x00004000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 190 Write protection of page 28 to 29 */
einsteingustavo 0:0dee8840a1c0 191 #define FLASH_WRProt_Pages30to31 ((uint32_t)0x00008000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 192 Write protection of page 30 to 31 */
einsteingustavo 0:0dee8840a1c0 193 #define FLASH_WRProt_Pages32to33 ((uint32_t)0x00010000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 194 Write protection of page 32 to 33 */
einsteingustavo 0:0dee8840a1c0 195 #define FLASH_WRProt_Pages34to35 ((uint32_t)0x00020000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 196 Write protection of page 34 to 35 */
einsteingustavo 0:0dee8840a1c0 197 #define FLASH_WRProt_Pages36to37 ((uint32_t)0x00040000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 198 Write protection of page 36 to 37 */
einsteingustavo 0:0dee8840a1c0 199 #define FLASH_WRProt_Pages38to39 ((uint32_t)0x00080000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 200 Write protection of page 38 to 39 */
einsteingustavo 0:0dee8840a1c0 201 #define FLASH_WRProt_Pages40to41 ((uint32_t)0x00100000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 202 Write protection of page 40 to 41 */
einsteingustavo 0:0dee8840a1c0 203 #define FLASH_WRProt_Pages42to43 ((uint32_t)0x00200000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 204 Write protection of page 42 to 43 */
einsteingustavo 0:0dee8840a1c0 205 #define FLASH_WRProt_Pages44to45 ((uint32_t)0x00400000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 206 Write protection of page 44 to 45 */
einsteingustavo 0:0dee8840a1c0 207 #define FLASH_WRProt_Pages46to47 ((uint32_t)0x00800000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 208 Write protection of page 46 to 47 */
einsteingustavo 0:0dee8840a1c0 209 #define FLASH_WRProt_Pages48to49 ((uint32_t)0x01000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 210 Write protection of page 48 to 49 */
einsteingustavo 0:0dee8840a1c0 211 #define FLASH_WRProt_Pages50to51 ((uint32_t)0x02000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 212 Write protection of page 50 to 51 */
einsteingustavo 0:0dee8840a1c0 213 #define FLASH_WRProt_Pages52to53 ((uint32_t)0x04000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 214 Write protection of page 52 to 53 */
einsteingustavo 0:0dee8840a1c0 215 #define FLASH_WRProt_Pages54to55 ((uint32_t)0x08000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 216 Write protection of page 54 to 55 */
einsteingustavo 0:0dee8840a1c0 217 #define FLASH_WRProt_Pages56to57 ((uint32_t)0x10000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 218 Write protection of page 56 to 57 */
einsteingustavo 0:0dee8840a1c0 219 #define FLASH_WRProt_Pages58to59 ((uint32_t)0x20000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 220 Write protection of page 58 to 59 */
einsteingustavo 0:0dee8840a1c0 221 #define FLASH_WRProt_Pages60to61 ((uint32_t)0x40000000) /*!< STM32 High-density, XL-density and Connectivity line devices:
einsteingustavo 0:0dee8840a1c0 222 Write protection of page 60 to 61 */
einsteingustavo 0:0dee8840a1c0 223 #define FLASH_WRProt_Pages62to127 ((uint32_t)0x80000000) /*!< STM32 Connectivity line devices: Write protection of page 62 to 127 */
einsteingustavo 0:0dee8840a1c0 224 #define FLASH_WRProt_Pages62to255 ((uint32_t)0x80000000) /*!< STM32 Medium-density devices: Write protection of page 62 to 255 */
einsteingustavo 0:0dee8840a1c0 225 #define FLASH_WRProt_Pages62to511 ((uint32_t)0x80000000) /*!< STM32 XL-density devices: Write protection of page 62 to 511 */
einsteingustavo 0:0dee8840a1c0 226
einsteingustavo 0:0dee8840a1c0 227 #define FLASH_WRProt_AllPages ((uint32_t)0xFFFFFFFF) /*!< Write protection of all Pages */
einsteingustavo 0:0dee8840a1c0 228
einsteingustavo 0:0dee8840a1c0 229 #define IS_FLASH_WRPROT_PAGE(PAGE) (((PAGE) != 0x00000000))
einsteingustavo 0:0dee8840a1c0 230
einsteingustavo 0:0dee8840a1c0 231 #define IS_FLASH_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) < 0x080FFFFF))
einsteingustavo 0:0dee8840a1c0 232
einsteingustavo 0:0dee8840a1c0 233 #define IS_OB_DATA_ADDRESS(ADDRESS) (((ADDRESS) == 0x1FFFF804) || ((ADDRESS) == 0x1FFFF806))
einsteingustavo 0:0dee8840a1c0 234
einsteingustavo 0:0dee8840a1c0 235 /**
einsteingustavo 0:0dee8840a1c0 236 * @}
einsteingustavo 0:0dee8840a1c0 237 */
einsteingustavo 0:0dee8840a1c0 238
einsteingustavo 0:0dee8840a1c0 239 /** @defgroup Option_Bytes_IWatchdog
einsteingustavo 0:0dee8840a1c0 240 * @{
einsteingustavo 0:0dee8840a1c0 241 */
einsteingustavo 0:0dee8840a1c0 242
einsteingustavo 0:0dee8840a1c0 243 #define OB_IWDG_SW ((uint16_t)0x0001) /*!< Software IWDG selected */
einsteingustavo 0:0dee8840a1c0 244 #define OB_IWDG_HW ((uint16_t)0x0000) /*!< Hardware IWDG selected */
einsteingustavo 0:0dee8840a1c0 245 #define IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW))
einsteingustavo 0:0dee8840a1c0 246
einsteingustavo 0:0dee8840a1c0 247 /**
einsteingustavo 0:0dee8840a1c0 248 * @}
einsteingustavo 0:0dee8840a1c0 249 */
einsteingustavo 0:0dee8840a1c0 250
einsteingustavo 0:0dee8840a1c0 251 /** @defgroup Option_Bytes_nRST_STOP
einsteingustavo 0:0dee8840a1c0 252 * @{
einsteingustavo 0:0dee8840a1c0 253 */
einsteingustavo 0:0dee8840a1c0 254
einsteingustavo 0:0dee8840a1c0 255 #define OB_STOP_NoRST ((uint16_t)0x0002) /*!< No reset generated when entering in STOP */
einsteingustavo 0:0dee8840a1c0 256 #define OB_STOP_RST ((uint16_t)0x0000) /*!< Reset generated when entering in STOP */
einsteingustavo 0:0dee8840a1c0 257 #define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NoRST) || ((SOURCE) == OB_STOP_RST))
einsteingustavo 0:0dee8840a1c0 258
einsteingustavo 0:0dee8840a1c0 259 /**
einsteingustavo 0:0dee8840a1c0 260 * @}
einsteingustavo 0:0dee8840a1c0 261 */
einsteingustavo 0:0dee8840a1c0 262
einsteingustavo 0:0dee8840a1c0 263 /** @defgroup Option_Bytes_nRST_STDBY
einsteingustavo 0:0dee8840a1c0 264 * @{
einsteingustavo 0:0dee8840a1c0 265 */
einsteingustavo 0:0dee8840a1c0 266
einsteingustavo 0:0dee8840a1c0 267 #define OB_STDBY_NoRST ((uint16_t)0x0004) /*!< No reset generated when entering in STANDBY */
einsteingustavo 0:0dee8840a1c0 268 #define OB_STDBY_RST ((uint16_t)0x0000) /*!< Reset generated when entering in STANDBY */
einsteingustavo 0:0dee8840a1c0 269 #define IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NoRST) || ((SOURCE) == OB_STDBY_RST))
einsteingustavo 0:0dee8840a1c0 270
einsteingustavo 0:0dee8840a1c0 271 #ifdef STM32F10X_XL
einsteingustavo 0:0dee8840a1c0 272 /**
einsteingustavo 0:0dee8840a1c0 273 * @}
einsteingustavo 0:0dee8840a1c0 274 */
einsteingustavo 0:0dee8840a1c0 275 /** @defgroup FLASH_Boot
einsteingustavo 0:0dee8840a1c0 276 * @{
einsteingustavo 0:0dee8840a1c0 277 */
einsteingustavo 0:0dee8840a1c0 278 #define FLASH_BOOT_Bank1 ((uint16_t)0x0000) /*!< At startup, if boot pins are set in boot from user Flash position
einsteingustavo 0:0dee8840a1c0 279 and this parameter is selected the device will boot from Bank1(Default) */
einsteingustavo 0:0dee8840a1c0 280 #define FLASH_BOOT_Bank2 ((uint16_t)0x0001) /*!< At startup, if boot pins are set in boot from user Flash position
einsteingustavo 0:0dee8840a1c0 281 and this parameter is selected the device will boot from Bank 2 or Bank 1,
einsteingustavo 0:0dee8840a1c0 282 depending on the activation of the bank */
einsteingustavo 0:0dee8840a1c0 283 #define IS_FLASH_BOOT(BOOT) (((BOOT) == FLASH_BOOT_Bank1) || ((BOOT) == FLASH_BOOT_Bank2))
einsteingustavo 0:0dee8840a1c0 284 #endif
einsteingustavo 0:0dee8840a1c0 285 /**
einsteingustavo 0:0dee8840a1c0 286 * @}
einsteingustavo 0:0dee8840a1c0 287 */
einsteingustavo 0:0dee8840a1c0 288 /** @defgroup FLASH_Interrupts
einsteingustavo 0:0dee8840a1c0 289 * @{
einsteingustavo 0:0dee8840a1c0 290 */
einsteingustavo 0:0dee8840a1c0 291 #ifdef STM32F10X_XL
einsteingustavo 0:0dee8840a1c0 292 #define FLASH_IT_BANK2_ERROR ((uint32_t)0x80000400) /*!< FPEC BANK2 error interrupt source */
einsteingustavo 0:0dee8840a1c0 293 #define FLASH_IT_BANK2_EOP ((uint32_t)0x80001000) /*!< End of FLASH BANK2 Operation Interrupt source */
einsteingustavo 0:0dee8840a1c0 294
einsteingustavo 0:0dee8840a1c0 295 #define FLASH_IT_BANK1_ERROR FLASH_IT_ERROR /*!< FPEC BANK1 error interrupt source */
einsteingustavo 0:0dee8840a1c0 296 #define FLASH_IT_BANK1_EOP FLASH_IT_EOP /*!< End of FLASH BANK1 Operation Interrupt source */
einsteingustavo 0:0dee8840a1c0 297
einsteingustavo 0:0dee8840a1c0 298 #define FLASH_IT_ERROR ((uint32_t)0x00000400) /*!< FPEC BANK1 error interrupt source */
einsteingustavo 0:0dee8840a1c0 299 #define FLASH_IT_EOP ((uint32_t)0x00001000) /*!< End of FLASH BANK1 Operation Interrupt source */
einsteingustavo 0:0dee8840a1c0 300 #define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0x7FFFEBFF) == 0x00000000) && (((IT) != 0x00000000)))
einsteingustavo 0:0dee8840a1c0 301 #else
einsteingustavo 0:0dee8840a1c0 302 #define FLASH_IT_ERROR ((uint32_t)0x00000400) /*!< FPEC error interrupt source */
einsteingustavo 0:0dee8840a1c0 303 #define FLASH_IT_EOP ((uint32_t)0x00001000) /*!< End of FLASH Operation Interrupt source */
einsteingustavo 0:0dee8840a1c0 304 #define FLASH_IT_BANK1_ERROR FLASH_IT_ERROR /*!< FPEC BANK1 error interrupt source */
einsteingustavo 0:0dee8840a1c0 305 #define FLASH_IT_BANK1_EOP FLASH_IT_EOP /*!< End of FLASH BANK1 Operation Interrupt source */
einsteingustavo 0:0dee8840a1c0 306
einsteingustavo 0:0dee8840a1c0 307 #define IS_FLASH_IT(IT) ((((IT) & (uint32_t)0xFFFFEBFF) == 0x00000000) && (((IT) != 0x00000000)))
einsteingustavo 0:0dee8840a1c0 308 #endif
einsteingustavo 0:0dee8840a1c0 309
einsteingustavo 0:0dee8840a1c0 310 /**
einsteingustavo 0:0dee8840a1c0 311 * @}
einsteingustavo 0:0dee8840a1c0 312 */
einsteingustavo 0:0dee8840a1c0 313
einsteingustavo 0:0dee8840a1c0 314 /** @defgroup FLASH_Flags
einsteingustavo 0:0dee8840a1c0 315 * @{
einsteingustavo 0:0dee8840a1c0 316 */
einsteingustavo 0:0dee8840a1c0 317 #ifdef STM32F10X_XL
einsteingustavo 0:0dee8840a1c0 318 #define FLASH_FLAG_BANK2_BSY ((uint32_t)0x80000001) /*!< FLASH BANK2 Busy flag */
einsteingustavo 0:0dee8840a1c0 319 #define FLASH_FLAG_BANK2_EOP ((uint32_t)0x80000020) /*!< FLASH BANK2 End of Operation flag */
einsteingustavo 0:0dee8840a1c0 320 #define FLASH_FLAG_BANK2_PGERR ((uint32_t)0x80000004) /*!< FLASH BANK2 Program error flag */
einsteingustavo 0:0dee8840a1c0 321 #define FLASH_FLAG_BANK2_WRPRTERR ((uint32_t)0x80000010) /*!< FLASH BANK2 Write protected error flag */
einsteingustavo 0:0dee8840a1c0 322
einsteingustavo 0:0dee8840a1c0 323 #define FLASH_FLAG_BANK1_BSY FLASH_FLAG_BSY /*!< FLASH BANK1 Busy flag*/
einsteingustavo 0:0dee8840a1c0 324 #define FLASH_FLAG_BANK1_EOP FLASH_FLAG_EOP /*!< FLASH BANK1 End of Operation flag */
einsteingustavo 0:0dee8840a1c0 325 #define FLASH_FLAG_BANK1_PGERR FLASH_FLAG_PGERR /*!< FLASH BANK1 Program error flag */
einsteingustavo 0:0dee8840a1c0 326 #define FLASH_FLAG_BANK1_WRPRTERR FLASH_FLAG_WRPRTERR /*!< FLASH BANK1 Write protected error flag */
einsteingustavo 0:0dee8840a1c0 327
einsteingustavo 0:0dee8840a1c0 328 #define FLASH_FLAG_BSY ((uint32_t)0x00000001) /*!< FLASH Busy flag */
einsteingustavo 0:0dee8840a1c0 329 #define FLASH_FLAG_EOP ((uint32_t)0x00000020) /*!< FLASH End of Operation flag */
einsteingustavo 0:0dee8840a1c0 330 #define FLASH_FLAG_PGERR ((uint32_t)0x00000004) /*!< FLASH Program error flag */
einsteingustavo 0:0dee8840a1c0 331 #define FLASH_FLAG_WRPRTERR ((uint32_t)0x00000010) /*!< FLASH Write protected error flag */
einsteingustavo 0:0dee8840a1c0 332 #define FLASH_FLAG_OPTERR ((uint32_t)0x00000001) /*!< FLASH Option Byte error flag */
einsteingustavo 0:0dee8840a1c0 333
einsteingustavo 0:0dee8840a1c0 334 #define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0x7FFFFFCA) == 0x00000000) && ((FLAG) != 0x00000000))
einsteingustavo 0:0dee8840a1c0 335 #define IS_FLASH_GET_FLAG(FLAG) (((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_EOP) || \
einsteingustavo 0:0dee8840a1c0 336 ((FLAG) == FLASH_FLAG_PGERR) || ((FLAG) == FLASH_FLAG_WRPRTERR) || \
einsteingustavo 0:0dee8840a1c0 337 ((FLAG) == FLASH_FLAG_OPTERR)|| \
einsteingustavo 0:0dee8840a1c0 338 ((FLAG) == FLASH_FLAG_BANK1_BSY) || ((FLAG) == FLASH_FLAG_BANK1_EOP) || \
einsteingustavo 0:0dee8840a1c0 339 ((FLAG) == FLASH_FLAG_BANK1_PGERR) || ((FLAG) == FLASH_FLAG_BANK1_WRPRTERR) || \
einsteingustavo 0:0dee8840a1c0 340 ((FLAG) == FLASH_FLAG_BANK2_BSY) || ((FLAG) == FLASH_FLAG_BANK2_EOP) || \
einsteingustavo 0:0dee8840a1c0 341 ((FLAG) == FLASH_FLAG_BANK2_PGERR) || ((FLAG) == FLASH_FLAG_BANK2_WRPRTERR))
einsteingustavo 0:0dee8840a1c0 342 #else
einsteingustavo 0:0dee8840a1c0 343 #define FLASH_FLAG_BSY ((uint32_t)0x00000001) /*!< FLASH Busy flag */
einsteingustavo 0:0dee8840a1c0 344 #define FLASH_FLAG_EOP ((uint32_t)0x00000020) /*!< FLASH End of Operation flag */
einsteingustavo 0:0dee8840a1c0 345 #define FLASH_FLAG_PGERR ((uint32_t)0x00000004) /*!< FLASH Program error flag */
einsteingustavo 0:0dee8840a1c0 346 #define FLASH_FLAG_WRPRTERR ((uint32_t)0x00000010) /*!< FLASH Write protected error flag */
einsteingustavo 0:0dee8840a1c0 347 #define FLASH_FLAG_OPTERR ((uint32_t)0x00000001) /*!< FLASH Option Byte error flag */
einsteingustavo 0:0dee8840a1c0 348
einsteingustavo 0:0dee8840a1c0 349 #define FLASH_FLAG_BANK1_BSY FLASH_FLAG_BSY /*!< FLASH BANK1 Busy flag*/
einsteingustavo 0:0dee8840a1c0 350 #define FLASH_FLAG_BANK1_EOP FLASH_FLAG_EOP /*!< FLASH BANK1 End of Operation flag */
einsteingustavo 0:0dee8840a1c0 351 #define FLASH_FLAG_BANK1_PGERR FLASH_FLAG_PGERR /*!< FLASH BANK1 Program error flag */
einsteingustavo 0:0dee8840a1c0 352 #define FLASH_FLAG_BANK1_WRPRTERR FLASH_FLAG_WRPRTERR /*!< FLASH BANK1 Write protected error flag */
einsteingustavo 0:0dee8840a1c0 353
einsteingustavo 0:0dee8840a1c0 354 #define IS_FLASH_CLEAR_FLAG(FLAG) ((((FLAG) & (uint32_t)0xFFFFFFCA) == 0x00000000) && ((FLAG) != 0x00000000))
einsteingustavo 0:0dee8840a1c0 355 #define IS_FLASH_GET_FLAG(FLAG) (((FLAG) == FLASH_FLAG_BSY) || ((FLAG) == FLASH_FLAG_EOP) || \
einsteingustavo 0:0dee8840a1c0 356 ((FLAG) == FLASH_FLAG_PGERR) || ((FLAG) == FLASH_FLAG_WRPRTERR) || \
einsteingustavo 0:0dee8840a1c0 357 ((FLAG) == FLASH_FLAG_BANK1_BSY) || ((FLAG) == FLASH_FLAG_BANK1_EOP) || \
einsteingustavo 0:0dee8840a1c0 358 ((FLAG) == FLASH_FLAG_BANK1_PGERR) || ((FLAG) == FLASH_FLAG_BANK1_WRPRTERR) || \
einsteingustavo 0:0dee8840a1c0 359 ((FLAG) == FLASH_FLAG_OPTERR))
einsteingustavo 0:0dee8840a1c0 360 #endif
einsteingustavo 0:0dee8840a1c0 361
einsteingustavo 0:0dee8840a1c0 362 /**
einsteingustavo 0:0dee8840a1c0 363 * @}
einsteingustavo 0:0dee8840a1c0 364 */
einsteingustavo 0:0dee8840a1c0 365
einsteingustavo 0:0dee8840a1c0 366 /**
einsteingustavo 0:0dee8840a1c0 367 * @}
einsteingustavo 0:0dee8840a1c0 368 */
einsteingustavo 0:0dee8840a1c0 369
einsteingustavo 0:0dee8840a1c0 370 /** @defgroup FLASH_Exported_Macros
einsteingustavo 0:0dee8840a1c0 371 * @{
einsteingustavo 0:0dee8840a1c0 372 */
einsteingustavo 0:0dee8840a1c0 373
einsteingustavo 0:0dee8840a1c0 374 /**
einsteingustavo 0:0dee8840a1c0 375 * @}
einsteingustavo 0:0dee8840a1c0 376 */
einsteingustavo 0:0dee8840a1c0 377
einsteingustavo 0:0dee8840a1c0 378 /** @defgroup FLASH_Exported_Functions
einsteingustavo 0:0dee8840a1c0 379 * @{
einsteingustavo 0:0dee8840a1c0 380 */
einsteingustavo 0:0dee8840a1c0 381
einsteingustavo 0:0dee8840a1c0 382 /*------------ Functions used for all STM32F10x devices -----*/
einsteingustavo 0:0dee8840a1c0 383 void FLASH_SetLatency(uint32_t FLASH_Latency);
einsteingustavo 0:0dee8840a1c0 384 void FLASH_HalfCycleAccessCmd(uint32_t FLASH_HalfCycleAccess);
einsteingustavo 0:0dee8840a1c0 385 void FLASH_PrefetchBufferCmd(uint32_t FLASH_PrefetchBuffer);
einsteingustavo 0:0dee8840a1c0 386 void FLASH_Unlock(void);
einsteingustavo 0:0dee8840a1c0 387 void FLASH_Lock(void);
einsteingustavo 0:0dee8840a1c0 388 FLASH_Status FLASH_ErasePage(uint32_t Page_Address);
einsteingustavo 0:0dee8840a1c0 389 FLASH_Status FLASH_EraseAllPages(void);
einsteingustavo 0:0dee8840a1c0 390 FLASH_Status FLASH_EraseOptionBytes(void);
einsteingustavo 0:0dee8840a1c0 391 FLASH_Status FLASH_ProgramWord(uint32_t Address, uint32_t Data);
einsteingustavo 0:0dee8840a1c0 392 FLASH_Status FLASH_ProgramHalfWord(uint32_t Address, uint16_t Data);
einsteingustavo 0:0dee8840a1c0 393 FLASH_Status FLASH_ProgramOptionByteData(uint32_t Address, uint8_t Data);
einsteingustavo 0:0dee8840a1c0 394 FLASH_Status FLASH_EnableWriteProtection(uint32_t FLASH_Pages);
einsteingustavo 0:0dee8840a1c0 395 FLASH_Status FLASH_ReadOutProtection(FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 396 FLASH_Status FLASH_UserOptionByteConfig(uint16_t OB_IWDG, uint16_t OB_STOP, uint16_t OB_STDBY);
einsteingustavo 0:0dee8840a1c0 397 uint32_t FLASH_GetUserOptionByte(void);
einsteingustavo 0:0dee8840a1c0 398 uint32_t FLASH_GetWriteProtectionOptionByte(void);
einsteingustavo 0:0dee8840a1c0 399 FlagStatus FLASH_GetReadOutProtectionStatus(void);
einsteingustavo 0:0dee8840a1c0 400 FlagStatus FLASH_GetPrefetchBufferStatus(void);
einsteingustavo 0:0dee8840a1c0 401 void FLASH_ITConfig(uint32_t FLASH_IT, FunctionalState NewState);
einsteingustavo 0:0dee8840a1c0 402 FlagStatus FLASH_GetFlagStatus(uint32_t FLASH_FLAG);
einsteingustavo 0:0dee8840a1c0 403 void FLASH_ClearFlag(uint32_t FLASH_FLAG);
einsteingustavo 0:0dee8840a1c0 404 FLASH_Status FLASH_GetStatus(void);
einsteingustavo 0:0dee8840a1c0 405 FLASH_Status FLASH_WaitForLastOperation(uint32_t Timeout);
einsteingustavo 0:0dee8840a1c0 406
einsteingustavo 0:0dee8840a1c0 407 /*------------ New function used for all STM32F10x devices -----*/
einsteingustavo 0:0dee8840a1c0 408 void FLASH_UnlockBank1(void);
einsteingustavo 0:0dee8840a1c0 409 void FLASH_LockBank1(void);
einsteingustavo 0:0dee8840a1c0 410 FLASH_Status FLASH_EraseAllBank1Pages(void);
einsteingustavo 0:0dee8840a1c0 411 FLASH_Status FLASH_GetBank1Status(void);
einsteingustavo 0:0dee8840a1c0 412 FLASH_Status FLASH_WaitForLastBank1Operation(uint32_t Timeout);
einsteingustavo 0:0dee8840a1c0 413
einsteingustavo 0:0dee8840a1c0 414 #ifdef STM32F10X_XL
einsteingustavo 0:0dee8840a1c0 415 /*---- New Functions used only with STM32F10x_XL density devices -----*/
einsteingustavo 0:0dee8840a1c0 416 void FLASH_UnlockBank2(void);
einsteingustavo 0:0dee8840a1c0 417 void FLASH_LockBank2(void);
einsteingustavo 0:0dee8840a1c0 418 FLASH_Status FLASH_EraseAllBank2Pages(void);
einsteingustavo 0:0dee8840a1c0 419 FLASH_Status FLASH_GetBank2Status(void);
einsteingustavo 0:0dee8840a1c0 420 FLASH_Status FLASH_WaitForLastBank2Operation(uint32_t Timeout);
einsteingustavo 0:0dee8840a1c0 421 FLASH_Status FLASH_BootConfig(uint16_t FLASH_BOOT);
einsteingustavo 0:0dee8840a1c0 422 #endif
einsteingustavo 0:0dee8840a1c0 423
einsteingustavo 0:0dee8840a1c0 424 #ifdef __cplusplus
einsteingustavo 0:0dee8840a1c0 425 }
einsteingustavo 0:0dee8840a1c0 426 #endif
einsteingustavo 0:0dee8840a1c0 427
einsteingustavo 0:0dee8840a1c0 428 #endif /* __STM32F10x_FLASH_H */
einsteingustavo 0:0dee8840a1c0 429 /**
einsteingustavo 0:0dee8840a1c0 430 * @}
einsteingustavo 0:0dee8840a1c0 431 */
einsteingustavo 0:0dee8840a1c0 432
einsteingustavo 0:0dee8840a1c0 433 /**
einsteingustavo 0:0dee8840a1c0 434 * @}
einsteingustavo 0:0dee8840a1c0 435 */
einsteingustavo 0:0dee8840a1c0 436
einsteingustavo 0:0dee8840a1c0 437 /**
einsteingustavo 0:0dee8840a1c0 438 * @}
einsteingustavo 0:0dee8840a1c0 439 */
einsteingustavo 0:0dee8840a1c0 440
einsteingustavo 0:0dee8840a1c0 441 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
einsteingustavo 0:0dee8840a1c0 442