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