mbed library sources

Fork of mbed-src by mbed official

Committer:
mbed_official
Date:
Mon Nov 03 10:30:07 2014 +0000
Revision:
381:5460fc57b6e4
Synchronized with git revision 02478cd1f27fc7b9643486472635eb515b2bca81

Full URL: https://github.com/mbedmicro/mbed/commit/02478cd1f27fc7b9643486472635eb515b2bca81/

Target: LPC1549 - Fix serial interrupt issues (issue report #616)

Who changed what in which revision?

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