my fork

Dependents:   Nucleo_blueNRG

Fork of mbed by mbed official

Committer:
Kojto
Date:
Tue Oct 28 16:40:41 2014 +0000
Revision:
90:cb3d968589d8
Release 90 of the mbed library

Changes:

- Freescale KSDK update (v1.0)
- K22 - new target addition
- KL43Z - new target addition
- Nucleo F091RC - new target addition
- Nucleo L152RE - STM32Cube driver
- Nordic - Softdevice v7.1.0
- Nvic files - BSD License
- LPC824 - various HAL fixes
- Nucleo F411RE - CMSIS - IAR files

Who changed what in which revision?

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