The official Mbed 2 C/C++ SDK provides the software platform and libraries to build your applications.
Dependents: hello SerialTestv11 SerialTestv12 Sierpinski ... more
mbed 2
This is the mbed 2 library. If you'd like to learn about Mbed OS please see the mbed-os docs.
TARGET_NUCLEO_F302R8/TARGET_STM/TARGET_STM32F3/device/stm32f3xx_hal_flash_ex.h@136:ef9c61f8c49f, 2017-02-14 (annotated)
- Committer:
- Kojto
- Date:
- Tue Feb 14 11:24:20 2017 +0000
- Revision:
- 136:ef9c61f8c49f
- Parent:
- 135:176b8275d35d
Release 136 of the mbed library
Ports for Upcoming Targets
Fixes and Changes
3432: Target STM USBHOST support https://github.com/ARMmbed/mbed-os/pull/3432
3181: NUCLEO_F207ZG extending PeripheralPins.c: all available alternate functions can be used now https://github.com/ARMmbed/mbed-os/pull/3181
3626: NUCLEO_F412ZG : Add USB Device +Host https://github.com/ARMmbed/mbed-os/pull/3626
3628: Fix warnings https://github.com/ARMmbed/mbed-os/pull/3628
3629: STM32: L0 LL layer https://github.com/ARMmbed/mbed-os/pull/3629
3632: IDE Export support for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3632
3642: Missing IRQ pin fix for platform VK_RZ_A1H https://github.com/ARMmbed/mbed-os/pull/3642
3664: Fix ncs36510 sleep definitions https://github.com/ARMmbed/mbed-os/pull/3664
3655: [STM32F4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3655
3657: [STM32L4] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3657
3658: [STM32F3] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3658
3685: STM32: I2C: reset state machine https://github.com/ARMmbed/mbed-os/pull/3685
3692: uVisor: Standardize available legacy heap and stack https://github.com/ARMmbed/mbed-os/pull/3692
3621: Fix for #2884, LPC824: export to LPCXpresso, target running with wron https://github.com/ARMmbed/mbed-os/pull/3621
3649: [STM32F7] Modify folder structure https://github.com/ARMmbed/mbed-os/pull/3649
3695: Enforce device_name is valid in targets.json https://github.com/ARMmbed/mbed-os/pull/3695
3723: NCS36510: spi_format function bug fix https://github.com/ARMmbed/mbed-os/pull/3723
Who changed what in which revision?
User | Revision | Line number | New contents of line |
---|---|---|---|
bogdanm | 86:04dd9b1680ae | 1 | /** |
bogdanm | 86:04dd9b1680ae | 2 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 3 | * @file stm32f3xx_hal_flash_ex.h |
bogdanm | 86:04dd9b1680ae | 4 | * @author MCD Application Team |
<> | 135:176b8275d35d | 5 | * @version V1.4.0 |
<> | 135:176b8275d35d | 6 | * @date 16-December-2016 |
bogdanm | 92:4fc01daae5a5 | 7 | * @brief Header file of Flash HAL Extended module. |
bogdanm | 86:04dd9b1680ae | 8 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 9 | * @attention |
bogdanm | 86:04dd9b1680ae | 10 | * |
Kojto | 122:f9eeca106725 | 11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
bogdanm | 86:04dd9b1680ae | 12 | * |
bogdanm | 86:04dd9b1680ae | 13 | * Redistribution and use in source and binary forms, with or without modification, |
bogdanm | 86:04dd9b1680ae | 14 | * are permitted provided that the following conditions are met: |
bogdanm | 86:04dd9b1680ae | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 16 | * this list of conditions and the following disclaimer. |
bogdanm | 86:04dd9b1680ae | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
bogdanm | 86:04dd9b1680ae | 18 | * this list of conditions and the following disclaimer in the documentation |
bogdanm | 86:04dd9b1680ae | 19 | * and/or other materials provided with the distribution. |
bogdanm | 86:04dd9b1680ae | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
bogdanm | 86:04dd9b1680ae | 21 | * may be used to endorse or promote products derived from this software |
bogdanm | 86:04dd9b1680ae | 22 | * without specific prior written permission. |
bogdanm | 86:04dd9b1680ae | 23 | * |
bogdanm | 86:04dd9b1680ae | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
bogdanm | 86:04dd9b1680ae | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
bogdanm | 86:04dd9b1680ae | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
bogdanm | 86:04dd9b1680ae | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
bogdanm | 86:04dd9b1680ae | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
bogdanm | 86:04dd9b1680ae | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
bogdanm | 86:04dd9b1680ae | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
bogdanm | 86:04dd9b1680ae | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
bogdanm | 86:04dd9b1680ae | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
bogdanm | 86:04dd9b1680ae | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
bogdanm | 86:04dd9b1680ae | 34 | * |
bogdanm | 86:04dd9b1680ae | 35 | ****************************************************************************** |
bogdanm | 86:04dd9b1680ae | 36 | */ |
bogdanm | 86:04dd9b1680ae | 37 | |
bogdanm | 86:04dd9b1680ae | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 39 | #ifndef __STM32F3xx_HAL_FLASH_EX_H |
bogdanm | 86:04dd9b1680ae | 40 | #define __STM32F3xx_HAL_FLASH_EX_H |
bogdanm | 86:04dd9b1680ae | 41 | |
bogdanm | 86:04dd9b1680ae | 42 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 43 | extern "C" { |
bogdanm | 86:04dd9b1680ae | 44 | #endif |
bogdanm | 86:04dd9b1680ae | 45 | |
bogdanm | 86:04dd9b1680ae | 46 | /* Includes ------------------------------------------------------------------*/ |
bogdanm | 86:04dd9b1680ae | 47 | #include "stm32f3xx_hal_def.h" |
bogdanm | 86:04dd9b1680ae | 48 | |
bogdanm | 86:04dd9b1680ae | 49 | /** @addtogroup STM32F3xx_HAL_Driver |
bogdanm | 86:04dd9b1680ae | 50 | * @{ |
bogdanm | 86:04dd9b1680ae | 51 | */ |
bogdanm | 86:04dd9b1680ae | 52 | |
Kojto | 122:f9eeca106725 | 53 | /** @addtogroup FLASHEx |
bogdanm | 86:04dd9b1680ae | 54 | * @{ |
bogdanm | 86:04dd9b1680ae | 55 | */ |
bogdanm | 86:04dd9b1680ae | 56 | |
Kojto | 122:f9eeca106725 | 57 | /** @addtogroup FLASHEx_Private_Constants |
bogdanm | 86:04dd9b1680ae | 58 | * @{ |
Kojto | 122:f9eeca106725 | 59 | */ |
Kojto | 122:f9eeca106725 | 60 | |
<> | 135:176b8275d35d | 61 | #define FLASH_SIZE_DATA_REGISTER (0x1FFFF7CCU) |
Kojto | 122:f9eeca106725 | 62 | |
bogdanm | 86:04dd9b1680ae | 63 | /** |
bogdanm | 86:04dd9b1680ae | 64 | * @} |
Kojto | 122:f9eeca106725 | 65 | */ |
bogdanm | 86:04dd9b1680ae | 66 | |
Kojto | 122:f9eeca106725 | 67 | /** @addtogroup FLASHEx_Private_Macros |
bogdanm | 86:04dd9b1680ae | 68 | * @{ |
bogdanm | 86:04dd9b1680ae | 69 | */ |
Kojto | 122:f9eeca106725 | 70 | #define IS_FLASH_TYPEERASE(VALUE) (((VALUE) == FLASH_TYPEERASE_PAGES) || \ |
Kojto | 122:f9eeca106725 | 71 | ((VALUE) == FLASH_TYPEERASE_MASSERASE)) |
Kojto | 122:f9eeca106725 | 72 | |
Kojto | 122:f9eeca106725 | 73 | #define IS_OPTIONBYTE(VALUE) ((VALUE) <= (OPTIONBYTE_WRP | OPTIONBYTE_RDP | OPTIONBYTE_USER | OPTIONBYTE_DATA)) |
Kojto | 122:f9eeca106725 | 74 | |
Kojto | 122:f9eeca106725 | 75 | #define IS_WRPSTATE(VALUE) (((VALUE) == OB_WRPSTATE_DISABLE) || \ |
Kojto | 122:f9eeca106725 | 76 | ((VALUE) == OB_WRPSTATE_ENABLE)) |
Kojto | 122:f9eeca106725 | 77 | |
Kojto | 122:f9eeca106725 | 78 | #define IS_OB_DATA_ADDRESS(ADDRESS) (((ADDRESS) == OB_DATA_ADDRESS_DATA0) || ((ADDRESS) == OB_DATA_ADDRESS_DATA1)) |
Kojto | 122:f9eeca106725 | 79 | |
Kojto | 122:f9eeca106725 | 80 | #define IS_OB_RDP_LEVEL(LEVEL) (((LEVEL) == OB_RDP_LEVEL_0) ||\ |
Kojto | 122:f9eeca106725 | 81 | ((LEVEL) == OB_RDP_LEVEL_1))/*||\ |
Kojto | 122:f9eeca106725 | 82 | ((LEVEL) == OB_RDP_LEVEL_2))*/ |
Kojto | 122:f9eeca106725 | 83 | |
Kojto | 122:f9eeca106725 | 84 | #define IS_OB_IWDG_SOURCE(SOURCE) (((SOURCE) == OB_IWDG_SW) || ((SOURCE) == OB_IWDG_HW)) |
Kojto | 122:f9eeca106725 | 85 | |
Kojto | 122:f9eeca106725 | 86 | #define IS_OB_STOP_SOURCE(SOURCE) (((SOURCE) == OB_STOP_NO_RST) || ((SOURCE) == OB_STOP_RST)) |
Kojto | 122:f9eeca106725 | 87 | |
Kojto | 122:f9eeca106725 | 88 | #define IS_OB_STDBY_SOURCE(SOURCE) (((SOURCE) == OB_STDBY_NO_RST) || ((SOURCE) == OB_STDBY_RST)) |
Kojto | 122:f9eeca106725 | 89 | |
Kojto | 122:f9eeca106725 | 90 | #define IS_OB_BOOT1(BOOT1) (((BOOT1) == OB_BOOT1_RESET) || ((BOOT1) == OB_BOOT1_SET)) |
Kojto | 122:f9eeca106725 | 91 | |
Kojto | 122:f9eeca106725 | 92 | #define IS_OB_VDDA_ANALOG(ANALOG) (((ANALOG) == OB_VDDA_ANALOG_ON) || ((ANALOG) == OB_VDDA_ANALOG_OFF)) |
Kojto | 122:f9eeca106725 | 93 | |
Kojto | 122:f9eeca106725 | 94 | #define IS_OB_SRAM_PARITY(PARITY) (((PARITY) == OB_SRAM_PARITY_SET) || ((PARITY) == OB_SRAM_PARITY_RESET)) |
Kojto | 122:f9eeca106725 | 95 | |
Kojto | 122:f9eeca106725 | 96 | |
Kojto | 122:f9eeca106725 | 97 | #if defined(FLASH_OBR_SDADC12_VDD_MONITOR) |
Kojto | 122:f9eeca106725 | 98 | #define IS_OB_SDACD_VDD_MONITOR(VDD_MONITOR) (((VDD_MONITOR) == OB_SDACD_VDD_MONITOR_SET) || \ |
Kojto | 122:f9eeca106725 | 99 | ((VDD_MONITOR) == OB_SDACD_VDD_MONITOR_RESET)) |
Kojto | 122:f9eeca106725 | 100 | #endif /* FLASH_OBR_SDADC12_VDD_MONITOR */ |
Kojto | 122:f9eeca106725 | 101 | |
<> | 135:176b8275d35d | 102 | #define IS_OB_WRP(PAGE) (((PAGE) != 0x0000000U)) |
Kojto | 122:f9eeca106725 | 103 | |
Kojto | 122:f9eeca106725 | 104 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) \ |
Kojto | 122:f9eeca106725 | 105 | || defined(STM32F373xC) || defined(STM32F378xx) |
<> | 135:176b8275d35d | 106 | #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= FLASH_BASE) && (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x100U) ? \ |
<> | 135:176b8275d35d | 107 | ((ADDRESS) <= 0x0803FFFFU) : (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x80U) ? \ |
<> | 135:176b8275d35d | 108 | ((ADDRESS) <= 0x0801FFFFU) : ((ADDRESS) <= 0x0800FFFFU)))) |
bogdanm | 86:04dd9b1680ae | 109 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
bogdanm | 86:04dd9b1680ae | 110 | /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 111 | |
bogdanm | 92:4fc01daae5a5 | 112 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) |
<> | 135:176b8275d35d | 113 | #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= FLASH_BASE) && ((ADDRESS) <= 0x0807FFFFU)) |
bogdanm | 92:4fc01daae5a5 | 114 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx */ |
bogdanm | 92:4fc01daae5a5 | 115 | |
Kojto | 122:f9eeca106725 | 116 | #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) \ |
Kojto | 122:f9eeca106725 | 117 | || defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
<> | 135:176b8275d35d | 118 | #define IS_FLASH_PROGRAM_ADDRESS(ADDRESS) (((ADDRESS) >= FLASH_BASE) && (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x40U) ? \ |
<> | 135:176b8275d35d | 119 | ((ADDRESS) <= 0x0800FFFFU) : (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x20U) ? \ |
<> | 135:176b8275d35d | 120 | ((ADDRESS) <= 0x08007FFFU) : ((ADDRESS) <= 0x08003FFFU)))) |
bogdanm | 86:04dd9b1680ae | 121 | #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */ |
bogdanm | 86:04dd9b1680ae | 122 | /* STM32F303x8 || STM32F334x8 || STM32F328xx */ |
bogdanm | 86:04dd9b1680ae | 123 | |
Kojto | 122:f9eeca106725 | 124 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) \ |
Kojto | 122:f9eeca106725 | 125 | || defined(STM32F373xC) || defined(STM32F378xx) |
<> | 135:176b8275d35d | 126 | #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x100U) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x0803FFFFU) : \ |
<> | 135:176b8275d35d | 127 | (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x80U) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x0801FFFFU) : \ |
<> | 135:176b8275d35d | 128 | ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x0800FFFFU))) |
bogdanm | 86:04dd9b1680ae | 129 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
bogdanm | 86:04dd9b1680ae | 130 | /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 131 | |
bogdanm | 92:4fc01daae5a5 | 132 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) |
<> | 135:176b8275d35d | 133 | #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x0807FFFFU) |
bogdanm | 92:4fc01daae5a5 | 134 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx */ |
bogdanm | 92:4fc01daae5a5 | 135 | |
Kojto | 122:f9eeca106725 | 136 | #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) \ |
Kojto | 122:f9eeca106725 | 137 | || defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
<> | 135:176b8275d35d | 138 | #define IS_FLASH_NB_PAGES(ADDRESS,NBPAGES) (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x40U) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x0800FFFFU) : \ |
<> | 135:176b8275d35d | 139 | (((*((uint16_t *)FLASH_SIZE_DATA_REGISTER)) == 0x20U) ? ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x08007FFFU) : \ |
<> | 135:176b8275d35d | 140 | ((ADDRESS)+((NBPAGES)*FLASH_PAGE_SIZE)-1U <= 0x08003FFFU))) |
bogdanm | 86:04dd9b1680ae | 141 | #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */ |
bogdanm | 86:04dd9b1680ae | 142 | /* STM32F303x8 || STM32F334x8 || STM32F328xx */ |
Kojto | 122:f9eeca106725 | 143 | |
bogdanm | 86:04dd9b1680ae | 144 | /** |
bogdanm | 86:04dd9b1680ae | 145 | * @} |
bogdanm | 86:04dd9b1680ae | 146 | */ |
bogdanm | 86:04dd9b1680ae | 147 | |
Kojto | 122:f9eeca106725 | 148 | /* Exported types ------------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 149 | /** @defgroup FLASHEx_Exported_Types FLASHEx Exported Types |
Kojto | 122:f9eeca106725 | 150 | * @{ |
Kojto | 122:f9eeca106725 | 151 | */ |
Kojto | 122:f9eeca106725 | 152 | /** |
Kojto | 122:f9eeca106725 | 153 | * @brief FLASH Erase structure definition |
Kojto | 122:f9eeca106725 | 154 | */ |
Kojto | 122:f9eeca106725 | 155 | typedef struct |
Kojto | 122:f9eeca106725 | 156 | { |
Kojto | 122:f9eeca106725 | 157 | uint32_t TypeErase; /*!< TypeErase: Mass erase or page erase. |
Kojto | 122:f9eeca106725 | 158 | This parameter can be a value of @ref FLASHEx_Type_Erase */ |
Kojto | 122:f9eeca106725 | 159 | |
Kojto | 122:f9eeca106725 | 160 | uint32_t PageAddress; /*!< PageAdress: Initial FLASH page address to erase when mass erase is disabled |
Kojto | 122:f9eeca106725 | 161 | This parameter must be a number between Min_Data = FLASH_BASE and Max_Data = FLASH_BANK1_END */ |
Kojto | 122:f9eeca106725 | 162 | |
Kojto | 122:f9eeca106725 | 163 | uint32_t NbPages; /*!< NbPages: Number of pagess to be erased. |
Kojto | 122:f9eeca106725 | 164 | This parameter must be a value between Min_Data = 1 and Max_Data = (max number of pages - value of initial page)*/ |
Kojto | 122:f9eeca106725 | 165 | |
Kojto | 122:f9eeca106725 | 166 | } FLASH_EraseInitTypeDef; |
Kojto | 122:f9eeca106725 | 167 | |
Kojto | 122:f9eeca106725 | 168 | /** |
Kojto | 122:f9eeca106725 | 169 | * @brief FLASH Options bytes program structure definition |
Kojto | 122:f9eeca106725 | 170 | */ |
Kojto | 122:f9eeca106725 | 171 | typedef struct |
Kojto | 122:f9eeca106725 | 172 | { |
Kojto | 122:f9eeca106725 | 173 | uint32_t OptionType; /*!< OptionType: Option byte to be configured. |
Kojto | 122:f9eeca106725 | 174 | This parameter can be a value of @ref FLASHEx_OB_Type */ |
Kojto | 122:f9eeca106725 | 175 | |
Kojto | 122:f9eeca106725 | 176 | uint32_t WRPState; /*!< WRPState: Write protection activation or deactivation. |
Kojto | 122:f9eeca106725 | 177 | This parameter can be a value of @ref FLASHEx_OB_WRP_State */ |
Kojto | 122:f9eeca106725 | 178 | |
Kojto | 122:f9eeca106725 | 179 | uint32_t WRPPage; /*!< WRPPage: specifies the page(s) to be write protected |
Kojto | 122:f9eeca106725 | 180 | This parameter can be a value of @ref FLASHEx_OB_Write_Protection */ |
Kojto | 122:f9eeca106725 | 181 | |
Kojto | 122:f9eeca106725 | 182 | uint8_t RDPLevel; /*!< RDPLevel: Set the read protection level.. |
Kojto | 122:f9eeca106725 | 183 | This parameter can be a value of @ref FLASHEx_OB_Read_Protection */ |
Kojto | 122:f9eeca106725 | 184 | |
Kojto | 122:f9eeca106725 | 185 | uint8_t USERConfig; /*!< USERConfig: Program the FLASH User Option Byte: |
Kojto | 122:f9eeca106725 | 186 | IWDG / STOP / STDBY / BOOT1 / VDDA_ANALOG / SRAM_PARITY / SDADC12_VDD_MONITOR |
Kojto | 122:f9eeca106725 | 187 | This parameter can be a combination of @ref FLASHEx_OB_IWatchdog, @ref FLASHEx_OB_nRST_STOP, |
Kojto | 122:f9eeca106725 | 188 | @ref FLASHEx_OB_nRST_STDBY, @ref FLASHEx_OB_BOOT1, @ref FLASHEx_OB_VDDA_Analog_Monitoring, |
Kojto | 122:f9eeca106725 | 189 | @ref FLASHEx_OB_RAM_Parity_Check_Enable. |
Kojto | 122:f9eeca106725 | 190 | @if STM32F373xC |
Kojto | 122:f9eeca106725 | 191 | And @ref FLASHEx_OB_SDADC12_VDD_MONITOR (only for STM32F373xC & STM32F378xx devices) |
Kojto | 122:f9eeca106725 | 192 | @endif |
Kojto | 122:f9eeca106725 | 193 | @if STM32F378xx |
Kojto | 122:f9eeca106725 | 194 | And @ref FLASHEx_OB_SDADC12_VDD_MONITOR (only for STM32F373xC & STM32F378xx devices) |
Kojto | 122:f9eeca106725 | 195 | @endif |
Kojto | 122:f9eeca106725 | 196 | */ |
Kojto | 122:f9eeca106725 | 197 | |
Kojto | 122:f9eeca106725 | 198 | uint32_t DATAAddress; /*!< DATAAddress: Address of the option byte DATA to be programmed |
Kojto | 122:f9eeca106725 | 199 | This parameter can be a value of @ref FLASHEx_OB_Data_Address */ |
Kojto | 122:f9eeca106725 | 200 | |
Kojto | 122:f9eeca106725 | 201 | uint8_t DATAData; /*!< DATAData: Data to be stored in the option byte DATA |
<> | 135:176b8275d35d | 202 | This parameter must be a number between Min_Data = 0x00 and Max_Data = 0xFFU */ |
Kojto | 122:f9eeca106725 | 203 | } FLASH_OBProgramInitTypeDef; |
Kojto | 122:f9eeca106725 | 204 | /** |
Kojto | 122:f9eeca106725 | 205 | * @} |
Kojto | 122:f9eeca106725 | 206 | */ |
Kojto | 122:f9eeca106725 | 207 | |
Kojto | 122:f9eeca106725 | 208 | /* Exported constants --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 209 | /** @defgroup FLASHEx_Exported_Constants FLASHEx Exported Constants |
Kojto | 122:f9eeca106725 | 210 | * @{ |
Kojto | 122:f9eeca106725 | 211 | */ |
Kojto | 122:f9eeca106725 | 212 | |
Kojto | 122:f9eeca106725 | 213 | /** @defgroup FLASHEx_Page_Size FLASHEx Page Size |
Kojto | 122:f9eeca106725 | 214 | * @{ |
Kojto | 122:f9eeca106725 | 215 | */ |
Kojto | 122:f9eeca106725 | 216 | #define FLASH_PAGE_SIZE 0x800 |
Kojto | 122:f9eeca106725 | 217 | /** |
Kojto | 122:f9eeca106725 | 218 | * @} |
Kojto | 122:f9eeca106725 | 219 | */ |
Kojto | 122:f9eeca106725 | 220 | |
Kojto | 122:f9eeca106725 | 221 | /** @defgroup FLASHEx_Type_Erase FLASH Type Erase |
Kojto | 122:f9eeca106725 | 222 | * @{ |
Kojto | 122:f9eeca106725 | 223 | */ |
<> | 135:176b8275d35d | 224 | #define FLASH_TYPEERASE_PAGES (0x00U) /*!<Pages erase only*/ |
<> | 135:176b8275d35d | 225 | #define FLASH_TYPEERASE_MASSERASE (0x01U) /*!<Flash mass erase activation*/ |
Kojto | 122:f9eeca106725 | 226 | |
Kojto | 122:f9eeca106725 | 227 | /** |
Kojto | 122:f9eeca106725 | 228 | * @} |
Kojto | 122:f9eeca106725 | 229 | */ |
Kojto | 122:f9eeca106725 | 230 | |
Kojto | 122:f9eeca106725 | 231 | /** @defgroup FLASHEx_OptionByte_Constants Option Byte Constants |
Kojto | 122:f9eeca106725 | 232 | * @{ |
Kojto | 122:f9eeca106725 | 233 | */ |
Kojto | 122:f9eeca106725 | 234 | |
Kojto | 122:f9eeca106725 | 235 | /** @defgroup FLASHEx_OB_Type Option Bytes Type |
Kojto | 122:f9eeca106725 | 236 | * @{ |
Kojto | 122:f9eeca106725 | 237 | */ |
<> | 135:176b8275d35d | 238 | #define OPTIONBYTE_WRP (0x01U) /*!<WRP option byte configuration*/ |
<> | 135:176b8275d35d | 239 | #define OPTIONBYTE_RDP (0x02U) /*!<RDP option byte configuration*/ |
<> | 135:176b8275d35d | 240 | #define OPTIONBYTE_USER (0x04U) /*!<USER option byte configuration*/ |
<> | 135:176b8275d35d | 241 | #define OPTIONBYTE_DATA (0x08U) /*!<DATA option byte configuration*/ |
Kojto | 122:f9eeca106725 | 242 | |
Kojto | 122:f9eeca106725 | 243 | /** |
Kojto | 122:f9eeca106725 | 244 | * @} |
Kojto | 122:f9eeca106725 | 245 | */ |
Kojto | 122:f9eeca106725 | 246 | |
Kojto | 122:f9eeca106725 | 247 | /** @defgroup FLASHEx_OB_WRP_State Option Byte WRP State |
Kojto | 122:f9eeca106725 | 248 | * @{ |
Kojto | 122:f9eeca106725 | 249 | */ |
<> | 135:176b8275d35d | 250 | #define OB_WRPSTATE_DISABLE (0x00U) /*!<Disable the write protection of the desired pages*/ |
<> | 135:176b8275d35d | 251 | #define OB_WRPSTATE_ENABLE (0x01U) /*!<Enable the write protection of the desired pagess*/ |
Kojto | 122:f9eeca106725 | 252 | |
Kojto | 122:f9eeca106725 | 253 | /** |
Kojto | 122:f9eeca106725 | 254 | * @} |
Kojto | 122:f9eeca106725 | 255 | */ |
Kojto | 122:f9eeca106725 | 256 | |
Kojto | 122:f9eeca106725 | 257 | /** @defgroup FLASHEx_OB_Write_Protection FLASHEx OB Write Protection |
bogdanm | 86:04dd9b1680ae | 258 | * @{ |
bogdanm | 86:04dd9b1680ae | 259 | */ |
<> | 135:176b8275d35d | 260 | #define OB_WRP_PAGES0TO1 (0x00000001U) /* Write protection of page 0 to 1 */ |
<> | 135:176b8275d35d | 261 | #define OB_WRP_PAGES2TO3 (0x00000002U) /* Write protection of page 2 to 3 */ |
<> | 135:176b8275d35d | 262 | #define OB_WRP_PAGES4TO5 (0x00000004U) /* Write protection of page 4 to 5 */ |
<> | 135:176b8275d35d | 263 | #define OB_WRP_PAGES6TO7 (0x00000008U) /* Write protection of page 6 to 7 */ |
<> | 135:176b8275d35d | 264 | #define OB_WRP_PAGES8TO9 (0x00000010U) /* Write protection of page 8 to 9 */ |
<> | 135:176b8275d35d | 265 | #define OB_WRP_PAGES10TO11 (0x00000020U) /* Write protection of page 10 to 11 */ |
<> | 135:176b8275d35d | 266 | #define OB_WRP_PAGES12TO13 (0x00000040U) /* Write protection of page 12 to 13 */ |
<> | 135:176b8275d35d | 267 | #define OB_WRP_PAGES14TO15 (0x00000080U) /* Write protection of page 14 to 15 */ |
<> | 135:176b8275d35d | 268 | #define OB_WRP_PAGES16TO17 (0x00000100U) /* Write protection of page 16 to 17 */ |
<> | 135:176b8275d35d | 269 | #define OB_WRP_PAGES18TO19 (0x00000200U) /* Write protection of page 18 to 19 */ |
<> | 135:176b8275d35d | 270 | #define OB_WRP_PAGES20TO21 (0x00000400U) /* Write protection of page 20 to 21 */ |
<> | 135:176b8275d35d | 271 | #define OB_WRP_PAGES22TO23 (0x00000800U) /* Write protection of page 22 to 23 */ |
<> | 135:176b8275d35d | 272 | #define OB_WRP_PAGES24TO25 (0x00001000U) /* Write protection of page 24 to 25 */ |
<> | 135:176b8275d35d | 273 | #define OB_WRP_PAGES26TO27 (0x00002000U) /* Write protection of page 26 to 27 */ |
<> | 135:176b8275d35d | 274 | #define OB_WRP_PAGES28TO29 (0x00004000U) /* Write protection of page 28 to 29 */ |
<> | 135:176b8275d35d | 275 | #define OB_WRP_PAGES30TO31 (0x00008000U) /* Write protection of page 30 to 31 */ |
bogdanm | 92:4fc01daae5a5 | 276 | |
Kojto | 122:f9eeca106725 | 277 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) \ |
Kojto | 122:f9eeca106725 | 278 | || defined(STM32F373xC) || defined(STM32F378xx) |
<> | 135:176b8275d35d | 279 | #define OB_WRP_PAGES32TO33 (0x00010000U) /* Write protection of page 32 to 33 */ |
<> | 135:176b8275d35d | 280 | #define OB_WRP_PAGES34TO35 (0x00020000U) /* Write protection of page 34 to 35 */ |
<> | 135:176b8275d35d | 281 | #define OB_WRP_PAGES36TO37 (0x00040000U) /* Write protection of page 36 to 37 */ |
<> | 135:176b8275d35d | 282 | #define OB_WRP_PAGES38TO39 (0x00080000U) /* Write protection of page 38 to 39 */ |
<> | 135:176b8275d35d | 283 | #define OB_WRP_PAGES40TO41 (0x00100000U) /* Write protection of page 40 to 41 */ |
<> | 135:176b8275d35d | 284 | #define OB_WRP_PAGES42TO43 (0x00200000U) /* Write protection of page 42 to 43 */ |
<> | 135:176b8275d35d | 285 | #define OB_WRP_PAGES44TO45 (0x00400000U) /* Write protection of page 44 to 45 */ |
<> | 135:176b8275d35d | 286 | #define OB_WRP_PAGES46TO47 (0x00800000U) /* Write protection of page 46 to 47 */ |
<> | 135:176b8275d35d | 287 | #define OB_WRP_PAGES48TO49 (0x01000000U) /* Write protection of page 48 to 49 */ |
<> | 135:176b8275d35d | 288 | #define OB_WRP_PAGES50TO51 (0x02000000U) /* Write protection of page 50 to 51 */ |
<> | 135:176b8275d35d | 289 | #define OB_WRP_PAGES52TO53 (0x04000000U) /* Write protection of page 52 to 53 */ |
<> | 135:176b8275d35d | 290 | #define OB_WRP_PAGES54TO55 (0x08000000U) /* Write protection of page 54 to 55 */ |
<> | 135:176b8275d35d | 291 | #define OB_WRP_PAGES56TO57 (0x10000000U) /* Write protection of page 56 to 57 */ |
<> | 135:176b8275d35d | 292 | #define OB_WRP_PAGES58TO59 (0x20000000U) /* Write protection of page 58 to 59 */ |
<> | 135:176b8275d35d | 293 | #define OB_WRP_PAGES60TO61 (0x40000000U) /* Write protection of page 60 to 61 */ |
<> | 135:176b8275d35d | 294 | #define OB_WRP_PAGES62TO127 (0x80000000U) /* Write protection of page 62 to 127 */ |
bogdanm | 92:4fc01daae5a5 | 295 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
bogdanm | 92:4fc01daae5a5 | 296 | /* STM32F373xC || STM32F378xx */ |
bogdanm | 92:4fc01daae5a5 | 297 | |
bogdanm | 92:4fc01daae5a5 | 298 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) |
<> | 135:176b8275d35d | 299 | #define OB_WRP_PAGES32TO33 (0x00010000U) /* Write protection of page 32 to 33 */ |
<> | 135:176b8275d35d | 300 | #define OB_WRP_PAGES34TO35 (0x00020000U) /* Write protection of page 34 to 35 */ |
<> | 135:176b8275d35d | 301 | #define OB_WRP_PAGES36TO37 (0x00040000U) /* Write protection of page 36 to 37 */ |
<> | 135:176b8275d35d | 302 | #define OB_WRP_PAGES38TO39 (0x00080000U) /* Write protection of page 38 to 39 */ |
<> | 135:176b8275d35d | 303 | #define OB_WRP_PAGES40TO41 (0x00100000U) /* Write protection of page 40 to 41 */ |
<> | 135:176b8275d35d | 304 | #define OB_WRP_PAGES42TO43 (0x00200000U) /* Write protection of page 42 to 43 */ |
<> | 135:176b8275d35d | 305 | #define OB_WRP_PAGES44TO45 (0x00400000U) /* Write protection of page 44 to 45 */ |
<> | 135:176b8275d35d | 306 | #define OB_WRP_PAGES46TO47 (0x00800000U) /* Write protection of page 46 to 47 */ |
<> | 135:176b8275d35d | 307 | #define OB_WRP_PAGES48TO49 (0x01000000U) /* Write protection of page 48 to 49 */ |
<> | 135:176b8275d35d | 308 | #define OB_WRP_PAGES50TO51 (0x02000000U) /* Write protection of page 50 to 51 */ |
<> | 135:176b8275d35d | 309 | #define OB_WRP_PAGES52TO53 (0x04000000U) /* Write protection of page 52 to 53 */ |
<> | 135:176b8275d35d | 310 | #define OB_WRP_PAGES54TO55 (0x08000000U) /* Write protection of page 54 to 55 */ |
<> | 135:176b8275d35d | 311 | #define OB_WRP_PAGES56TO57 (0x10000000U) /* Write protection of page 56 to 57 */ |
<> | 135:176b8275d35d | 312 | #define OB_WRP_PAGES58TO59 (0x20000000U) /* Write protection of page 58 to 59 */ |
<> | 135:176b8275d35d | 313 | #define OB_WRP_PAGES60TO61 (0x40000000U) /* Write protection of page 60 to 61 */ |
<> | 135:176b8275d35d | 314 | #define OB_WRP_PAGES62TO255 (0x80000000U) /* Write protection of page 62 to 255 */ |
bogdanm | 92:4fc01daae5a5 | 315 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx */ |
bogdanm | 86:04dd9b1680ae | 316 | |
<> | 135:176b8275d35d | 317 | #define OB_WRP_PAGES0TO15MASK (0x000000FFU) |
<> | 135:176b8275d35d | 318 | #define OB_WRP_PAGES16TO31MASK (0x0000FF00U) |
bogdanm | 92:4fc01daae5a5 | 319 | |
Kojto | 122:f9eeca106725 | 320 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) \ |
Kojto | 122:f9eeca106725 | 321 | || defined(STM32F373xC) || defined(STM32F378xx) |
<> | 135:176b8275d35d | 322 | #define OB_WRP_PAGES32TO47MASK (0x00FF0000U) |
<> | 135:176b8275d35d | 323 | #define OB_WRP_PAGES48TO127MASK (0xFF000000U) |
bogdanm | 92:4fc01daae5a5 | 324 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
bogdanm | 92:4fc01daae5a5 | 325 | /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 326 | |
bogdanm | 92:4fc01daae5a5 | 327 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) |
<> | 135:176b8275d35d | 328 | #define OB_WRP_PAGES32TO47MASK (0x00FF0000U) |
<> | 135:176b8275d35d | 329 | #define OB_WRP_PAGES48TO255MASK (0xFF000000U) |
bogdanm | 92:4fc01daae5a5 | 330 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx */ |
bogdanm | 92:4fc01daae5a5 | 331 | |
Kojto | 122:f9eeca106725 | 332 | #if defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) \ |
Kojto | 122:f9eeca106725 | 333 | || defined(STM32F373xC) || defined(STM32F378xx) |
<> | 135:176b8275d35d | 334 | #define OB_WRP_PAGES32TO47MASK (0x00FF0000U) |
<> | 135:176b8275d35d | 335 | #define OB_WRP_PAGES48TO127MASK (0xFF000000U) |
bogdanm | 92:4fc01daae5a5 | 336 | #endif /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
bogdanm | 92:4fc01daae5a5 | 337 | /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 338 | |
Kojto | 122:f9eeca106725 | 339 | #if defined(STM32F302xE) || defined(STM32F303xE) || defined(STM32F398xx) \ |
Kojto | 122:f9eeca106725 | 340 | || defined(STM32F302xC) || defined(STM32F303xC) || defined(STM32F358xx) \ |
Kojto | 122:f9eeca106725 | 341 | || defined(STM32F373xC) || defined(STM32F378xx) |
<> | 135:176b8275d35d | 342 | #define OB_WRP_ALLPAGES (0xFFFFFFFFU) /*!< Write protection of all pages */ |
bogdanm | 92:4fc01daae5a5 | 343 | #endif /* STM32F302xE || STM32F303xE || STM32F398xx || */ |
bogdanm | 92:4fc01daae5a5 | 344 | /* STM32F302xC || STM32F303xC || STM32F358xx || */ |
bogdanm | 92:4fc01daae5a5 | 345 | /* STM32F373xC || STM32F378xx */ |
bogdanm | 86:04dd9b1680ae | 346 | |
Kojto | 122:f9eeca106725 | 347 | #if defined(STM32F301x8) || defined(STM32F302x8) || defined(STM32F318xx) \ |
Kojto | 122:f9eeca106725 | 348 | || defined(STM32F303x8) || defined(STM32F334x8) || defined(STM32F328xx) |
<> | 135:176b8275d35d | 349 | #define OB_WRP_ALLPAGES (0x0000FFFFU) /*!< Write protection of all pages */ |
bogdanm | 86:04dd9b1680ae | 350 | #endif /* STM32F301x8 || STM32F302x8 || STM32F318xx || */ |
bogdanm | 92:4fc01daae5a5 | 351 | /* STM32F303x8 || STM32F334x8 || STM32F328xx */ |
bogdanm | 86:04dd9b1680ae | 352 | |
Kojto | 122:f9eeca106725 | 353 | /** |
Kojto | 122:f9eeca106725 | 354 | * @} |
Kojto | 122:f9eeca106725 | 355 | */ |
Kojto | 122:f9eeca106725 | 356 | |
Kojto | 122:f9eeca106725 | 357 | /** @defgroup FLASHEx_OB_Read_Protection Option Byte Read Protection |
Kojto | 122:f9eeca106725 | 358 | * @{ |
Kojto | 122:f9eeca106725 | 359 | */ |
<> | 135:176b8275d35d | 360 | #define OB_RDP_LEVEL_0 ((uint8_t)0xAAU) |
<> | 135:176b8275d35d | 361 | #define OB_RDP_LEVEL_1 ((uint8_t)0xBBU) |
<> | 135:176b8275d35d | 362 | #define OB_RDP_LEVEL_2 ((uint8_t)0xCCU) /*!< Warning: When enabling read protection level 2 |
<> | 135:176b8275d35d | 363 | it's no more possible to go back to level 1 or 0U */ |
Kojto | 122:f9eeca106725 | 364 | /** |
Kojto | 122:f9eeca106725 | 365 | * @} |
Kojto | 122:f9eeca106725 | 366 | */ |
Kojto | 122:f9eeca106725 | 367 | |
Kojto | 122:f9eeca106725 | 368 | /** @defgroup FLASHEx_OB_IWatchdog Option Byte IWatchdog |
Kojto | 122:f9eeca106725 | 369 | * @{ |
Kojto | 122:f9eeca106725 | 370 | */ |
<> | 135:176b8275d35d | 371 | #define OB_IWDG_SW ((uint8_t)0x01U) /*!< Software IWDG selected */ |
<> | 135:176b8275d35d | 372 | #define OB_IWDG_HW ((uint8_t)0x00U) /*!< Hardware IWDG selected */ |
Kojto | 122:f9eeca106725 | 373 | /** |
Kojto | 122:f9eeca106725 | 374 | * @} |
Kojto | 122:f9eeca106725 | 375 | */ |
Kojto | 122:f9eeca106725 | 376 | |
Kojto | 122:f9eeca106725 | 377 | /** @defgroup FLASHEx_OB_nRST_STOP Option Byte nRST STOP |
Kojto | 122:f9eeca106725 | 378 | * @{ |
Kojto | 122:f9eeca106725 | 379 | */ |
<> | 135:176b8275d35d | 380 | #define OB_STOP_NO_RST ((uint8_t)0x02U) /*!< No reset generated when entering in STOP */ |
<> | 135:176b8275d35d | 381 | #define OB_STOP_RST ((uint8_t)0x00U) /*!< Reset generated when entering in STOP */ |
bogdanm | 86:04dd9b1680ae | 382 | /** |
bogdanm | 86:04dd9b1680ae | 383 | * @} |
bogdanm | 86:04dd9b1680ae | 384 | */ |
bogdanm | 86:04dd9b1680ae | 385 | |
Kojto | 122:f9eeca106725 | 386 | /** @defgroup FLASHEx_OB_nRST_STDBY Option Byte nRST STDBY |
Kojto | 122:f9eeca106725 | 387 | * @{ |
Kojto | 122:f9eeca106725 | 388 | */ |
<> | 135:176b8275d35d | 389 | #define OB_STDBY_NO_RST ((uint8_t)0x04U) /*!< No reset generated when entering in STANDBY */ |
<> | 135:176b8275d35d | 390 | #define OB_STDBY_RST ((uint8_t)0x00U) /*!< Reset generated when entering in STANDBY */ |
Kojto | 122:f9eeca106725 | 391 | /** |
Kojto | 122:f9eeca106725 | 392 | * @} |
Kojto | 122:f9eeca106725 | 393 | */ |
Kojto | 122:f9eeca106725 | 394 | |
Kojto | 122:f9eeca106725 | 395 | /** @defgroup FLASHEx_OB_BOOT1 Option Byte BOOT1 |
Kojto | 122:f9eeca106725 | 396 | * @{ |
Kojto | 122:f9eeca106725 | 397 | */ |
<> | 135:176b8275d35d | 398 | #define OB_BOOT1_RESET ((uint8_t)0x00U) /*!< BOOT1 Reset */ |
<> | 135:176b8275d35d | 399 | #define OB_BOOT1_SET ((uint8_t)0x10U) /*!< BOOT1 Set */ |
Kojto | 122:f9eeca106725 | 400 | /** |
Kojto | 122:f9eeca106725 | 401 | * @} |
Kojto | 122:f9eeca106725 | 402 | */ |
Kojto | 122:f9eeca106725 | 403 | |
Kojto | 122:f9eeca106725 | 404 | /** @defgroup FLASHEx_OB_VDDA_Analog_Monitoring Option Byte VDDA Analog Monitoring |
Kojto | 122:f9eeca106725 | 405 | * @{ |
Kojto | 122:f9eeca106725 | 406 | */ |
<> | 135:176b8275d35d | 407 | #define OB_VDDA_ANALOG_ON ((uint8_t)0x20U) /*!< Analog monitoring on VDDA Power source ON */ |
<> | 135:176b8275d35d | 408 | #define OB_VDDA_ANALOG_OFF ((uint8_t)0x00U) /*!< Analog monitoring on VDDA Power source OFF */ |
Kojto | 122:f9eeca106725 | 409 | /** |
Kojto | 122:f9eeca106725 | 410 | * @} |
Kojto | 122:f9eeca106725 | 411 | */ |
Kojto | 122:f9eeca106725 | 412 | |
Kojto | 122:f9eeca106725 | 413 | /** @defgroup FLASHEx_OB_RAM_Parity_Check_Enable Option Byte SRAM Parity Check Enable |
Kojto | 122:f9eeca106725 | 414 | * @{ |
Kojto | 122:f9eeca106725 | 415 | */ |
<> | 135:176b8275d35d | 416 | #define OB_SRAM_PARITY_SET ((uint8_t)0x00U) /*!< SRAM parity check enable set */ |
<> | 135:176b8275d35d | 417 | #define OB_SRAM_PARITY_RESET ((uint8_t)0x40U) /*!< SRAM parity check enable reset */ |
Kojto | 122:f9eeca106725 | 418 | /** |
Kojto | 122:f9eeca106725 | 419 | * @} |
Kojto | 122:f9eeca106725 | 420 | */ |
Kojto | 122:f9eeca106725 | 421 | |
Kojto | 122:f9eeca106725 | 422 | |
Kojto | 122:f9eeca106725 | 423 | #if defined(FLASH_OBR_SDADC12_VDD_MONITOR) |
Kojto | 122:f9eeca106725 | 424 | /** @defgroup FLASHEx_OB_SDADC12_VDD_MONITOR OB SDADC12 VDD MONITOR |
bogdanm | 86:04dd9b1680ae | 425 | * @{ |
bogdanm | 86:04dd9b1680ae | 426 | */ |
<> | 135:176b8275d35d | 427 | #define OB_SDACD_VDD_MONITOR_RESET ((uint8_t)0x00U) /*!< SDADC VDD Monitor reset */ |
<> | 135:176b8275d35d | 428 | #define OB_SDACD_VDD_MONITOR_SET ((uint8_t)0x80U) /*!< SDADC VDD Monitor set */ |
bogdanm | 86:04dd9b1680ae | 429 | |
bogdanm | 86:04dd9b1680ae | 430 | /** |
bogdanm | 86:04dd9b1680ae | 431 | * @} |
bogdanm | 86:04dd9b1680ae | 432 | */ |
Kojto | 122:f9eeca106725 | 433 | #endif /* FLASH_OBR_SDADC12_VDD_MONITOR */ |
bogdanm | 86:04dd9b1680ae | 434 | |
Kojto | 122:f9eeca106725 | 435 | /** @defgroup FLASHEx_OB_Data_Address Option Byte Data Address |
bogdanm | 92:4fc01daae5a5 | 436 | * @{ |
bogdanm | 92:4fc01daae5a5 | 437 | */ |
<> | 135:176b8275d35d | 438 | #define OB_DATA_ADDRESS_DATA0 (0x1FFFF804U) |
<> | 135:176b8275d35d | 439 | #define OB_DATA_ADDRESS_DATA1 (0x1FFFF806U) |
bogdanm | 86:04dd9b1680ae | 440 | /** |
bogdanm | 86:04dd9b1680ae | 441 | * @} |
bogdanm | 86:04dd9b1680ae | 442 | */ |
bogdanm | 86:04dd9b1680ae | 443 | |
bogdanm | 86:04dd9b1680ae | 444 | /** |
bogdanm | 86:04dd9b1680ae | 445 | * @} |
bogdanm | 86:04dd9b1680ae | 446 | */ |
bogdanm | 92:4fc01daae5a5 | 447 | |
bogdanm | 92:4fc01daae5a5 | 448 | /** |
bogdanm | 92:4fc01daae5a5 | 449 | * @} |
bogdanm | 92:4fc01daae5a5 | 450 | */ |
bogdanm | 92:4fc01daae5a5 | 451 | |
Kojto | 122:f9eeca106725 | 452 | /* Exported functions --------------------------------------------------------*/ |
Kojto | 122:f9eeca106725 | 453 | /** @addtogroup FLASHEx_Exported_Functions |
Kojto | 122:f9eeca106725 | 454 | * @{ |
Kojto | 122:f9eeca106725 | 455 | */ |
Kojto | 122:f9eeca106725 | 456 | |
Kojto | 122:f9eeca106725 | 457 | /** @addtogroup FLASHEx_Exported_Functions_Group1 |
Kojto | 122:f9eeca106725 | 458 | * @{ |
Kojto | 122:f9eeca106725 | 459 | */ |
Kojto | 122:f9eeca106725 | 460 | /* IO operation functions *****************************************************/ |
Kojto | 122:f9eeca106725 | 461 | HAL_StatusTypeDef HAL_FLASHEx_Erase(FLASH_EraseInitTypeDef *pEraseInit, uint32_t *PageError); |
Kojto | 122:f9eeca106725 | 462 | HAL_StatusTypeDef HAL_FLASHEx_Erase_IT(FLASH_EraseInitTypeDef *pEraseInit); |
Kojto | 122:f9eeca106725 | 463 | |
Kojto | 122:f9eeca106725 | 464 | /** |
Kojto | 122:f9eeca106725 | 465 | * @} |
Kojto | 122:f9eeca106725 | 466 | */ |
Kojto | 122:f9eeca106725 | 467 | |
Kojto | 122:f9eeca106725 | 468 | /** @addtogroup FLASHEx_Exported_Functions_Group2 |
Kojto | 122:f9eeca106725 | 469 | * @{ |
Kojto | 122:f9eeca106725 | 470 | */ |
Kojto | 122:f9eeca106725 | 471 | /* Peripheral Control functions ***********************************************/ |
Kojto | 122:f9eeca106725 | 472 | HAL_StatusTypeDef HAL_FLASHEx_OBErase(void); |
Kojto | 122:f9eeca106725 | 473 | HAL_StatusTypeDef HAL_FLASHEx_OBProgram(FLASH_OBProgramInitTypeDef *pOBInit); |
Kojto | 122:f9eeca106725 | 474 | void HAL_FLASHEx_OBGetConfig(FLASH_OBProgramInitTypeDef *pOBInit); |
Kojto | 122:f9eeca106725 | 475 | uint32_t HAL_FLASHEx_OBGetUserData(uint32_t DATAAdress); |
Kojto | 122:f9eeca106725 | 476 | |
bogdanm | 92:4fc01daae5a5 | 477 | /** |
bogdanm | 92:4fc01daae5a5 | 478 | * @} |
bogdanm | 92:4fc01daae5a5 | 479 | */ |
Kojto | 122:f9eeca106725 | 480 | |
Kojto | 122:f9eeca106725 | 481 | /** |
Kojto | 122:f9eeca106725 | 482 | * @} |
Kojto | 122:f9eeca106725 | 483 | */ |
Kojto | 122:f9eeca106725 | 484 | |
Kojto | 122:f9eeca106725 | 485 | /** |
Kojto | 122:f9eeca106725 | 486 | * @} |
Kojto | 122:f9eeca106725 | 487 | */ |
Kojto | 122:f9eeca106725 | 488 | |
Kojto | 122:f9eeca106725 | 489 | /** |
Kojto | 122:f9eeca106725 | 490 | * @} |
Kojto | 122:f9eeca106725 | 491 | */ |
Kojto | 122:f9eeca106725 | 492 | |
bogdanm | 86:04dd9b1680ae | 493 | #ifdef __cplusplus |
bogdanm | 86:04dd9b1680ae | 494 | } |
bogdanm | 86:04dd9b1680ae | 495 | #endif |
bogdanm | 86:04dd9b1680ae | 496 | |
bogdanm | 86:04dd9b1680ae | 497 | #endif /* __STM32F3xx_HAL_FLASH_EX_H */ |
bogdanm | 86:04dd9b1680ae | 498 | |
bogdanm | 86:04dd9b1680ae | 499 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |
Kojto | 122:f9eeca106725 | 500 |