Elijah Orr / mbed-renbed

Dependents:   1-RenBuggyTimed RenBED_RGB RenBED_RGB_PWM RenBED_RGB

Fork of mbed by mbed official

Committer:
Kojto
Date:
Thu Oct 29 08:40:18 2015 +0000
Revision:
109:9296ab0bfc11
Release 109  of the mbed library

Changes:
- new platforms - NUCLEO_F042K6, WIZNWIKI_W7500ECO
- MTS targets - bootloaders update to 0.1.1
- STM F7 - RTC enable fixes
- STM F4 - i2c pending stop before start fix
- STM all targets - analogout normalization fix

Who changed what in which revision?

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