mbed library sources

Dependents:   Encrypted my_mbed lklk CyaSSL_DTLS_Cellular ... more

Superseded

This library was superseded by mbed-dev - https://os.mbed.com/users/mbed_official/code/mbed-dev/.

Development branch of the mbed library sources. This library is kept in synch with the latest changes from the mbed SDK and it is not guaranteed to work.

If you are looking for a stable and tested release, please import one of the official mbed library releases:

Import librarymbed

The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.

Committer:
mbed_official
Date:
Fri Nov 07 08:15:08 2014 +0000
Revision:
392:2b59412bb664
Parent:
targets/cmsis/TARGET_STM/TARGET_NUCLEO_F091RC/stm32f0xx_hal_flash_ex.h@340:28d1f895c6fe
Child:
441:d2c15dda23c1
Synchronized with git revision eec0be05cd92349bee83c65f9e1302b25b5badf4

Full URL: https://github.com/mbedmicro/mbed/commit/eec0be05cd92349bee83c65f9e1302b25b5badf4/

Targets: STM32F0 - Factorisation of NUCLEO_F030R8/F072RB/F091RC cmsis folders

Who changed what in which revision?

UserRevisionLine numberNew contents of line
mbed_official 340:28d1f895c6fe 1 /**
mbed_official 340:28d1f895c6fe 2 ******************************************************************************
mbed_official 340:28d1f895c6fe 3 * @file stm32f0xx_hal_flash_ex.h
mbed_official 340:28d1f895c6fe 4 * @author MCD Application Team
mbed_official 340:28d1f895c6fe 5 * @version V1.1.0
mbed_official 340:28d1f895c6fe 6 * @date 03-Oct-2014
mbed_official 340:28d1f895c6fe 7 * @brief Header file of FLASH HAL Extension module.
mbed_official 340:28d1f895c6fe 8 ******************************************************************************
mbed_official 340:28d1f895c6fe 9 * @attention
mbed_official 340:28d1f895c6fe 10 *
mbed_official 340:28d1f895c6fe 11 * <h2><center>&copy; COPYRIGHT(c) 2014 STMicroelectronics</center></h2>
mbed_official 340:28d1f895c6fe 12 *
mbed_official 340:28d1f895c6fe 13 * Redistribution and use in source and binary forms, with or without modification,
mbed_official 340:28d1f895c6fe 14 * are permitted provided that the following conditions are met:
mbed_official 340:28d1f895c6fe 15 * 1. Redistributions of source code must retain the above copyright notice,
mbed_official 340:28d1f895c6fe 16 * this list of conditions and the following disclaimer.
mbed_official 340:28d1f895c6fe 17 * 2. Redistributions in binary form must reproduce the above copyright notice,
mbed_official 340:28d1f895c6fe 18 * this list of conditions and the following disclaimer in the documentation
mbed_official 340:28d1f895c6fe 19 * and/or other materials provided with the distribution.
mbed_official 340:28d1f895c6fe 20 * 3. Neither the name of STMicroelectronics nor the names of its contributors
mbed_official 340:28d1f895c6fe 21 * may be used to endorse or promote products derived from this software
mbed_official 340:28d1f895c6fe 22 * without specific prior written permission.
mbed_official 340:28d1f895c6fe 23 *
mbed_official 340:28d1f895c6fe 24 * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
mbed_official 340:28d1f895c6fe 25 * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
mbed_official 340:28d1f895c6fe 26 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE
mbed_official 340:28d1f895c6fe 27 * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE
mbed_official 340:28d1f895c6fe 28 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
mbed_official 340:28d1f895c6fe 29 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR
mbed_official 340:28d1f895c6fe 30 * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER
mbed_official 340:28d1f895c6fe 31 * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY,
mbed_official 340:28d1f895c6fe 32 * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE
mbed_official 340:28d1f895c6fe 33 * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.
mbed_official 340:28d1f895c6fe 34 *
mbed_official 340:28d1f895c6fe 35 ******************************************************************************
mbed_official 340:28d1f895c6fe 36 */
mbed_official 340:28d1f895c6fe 37
mbed_official 340:28d1f895c6fe 38 /* Define to prevent recursive inclusion -------------------------------------*/
mbed_official 340:28d1f895c6fe 39 #ifndef __STM32F0xx_HAL_FLASH_EX_H
mbed_official 340:28d1f895c6fe 40 #define __STM32F0xx_HAL_FLASH_EX_H
mbed_official 340:28d1f895c6fe 41
mbed_official 340:28d1f895c6fe 42 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 43 extern "C" {
mbed_official 340:28d1f895c6fe 44 #endif
mbed_official 340:28d1f895c6fe 45
mbed_official 340:28d1f895c6fe 46 /* Includes ------------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 47 #include "stm32f0xx_hal_def.h"
mbed_official 340:28d1f895c6fe 48
mbed_official 340:28d1f895c6fe 49 /** @addtogroup STM32F0xx_HAL_Driver
mbed_official 340:28d1f895c6fe 50 * @{
mbed_official 340:28d1f895c6fe 51 */
mbed_official 340:28d1f895c6fe 52
mbed_official 340:28d1f895c6fe 53 /** @addtogroup FLASHEx
mbed_official 340:28d1f895c6fe 54 * @{
mbed_official 340:28d1f895c6fe 55 */
mbed_official 340:28d1f895c6fe 56
mbed_official 340:28d1f895c6fe 57 /* Exported types ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 58 /* Exported constants --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 59 /** @defgroup FLASHEx_Exported_Constants FLASHEx Exported Constants
mbed_official 340:28d1f895c6fe 60 * @{
mbed_official 340:28d1f895c6fe 61 */
mbed_official 340:28d1f895c6fe 62 /** @defgroup FLASHEx_Address FLASHEx Address
mbed_official 340:28d1f895c6fe 63 * @{
mbed_official 340:28d1f895c6fe 64 */
mbed_official 340:28d1f895c6fe 65 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F038xx)
mbed_official 340:28d1f895c6fe 66 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x08007FFF))
mbed_official 340:28d1f895c6fe 67 #endif /* STM32F030x6 || STM32F031x6 || STM32F042x6 || STM32F048xx || STM32F038xx */
mbed_official 340:28d1f895c6fe 68
mbed_official 340:28d1f895c6fe 69 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 70 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0800FFFF))
mbed_official 340:28d1f895c6fe 71 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
mbed_official 340:28d1f895c6fe 72
mbed_official 340:28d1f895c6fe 73 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
mbed_official 340:28d1f895c6fe 74 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0801FFFF))
mbed_official 340:28d1f895c6fe 75 #endif /* STM32F071xB || STM32F072xB || STM32F078xx */
mbed_official 340:28d1f895c6fe 76
mbed_official 340:28d1f895c6fe 77 #if defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 78 #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= 0x08000000) && ((ADDRESS) <= 0x0803FFFF))
mbed_official 340:28d1f895c6fe 79 #endif /* STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 80 /**
mbed_official 340:28d1f895c6fe 81 * @}
mbed_official 340:28d1f895c6fe 82 */
mbed_official 340:28d1f895c6fe 83
mbed_official 340:28d1f895c6fe 84 /** @defgroup FLASHEx_Page_Size FLASHEx Page Size
mbed_official 340:28d1f895c6fe 85 * @{
mbed_official 340:28d1f895c6fe 86 */
mbed_official 340:28d1f895c6fe 87 #if defined(STM32F030x6) || defined(STM32F030x8) || defined(STM32F031x6) || defined(STM32F038xx) || \
mbed_official 340:28d1f895c6fe 88 defined(STM32F051x8) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 89 #define FLASH_PAGE_SIZE 0x400
mbed_official 340:28d1f895c6fe 90 #endif /* STM32F030x6 || STM32F030x8 || STM32F031x6 || STM32F051x8 || STM32F042x6 || STM32F048xx || STM32F058xx */
mbed_official 340:28d1f895c6fe 91
mbed_official 340:28d1f895c6fe 92 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
mbed_official 340:28d1f895c6fe 93 defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 94 #define FLASH_PAGE_SIZE 0x800
mbed_official 340:28d1f895c6fe 95 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 96
mbed_official 340:28d1f895c6fe 97 /**
mbed_official 340:28d1f895c6fe 98 * @}
mbed_official 340:28d1f895c6fe 99 */
mbed_official 340:28d1f895c6fe 100
mbed_official 340:28d1f895c6fe 101 /** @defgroup FLASHEx_Nb_Pages FLASHEx Nb Pages
mbed_official 340:28d1f895c6fe 102 * @{
mbed_official 340:28d1f895c6fe 103 */
mbed_official 340:28d1f895c6fe 104 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F038xx)
mbed_official 340:28d1f895c6fe 105 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x08007FFF)
mbed_official 340:28d1f895c6fe 106 #endif /* STM32F030x6 || STM32F031x6 || STM32F042x6 || STM32F048xx || STM32F038xx */
mbed_official 340:28d1f895c6fe 107
mbed_official 340:28d1f895c6fe 108 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 109 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0800FFFF)
mbed_official 340:28d1f895c6fe 110 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
mbed_official 340:28d1f895c6fe 111
mbed_official 340:28d1f895c6fe 112 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
mbed_official 340:28d1f895c6fe 113 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0801FFFF)
mbed_official 340:28d1f895c6fe 114 #endif /* STM32F071xB || STM32F072xB || STM32F078xx */
mbed_official 340:28d1f895c6fe 115
mbed_official 340:28d1f895c6fe 116 #if defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 117 #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1 <= 0x0803FFFF)
mbed_official 340:28d1f895c6fe 118 #endif /* STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 119 /**
mbed_official 340:28d1f895c6fe 120 * @}
mbed_official 340:28d1f895c6fe 121 */
mbed_official 340:28d1f895c6fe 122
mbed_official 340:28d1f895c6fe 123 /** @defgroup FLASHEx_OB_Write_Protection FLASHEx OB Write Protection
mbed_official 340:28d1f895c6fe 124 * @{
mbed_official 340:28d1f895c6fe 125 */
mbed_official 340:28d1f895c6fe 126 #if defined(STM32F030x6) || defined(STM32F030x8) || defined(STM32F031x6) || defined(STM32F038xx) || \
mbed_official 340:28d1f895c6fe 127 defined(STM32F051x8) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 128 #define OB_WRP_PAGES0TO3 ((uint32_t)0x00000001) /* Write protection of page 0 to 3 */
mbed_official 340:28d1f895c6fe 129 #define OB_WRP_PAGES4TO7 ((uint32_t)0x00000002) /* Write protection of page 4 to 7 */
mbed_official 340:28d1f895c6fe 130 #define OB_WRP_PAGES8TO11 ((uint32_t)0x00000004) /* Write protection of page 8 to 11 */
mbed_official 340:28d1f895c6fe 131 #define OB_WRP_PAGES12TO15 ((uint32_t)0x00000008) /* Write protection of page 12 to 15 */
mbed_official 340:28d1f895c6fe 132 #define OB_WRP_PAGES16TO19 ((uint32_t)0x00000010) /* Write protection of page 16 to 19 */
mbed_official 340:28d1f895c6fe 133 #define OB_WRP_PAGES20TO23 ((uint32_t)0x00000020) /* Write protection of page 20 to 23 */
mbed_official 340:28d1f895c6fe 134 #define OB_WRP_PAGES24TO27 ((uint32_t)0x00000040) /* Write protection of page 24 to 27 */
mbed_official 340:28d1f895c6fe 135 #define OB_WRP_PAGES28TO31 ((uint32_t)0x00000080) /* Write protection of page 28 to 31 */
mbed_official 340:28d1f895c6fe 136 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 137 #define OB_WRP_PAGES32TO35 ((uint32_t)0x00000100) /* Write protection of page 32 to 35 */
mbed_official 340:28d1f895c6fe 138 #define OB_WRP_PAGES36TO39 ((uint32_t)0x00000200) /* Write protection of page 36 to 39 */
mbed_official 340:28d1f895c6fe 139 #define OB_WRP_PAGES40TO43 ((uint32_t)0x00000400) /* Write protection of page 40 to 43 */
mbed_official 340:28d1f895c6fe 140 #define OB_WRP_PAGES44TO47 ((uint32_t)0x00000800) /* Write protection of page 44 to 47 */
mbed_official 340:28d1f895c6fe 141 #define OB_WRP_PAGES48TO51 ((uint32_t)0x00001000) /* Write protection of page 48 to 51 */
mbed_official 340:28d1f895c6fe 142 #define OB_WRP_PAGES52TO57 ((uint32_t)0x00002000) /* Write protection of page 52 to 57 */
mbed_official 340:28d1f895c6fe 143 #define OB_WRP_PAGES56TO59 ((uint32_t)0x00004000) /* Write protection of page 56 to 59 */
mbed_official 340:28d1f895c6fe 144 #define OB_WRP_PAGES60TO63 ((uint32_t)0x00008000) /* Write protection of page 60 to 63 */
mbed_official 340:28d1f895c6fe 145 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
mbed_official 340:28d1f895c6fe 146
mbed_official 340:28d1f895c6fe 147 #define OB_WRP_PAGES0TO31MASK ((uint32_t)0x000000FF)
mbed_official 340:28d1f895c6fe 148 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 149 #define OB_WRP_PAGES32TO63MASK ((uint32_t)0x0000FF00)
mbed_official 340:28d1f895c6fe 150 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
mbed_official 340:28d1f895c6fe 151
mbed_official 340:28d1f895c6fe 152 #if defined(STM32F030x6) || defined(STM32F031x6) || defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F038xx)
mbed_official 340:28d1f895c6fe 153 #define OB_WRP_ALLPAGES ((uint32_t)0x000000FF) /*!< Write protection of all pages */
mbed_official 340:28d1f895c6fe 154 #endif /* STM32F030x6 || STM32F031x6 || STM32F042x6 || STM32F048xx || STM32F038xx */
mbed_official 340:28d1f895c6fe 155
mbed_official 340:28d1f895c6fe 156 #if defined(STM32F030x8) || defined(STM32F051x8) || defined(STM32F058xx)
mbed_official 340:28d1f895c6fe 157 #define OB_WRP_ALLPAGES ((uint32_t)0x0000FFFF) /*!< Write protection of all pages */
mbed_official 340:28d1f895c6fe 158 #endif /* STM32F030x8 || STM32F051x8 || STM32F058xx */
mbed_official 340:28d1f895c6fe 159 #endif /* STM32F030x6 || STM32F030x8 || STM32F031x6 || STM32F051x8 || STM32F042x6 || STM32F048xx || STM32F038xx || STM32F058xx */
mbed_official 340:28d1f895c6fe 160
mbed_official 340:28d1f895c6fe 161 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx) || \
mbed_official 340:28d1f895c6fe 162 defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 163 #define OB_WRP_PAGES0TO1 ((uint32_t)0x00000001) /* Write protection of page 0 to 1 */
mbed_official 340:28d1f895c6fe 164 #define OB_WRP_PAGES2TO3 ((uint32_t)0x00000002) /* Write protection of page 2 to 3 */
mbed_official 340:28d1f895c6fe 165 #define OB_WRP_PAGES4TO5 ((uint32_t)0x00000004) /* Write protection of page 4 to 5 */
mbed_official 340:28d1f895c6fe 166 #define OB_WRP_PAGES6TO7 ((uint32_t)0x00000008) /* Write protection of page 6 to 7 */
mbed_official 340:28d1f895c6fe 167 #define OB_WRP_PAGES8TO9 ((uint32_t)0x00000010) /* Write protection of page 8 to 9 */
mbed_official 340:28d1f895c6fe 168 #define OB_WRP_PAGES10TO11 ((uint32_t)0x00000020) /* Write protection of page 10 to 11 */
mbed_official 340:28d1f895c6fe 169 #define OB_WRP_PAGES12TO13 ((uint32_t)0x00000040) /* Write protection of page 12 to 13 */
mbed_official 340:28d1f895c6fe 170 #define OB_WRP_PAGES14TO15 ((uint32_t)0x00000080) /* Write protection of page 14 to 15 */
mbed_official 340:28d1f895c6fe 171 #define OB_WRP_PAGES16TO17 ((uint32_t)0x00000100) /* Write protection of page 16 to 17 */
mbed_official 340:28d1f895c6fe 172 #define OB_WRP_PAGES18TO19 ((uint32_t)0x00000200) /* Write protection of page 18 to 19 */
mbed_official 340:28d1f895c6fe 173 #define OB_WRP_PAGES20TO21 ((uint32_t)0x00000400) /* Write protection of page 20 to 21 */
mbed_official 340:28d1f895c6fe 174 #define OB_WRP_PAGES22TO23 ((uint32_t)0x00000800) /* Write protection of page 22 to 23 */
mbed_official 340:28d1f895c6fe 175 #define OB_WRP_PAGES24TO25 ((uint32_t)0x00001000) /* Write protection of page 24 to 25 */
mbed_official 340:28d1f895c6fe 176 #define OB_WRP_PAGES26TO27 ((uint32_t)0x00002000) /* Write protection of page 26 to 27 */
mbed_official 340:28d1f895c6fe 177 #define OB_WRP_PAGES28TO29 ((uint32_t)0x00004000) /* Write protection of page 28 to 29 */
mbed_official 340:28d1f895c6fe 178 #define OB_WRP_PAGES30TO31 ((uint32_t)0x00008000) /* Write protection of page 30 to 31 */
mbed_official 340:28d1f895c6fe 179 #define OB_WRP_PAGES32TO33 ((uint32_t)0x00010000) /* Write protection of page 32 to 33 */
mbed_official 340:28d1f895c6fe 180 #define OB_WRP_PAGES34TO35 ((uint32_t)0x00020000) /* Write protection of page 34 to 35 */
mbed_official 340:28d1f895c6fe 181 #define OB_WRP_PAGES36TO37 ((uint32_t)0x00040000) /* Write protection of page 36 to 37 */
mbed_official 340:28d1f895c6fe 182 #define OB_WRP_PAGES38TO39 ((uint32_t)0x00080000) /* Write protection of page 38 to 39 */
mbed_official 340:28d1f895c6fe 183 #define OB_WRP_PAGES40TO41 ((uint32_t)0x00100000) /* Write protection of page 40 to 41 */
mbed_official 340:28d1f895c6fe 184 #define OB_WRP_PAGES42TO43 ((uint32_t)0x00200000) /* Write protection of page 42 to 43 */
mbed_official 340:28d1f895c6fe 185 #define OB_WRP_PAGES44TO45 ((uint32_t)0x00400000) /* Write protection of page 44 to 45 */
mbed_official 340:28d1f895c6fe 186 #define OB_WRP_PAGES46TO47 ((uint32_t)0x00800000) /* Write protection of page 46 to 47 */
mbed_official 340:28d1f895c6fe 187 #define OB_WRP_PAGES48TO49 ((uint32_t)0x01000000) /* Write protection of page 48 to 49 */
mbed_official 340:28d1f895c6fe 188 #define OB_WRP_PAGES50TO51 ((uint32_t)0x02000000) /* Write protection of page 50 to 51 */
mbed_official 340:28d1f895c6fe 189 #define OB_WRP_PAGES52TO53 ((uint32_t)0x04000000) /* Write protection of page 52 to 53 */
mbed_official 340:28d1f895c6fe 190 #define OB_WRP_PAGES54TO55 ((uint32_t)0x08000000) /* Write protection of page 54 to 55 */
mbed_official 340:28d1f895c6fe 191 #define OB_WRP_PAGES56TO57 ((uint32_t)0x10000000) /* Write protection of page 56 to 57 */
mbed_official 340:28d1f895c6fe 192 #define OB_WRP_PAGES58TO59 ((uint32_t)0x20000000) /* Write protection of page 58 to 59 */
mbed_official 340:28d1f895c6fe 193 #define OB_WRP_PAGES60TO61 ((uint32_t)0x40000000) /* Write protection of page 60 to 61 */
mbed_official 340:28d1f895c6fe 194 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
mbed_official 340:28d1f895c6fe 195 #define OB_WRP_PAGES62TO63 ((uint32_t)0x80000000) /* Write protection of page 62 to 63 */
mbed_official 340:28d1f895c6fe 196 #endif /* STM32F071xB || STM32F072xB || STM32F078xx */
mbed_official 340:28d1f895c6fe 197 #if defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 198 #define OB_WRP_PAGES62TO127 ((uint32_t)0x80000000) /* Write protection of page 62 to 127 */
mbed_official 340:28d1f895c6fe 199 #endif /* STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 200
mbed_official 340:28d1f895c6fe 201 #define OB_WRP_PAGES0TO15MASK ((uint32_t)0x000000FF)
mbed_official 340:28d1f895c6fe 202 #define OB_WRP_PAGES16TO31MASK ((uint32_t)0x0000FF00)
mbed_official 340:28d1f895c6fe 203 #define OB_WRP_PAGES32TO47MASK ((uint32_t)0x00FF0000)
mbed_official 340:28d1f895c6fe 204 #if defined(STM32F071xB) || defined(STM32F072xB) || defined(STM32F078xx)
mbed_official 340:28d1f895c6fe 205 #define OB_WRP_PAGES48TO63MASK ((uint32_t)0xFF000000)
mbed_official 340:28d1f895c6fe 206 #endif /* STM32F071xB || STM32F072xB || STM32F078xx */
mbed_official 340:28d1f895c6fe 207 #if defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 208 #define OB_WRP_PAGES48TO127MASK ((uint32_t)0xFF000000)
mbed_official 340:28d1f895c6fe 209 #endif /* STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 210
mbed_official 340:28d1f895c6fe 211 #define OB_WRP_ALLPAGES ((uint32_t)0xFFFFFFFF) /*!< Write protection of all pages */
mbed_official 340:28d1f895c6fe 212 #endif /* STM32F071xB || STM32F072xB || STM32F078xx || STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 213
mbed_official 340:28d1f895c6fe 214 #define IS_OB_WRP(PAGE) (((PAGE) != 0x0000000))
mbed_official 340:28d1f895c6fe 215 /**
mbed_official 340:28d1f895c6fe 216 * @}
mbed_official 340:28d1f895c6fe 217 */
mbed_official 340:28d1f895c6fe 218
mbed_official 340:28d1f895c6fe 219 #if defined(STM32F042x6) || defined(STM32F048xx) || defined(STM32F091xC) || defined(STM32F098xx)
mbed_official 340:28d1f895c6fe 220 /** @defgroup FLASHEx_OB_BOOT_SEL FLASHEx OB BOOT SEL
mbed_official 340:28d1f895c6fe 221 * @{
mbed_official 340:28d1f895c6fe 222 */
mbed_official 340:28d1f895c6fe 223 #define OB_BOOT_SEL_RESET ((uint8_t)0x00) /*!< BOOT_SEL Reset */
mbed_official 340:28d1f895c6fe 224 #define OB_BOOT_SEL_SET ((uint8_t)0x80) /*!< BOOT_SEL Set */
mbed_official 340:28d1f895c6fe 225 #define IS_OB_BOOT_SEL(BOOT_SEL) (((BOOT_SEL) == OB_BOOT_SEL_RESET) || ((BOOT_SEL) == OB_BOOT_SEL_SET))
mbed_official 340:28d1f895c6fe 226 /**
mbed_official 340:28d1f895c6fe 227 * @}
mbed_official 340:28d1f895c6fe 228 */
mbed_official 340:28d1f895c6fe 229
mbed_official 340:28d1f895c6fe 230 /** @defgroup FLASHEx_OB_BOOT0 FLASHEx OB BOOT0
mbed_official 340:28d1f895c6fe 231 * @{
mbed_official 340:28d1f895c6fe 232 */
mbed_official 340:28d1f895c6fe 233 #define OB_BOOT0_RESET ((uint8_t)0x00) /*!< BOOT0 Reset */
mbed_official 340:28d1f895c6fe 234 #define OB_BOOT0_SET ((uint8_t)0x08) /*!< BOOT0 Set */
mbed_official 340:28d1f895c6fe 235 #define IS_OB_BOOT0(BOOT0) (((BOOT0) == OB_BOOT0_RESET) || ((BOOT0) == OB_BOOT0_SET))
mbed_official 340:28d1f895c6fe 236 /**
mbed_official 340:28d1f895c6fe 237 * @}
mbed_official 340:28d1f895c6fe 238 */
mbed_official 340:28d1f895c6fe 239 #endif /* STM32F042x6 || STM32F048xx || STM32F091xC || STM32F098xx */
mbed_official 340:28d1f895c6fe 240
mbed_official 340:28d1f895c6fe 241 /**
mbed_official 340:28d1f895c6fe 242 * @}
mbed_official 340:28d1f895c6fe 243 */
mbed_official 340:28d1f895c6fe 244
mbed_official 340:28d1f895c6fe 245 /* Exported macro ------------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 246
mbed_official 340:28d1f895c6fe 247 /* Exported functions --------------------------------------------------------*/
mbed_official 340:28d1f895c6fe 248 /** @addtogroup FLASHEx_Exported_Functions FLASHEx Exported Functions
mbed_official 340:28d1f895c6fe 249 * @{
mbed_official 340:28d1f895c6fe 250 */
mbed_official 340:28d1f895c6fe 251
mbed_official 340:28d1f895c6fe 252 /** @addtogroup FLASHEx_Exported_Functions_Group2 Extended I/O operation functions
mbed_official 340:28d1f895c6fe 253 * @brief Extended I/O operation functions
mbed_official 340:28d1f895c6fe 254 * @{
mbed_official 340:28d1f895c6fe 255 */
mbed_official 340:28d1f895c6fe 256 /* IO operation functions *****************************************************/
mbed_official 340:28d1f895c6fe 257 HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError);
mbed_official 340:28d1f895c6fe 258 HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit);
mbed_official 340:28d1f895c6fe 259
mbed_official 340:28d1f895c6fe 260 /**
mbed_official 340:28d1f895c6fe 261 * @}
mbed_official 340:28d1f895c6fe 262 */
mbed_official 340:28d1f895c6fe 263
mbed_official 340:28d1f895c6fe 264 /** @addtogroup FLASHEx_Exported_Functions_Group3 Extended Peripheral Control functions
mbed_official 340:28d1f895c6fe 265 * @brief Extended Peripheral Control functions
mbed_official 340:28d1f895c6fe 266 * @{
mbed_official 340:28d1f895c6fe 267 */
mbed_official 340:28d1f895c6fe 268 /* Peripheral Control functions ***********************************************/
mbed_official 340:28d1f895c6fe 269 HAL_StatusTypeDef HAL_FLASHEx_OBErase(void);
mbed_official 340:28d1f895c6fe 270 HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit);
mbed_official 340:28d1f895c6fe 271 void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit);
mbed_official 340:28d1f895c6fe 272
mbed_official 340:28d1f895c6fe 273 /**
mbed_official 340:28d1f895c6fe 274 * @}
mbed_official 340:28d1f895c6fe 275 */
mbed_official 340:28d1f895c6fe 276
mbed_official 340:28d1f895c6fe 277 /**
mbed_official 340:28d1f895c6fe 278 * @}
mbed_official 340:28d1f895c6fe 279 */
mbed_official 340:28d1f895c6fe 280
mbed_official 340:28d1f895c6fe 281 /**
mbed_official 340:28d1f895c6fe 282 * @}
mbed_official 340:28d1f895c6fe 283 */
mbed_official 340:28d1f895c6fe 284
mbed_official 340:28d1f895c6fe 285 /**
mbed_official 340:28d1f895c6fe 286 * @}
mbed_official 340:28d1f895c6fe 287 */
mbed_official 340:28d1f895c6fe 288
mbed_official 340:28d1f895c6fe 289 #ifdef __cplusplus
mbed_official 340:28d1f895c6fe 290 }
mbed_official 340:28d1f895c6fe 291 #endif
mbed_official 340:28d1f895c6fe 292
mbed_official 340:28d1f895c6fe 293 #endif /* __STM32F0xx_HAL_FLASH_EX_H */
mbed_official 340:28d1f895c6fe 294
mbed_official 340:28d1f895c6fe 295 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
mbed_official 340:28d1f895c6fe 296