Important changes to repositories hosted on mbed.com
Mbed hosted mercurial repositories are deprecated and are due to be permanently deleted in July 2026.
To keep a copy of this software download the repository Zip archive or clone locally using Mercurial.
It is also possible to export all your personal repositories from the account settings page.
HAL_L476/stm32l4xx_hal_nor.h@1:d0dfbce63a89, 2017-02-24 (annotated)
- Committer:
- elmot
- Date:
- Fri Feb 24 21:13:56 2017 +0000
- Revision:
- 1:d0dfbce63a89
Ready-to-copy
Who changed what in which revision?
| User | Revision | Line number | New contents of line |
|---|---|---|---|
| elmot | 1:d0dfbce63a89 | 1 | /** |
| elmot | 1:d0dfbce63a89 | 2 | ****************************************************************************** |
| elmot | 1:d0dfbce63a89 | 3 | * @file stm32l4xx_hal_nor.h |
| elmot | 1:d0dfbce63a89 | 4 | * @author MCD Application Team |
| elmot | 1:d0dfbce63a89 | 5 | * @version V1.5.1 |
| elmot | 1:d0dfbce63a89 | 6 | * @date 31-May-2016 |
| elmot | 1:d0dfbce63a89 | 7 | * @brief Header file of NOR HAL module. |
| elmot | 1:d0dfbce63a89 | 8 | ****************************************************************************** |
| elmot | 1:d0dfbce63a89 | 9 | * @attention |
| elmot | 1:d0dfbce63a89 | 10 | * |
| elmot | 1:d0dfbce63a89 | 11 | * <h2><center>© COPYRIGHT(c) 2016 STMicroelectronics</center></h2> |
| elmot | 1:d0dfbce63a89 | 12 | * |
| elmot | 1:d0dfbce63a89 | 13 | * Redistribution and use in source and binary forms, with or without modification, |
| elmot | 1:d0dfbce63a89 | 14 | * are permitted provided that the following conditions are met: |
| elmot | 1:d0dfbce63a89 | 15 | * 1. Redistributions of source code must retain the above copyright notice, |
| elmot | 1:d0dfbce63a89 | 16 | * this list of conditions and the following disclaimer. |
| elmot | 1:d0dfbce63a89 | 17 | * 2. Redistributions in binary form must reproduce the above copyright notice, |
| elmot | 1:d0dfbce63a89 | 18 | * this list of conditions and the following disclaimer in the documentation |
| elmot | 1:d0dfbce63a89 | 19 | * and/or other materials provided with the distribution. |
| elmot | 1:d0dfbce63a89 | 20 | * 3. Neither the name of STMicroelectronics nor the names of its contributors |
| elmot | 1:d0dfbce63a89 | 21 | * may be used to endorse or promote products derived from this software |
| elmot | 1:d0dfbce63a89 | 22 | * without specific prior written permission. |
| elmot | 1:d0dfbce63a89 | 23 | * |
| elmot | 1:d0dfbce63a89 | 24 | * THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" |
| elmot | 1:d0dfbce63a89 | 25 | * AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE |
| elmot | 1:d0dfbce63a89 | 26 | * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE |
| elmot | 1:d0dfbce63a89 | 27 | * DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE |
| elmot | 1:d0dfbce63a89 | 28 | * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL |
| elmot | 1:d0dfbce63a89 | 29 | * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR |
| elmot | 1:d0dfbce63a89 | 30 | * SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER |
| elmot | 1:d0dfbce63a89 | 31 | * CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, |
| elmot | 1:d0dfbce63a89 | 32 | * OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE |
| elmot | 1:d0dfbce63a89 | 33 | * OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. |
| elmot | 1:d0dfbce63a89 | 34 | * |
| elmot | 1:d0dfbce63a89 | 35 | ****************************************************************************** |
| elmot | 1:d0dfbce63a89 | 36 | */ |
| elmot | 1:d0dfbce63a89 | 37 | |
| elmot | 1:d0dfbce63a89 | 38 | /* Define to prevent recursive inclusion -------------------------------------*/ |
| elmot | 1:d0dfbce63a89 | 39 | #ifndef __STM32L4xx_HAL_NOR_H |
| elmot | 1:d0dfbce63a89 | 40 | #define __STM32L4xx_HAL_NOR_H |
| elmot | 1:d0dfbce63a89 | 41 | |
| elmot | 1:d0dfbce63a89 | 42 | #ifdef __cplusplus |
| elmot | 1:d0dfbce63a89 | 43 | extern "C" { |
| elmot | 1:d0dfbce63a89 | 44 | #endif |
| elmot | 1:d0dfbce63a89 | 45 | |
| elmot | 1:d0dfbce63a89 | 46 | #if defined(STM32L471xx) || defined(STM32L475xx) || defined(STM32L476xx) || defined(STM32L485xx) || defined(STM32L486xx) |
| elmot | 1:d0dfbce63a89 | 47 | |
| elmot | 1:d0dfbce63a89 | 48 | /* Includes ------------------------------------------------------------------*/ |
| elmot | 1:d0dfbce63a89 | 49 | #include "stm32l4xx_ll_fmc.h" |
| elmot | 1:d0dfbce63a89 | 50 | |
| elmot | 1:d0dfbce63a89 | 51 | |
| elmot | 1:d0dfbce63a89 | 52 | /** @addtogroup STM32L4xx_HAL_Driver |
| elmot | 1:d0dfbce63a89 | 53 | * @{ |
| elmot | 1:d0dfbce63a89 | 54 | */ |
| elmot | 1:d0dfbce63a89 | 55 | |
| elmot | 1:d0dfbce63a89 | 56 | /** @addtogroup NOR |
| elmot | 1:d0dfbce63a89 | 57 | * @{ |
| elmot | 1:d0dfbce63a89 | 58 | */ |
| elmot | 1:d0dfbce63a89 | 59 | |
| elmot | 1:d0dfbce63a89 | 60 | /** @addtogroup NOR_Private_Constants |
| elmot | 1:d0dfbce63a89 | 61 | * @{ |
| elmot | 1:d0dfbce63a89 | 62 | */ |
| elmot | 1:d0dfbce63a89 | 63 | |
| elmot | 1:d0dfbce63a89 | 64 | /* NOR device IDs addresses */ |
| elmot | 1:d0dfbce63a89 | 65 | #define MC_ADDRESS ((uint16_t)0x0000) |
| elmot | 1:d0dfbce63a89 | 66 | #define DEVICE_CODE1_ADDR ((uint16_t)0x0001) |
| elmot | 1:d0dfbce63a89 | 67 | #define DEVICE_CODE2_ADDR ((uint16_t)0x000E) |
| elmot | 1:d0dfbce63a89 | 68 | #define DEVICE_CODE3_ADDR ((uint16_t)0x000F) |
| elmot | 1:d0dfbce63a89 | 69 | |
| elmot | 1:d0dfbce63a89 | 70 | /* NOR CFI IDs addresses */ |
| elmot | 1:d0dfbce63a89 | 71 | #define CFI1_ADDRESS ((uint16_t)0x10) |
| elmot | 1:d0dfbce63a89 | 72 | #define CFI2_ADDRESS ((uint16_t)0x11) |
| elmot | 1:d0dfbce63a89 | 73 | #define CFI3_ADDRESS ((uint16_t)0x12) |
| elmot | 1:d0dfbce63a89 | 74 | #define CFI4_ADDRESS ((uint16_t)0x13) |
| elmot | 1:d0dfbce63a89 | 75 | |
| elmot | 1:d0dfbce63a89 | 76 | /* NOR memory data width */ |
| elmot | 1:d0dfbce63a89 | 77 | #define NOR_MEMORY_8B ((uint8_t)0x0) |
| elmot | 1:d0dfbce63a89 | 78 | #define NOR_MEMORY_16B ((uint8_t)0x1) |
| elmot | 1:d0dfbce63a89 | 79 | |
| elmot | 1:d0dfbce63a89 | 80 | /* NOR memory device read/write start address */ |
| elmot | 1:d0dfbce63a89 | 81 | #define NOR_MEMORY_ADRESS1 FMC_BANK1_1 |
| elmot | 1:d0dfbce63a89 | 82 | #define NOR_MEMORY_ADRESS2 FMC_BANK1_2 |
| elmot | 1:d0dfbce63a89 | 83 | #define NOR_MEMORY_ADRESS3 FMC_BANK1_3 |
| elmot | 1:d0dfbce63a89 | 84 | #define NOR_MEMORY_ADRESS4 FMC_BANK1_4 |
| elmot | 1:d0dfbce63a89 | 85 | |
| elmot | 1:d0dfbce63a89 | 86 | /** |
| elmot | 1:d0dfbce63a89 | 87 | * @} |
| elmot | 1:d0dfbce63a89 | 88 | */ |
| elmot | 1:d0dfbce63a89 | 89 | |
| elmot | 1:d0dfbce63a89 | 90 | /** @addtogroup NOR_Private_Macros |
| elmot | 1:d0dfbce63a89 | 91 | * @{ |
| elmot | 1:d0dfbce63a89 | 92 | */ |
| elmot | 1:d0dfbce63a89 | 93 | |
| elmot | 1:d0dfbce63a89 | 94 | /** |
| elmot | 1:d0dfbce63a89 | 95 | * @brief NOR memory address shifting. |
| elmot | 1:d0dfbce63a89 | 96 | * @param __NOR_ADDRESS: NOR base address |
| elmot | 1:d0dfbce63a89 | 97 | * @param __NOR_MEMORY_WIDTH_: NOR memory width |
| elmot | 1:d0dfbce63a89 | 98 | * @param __ADDRESS__: NOR memory address |
| elmot | 1:d0dfbce63a89 | 99 | * @retval NOR shifted address value |
| elmot | 1:d0dfbce63a89 | 100 | */ |
| elmot | 1:d0dfbce63a89 | 101 | #define NOR_ADDR_SHIFT(__NOR_ADDRESS, __NOR_MEMORY_WIDTH_, __ADDRESS__) \ |
| elmot | 1:d0dfbce63a89 | 102 | ((uint32_t)(((__NOR_MEMORY_WIDTH_) == NOR_MEMORY_16B)? \ |
| elmot | 1:d0dfbce63a89 | 103 | ((uint32_t)((__NOR_ADDRESS) + (2 * (__ADDRESS__)))): \ |
| elmot | 1:d0dfbce63a89 | 104 | ((uint32_t)((__NOR_ADDRESS) + (__ADDRESS__))))) |
| elmot | 1:d0dfbce63a89 | 105 | |
| elmot | 1:d0dfbce63a89 | 106 | /** |
| elmot | 1:d0dfbce63a89 | 107 | * @brief NOR memory write data to specified address. |
| elmot | 1:d0dfbce63a89 | 108 | * @param __ADDRESS__: NOR memory address |
| elmot | 1:d0dfbce63a89 | 109 | * @param __DATA__: Data to write |
| elmot | 1:d0dfbce63a89 | 110 | * @retval None |
| elmot | 1:d0dfbce63a89 | 111 | */ |
| elmot | 1:d0dfbce63a89 | 112 | #define NOR_WRITE(__ADDRESS__, __DATA__) (*(__IO uint16_t *)((uint32_t)(__ADDRESS__)) = (__DATA__)) |
| elmot | 1:d0dfbce63a89 | 113 | |
| elmot | 1:d0dfbce63a89 | 114 | /** |
| elmot | 1:d0dfbce63a89 | 115 | * @} |
| elmot | 1:d0dfbce63a89 | 116 | */ |
| elmot | 1:d0dfbce63a89 | 117 | |
| elmot | 1:d0dfbce63a89 | 118 | /* Exported typedef ----------------------------------------------------------*/ |
| elmot | 1:d0dfbce63a89 | 119 | /** @defgroup NOR_Exported_Types NOR Exported Types |
| elmot | 1:d0dfbce63a89 | 120 | * @{ |
| elmot | 1:d0dfbce63a89 | 121 | */ |
| elmot | 1:d0dfbce63a89 | 122 | |
| elmot | 1:d0dfbce63a89 | 123 | /** |
| elmot | 1:d0dfbce63a89 | 124 | * @brief HAL SRAM State structures definition |
| elmot | 1:d0dfbce63a89 | 125 | */ |
| elmot | 1:d0dfbce63a89 | 126 | typedef enum |
| elmot | 1:d0dfbce63a89 | 127 | { |
| elmot | 1:d0dfbce63a89 | 128 | HAL_NOR_STATE_RESET = 0x00, /*!< NOR not yet initialized or disabled */ |
| elmot | 1:d0dfbce63a89 | 129 | HAL_NOR_STATE_READY = 0x01, /*!< NOR initialized and ready for use */ |
| elmot | 1:d0dfbce63a89 | 130 | HAL_NOR_STATE_BUSY = 0x02, /*!< NOR internal processing is ongoing */ |
| elmot | 1:d0dfbce63a89 | 131 | HAL_NOR_STATE_ERROR = 0x03, /*!< NOR error state */ |
| elmot | 1:d0dfbce63a89 | 132 | HAL_NOR_STATE_PROTECTED = 0x04 /*!< NOR NORSRAM device write protected */ |
| elmot | 1:d0dfbce63a89 | 133 | }HAL_NOR_StateTypeDef; |
| elmot | 1:d0dfbce63a89 | 134 | |
| elmot | 1:d0dfbce63a89 | 135 | /** |
| elmot | 1:d0dfbce63a89 | 136 | * @brief FMC NOR Status typedef |
| elmot | 1:d0dfbce63a89 | 137 | */ |
| elmot | 1:d0dfbce63a89 | 138 | typedef enum |
| elmot | 1:d0dfbce63a89 | 139 | { |
| elmot | 1:d0dfbce63a89 | 140 | HAL_NOR_STATUS_SUCCESS = 0, |
| elmot | 1:d0dfbce63a89 | 141 | HAL_NOR_STATUS_ONGOING, |
| elmot | 1:d0dfbce63a89 | 142 | HAL_NOR_STATUS_ERROR, |
| elmot | 1:d0dfbce63a89 | 143 | HAL_NOR_STATUS_TIMEOUT |
| elmot | 1:d0dfbce63a89 | 144 | }HAL_NOR_StatusTypeDef; |
| elmot | 1:d0dfbce63a89 | 145 | |
| elmot | 1:d0dfbce63a89 | 146 | /** |
| elmot | 1:d0dfbce63a89 | 147 | * @brief FMC NOR ID typedef |
| elmot | 1:d0dfbce63a89 | 148 | */ |
| elmot | 1:d0dfbce63a89 | 149 | typedef struct |
| elmot | 1:d0dfbce63a89 | 150 | { |
| elmot | 1:d0dfbce63a89 | 151 | uint16_t Manufacturer_Code; /*!< Defines the device's manufacturer code used to identify the memory */ |
| elmot | 1:d0dfbce63a89 | 152 | |
| elmot | 1:d0dfbce63a89 | 153 | uint16_t Device_Code1; |
| elmot | 1:d0dfbce63a89 | 154 | |
| elmot | 1:d0dfbce63a89 | 155 | uint16_t Device_Code2; |
| elmot | 1:d0dfbce63a89 | 156 | |
| elmot | 1:d0dfbce63a89 | 157 | uint16_t Device_Code3; /*!< Defines the device's codes used to identify the memory. |
| elmot | 1:d0dfbce63a89 | 158 | These codes can be accessed by performing read operations with specific |
| elmot | 1:d0dfbce63a89 | 159 | control signals and addresses set.They can also be accessed by issuing |
| elmot | 1:d0dfbce63a89 | 160 | an Auto Select command. */ |
| elmot | 1:d0dfbce63a89 | 161 | }NOR_IDTypeDef; |
| elmot | 1:d0dfbce63a89 | 162 | |
| elmot | 1:d0dfbce63a89 | 163 | /** |
| elmot | 1:d0dfbce63a89 | 164 | * @brief FMC NOR CFI typedef |
| elmot | 1:d0dfbce63a89 | 165 | */ |
| elmot | 1:d0dfbce63a89 | 166 | typedef struct |
| elmot | 1:d0dfbce63a89 | 167 | { |
| elmot | 1:d0dfbce63a89 | 168 | uint16_t CFI_1; |
| elmot | 1:d0dfbce63a89 | 169 | |
| elmot | 1:d0dfbce63a89 | 170 | uint16_t CFI_2; |
| elmot | 1:d0dfbce63a89 | 171 | |
| elmot | 1:d0dfbce63a89 | 172 | uint16_t CFI_3; |
| elmot | 1:d0dfbce63a89 | 173 | |
| elmot | 1:d0dfbce63a89 | 174 | uint16_t CFI_4; /*!< Defines the information stored in the memory's Common flash interface |
| elmot | 1:d0dfbce63a89 | 175 | which contains a description of various electrical and timing parameters, |
| elmot | 1:d0dfbce63a89 | 176 | density information and functions supported by the memory. */ |
| elmot | 1:d0dfbce63a89 | 177 | }NOR_CFITypeDef; |
| elmot | 1:d0dfbce63a89 | 178 | |
| elmot | 1:d0dfbce63a89 | 179 | /** |
| elmot | 1:d0dfbce63a89 | 180 | * @brief NOR handle Structure definition |
| elmot | 1:d0dfbce63a89 | 181 | */ |
| elmot | 1:d0dfbce63a89 | 182 | typedef struct |
| elmot | 1:d0dfbce63a89 | 183 | { |
| elmot | 1:d0dfbce63a89 | 184 | FMC_NORSRAM_TypeDef *Instance; /*!< Register base address */ |
| elmot | 1:d0dfbce63a89 | 185 | |
| elmot | 1:d0dfbce63a89 | 186 | FMC_NORSRAM_EXTENDED_TypeDef *Extended; /*!< Extended mode register base address */ |
| elmot | 1:d0dfbce63a89 | 187 | |
| elmot | 1:d0dfbce63a89 | 188 | FMC_NORSRAM_InitTypeDef Init; /*!< NOR device control configuration parameters */ |
| elmot | 1:d0dfbce63a89 | 189 | |
| elmot | 1:d0dfbce63a89 | 190 | HAL_LockTypeDef Lock; /*!< NOR locking object */ |
| elmot | 1:d0dfbce63a89 | 191 | |
| elmot | 1:d0dfbce63a89 | 192 | __IO HAL_NOR_StateTypeDef State; /*!< NOR device access state */ |
| elmot | 1:d0dfbce63a89 | 193 | |
| elmot | 1:d0dfbce63a89 | 194 | }NOR_HandleTypeDef; |
| elmot | 1:d0dfbce63a89 | 195 | |
| elmot | 1:d0dfbce63a89 | 196 | /** |
| elmot | 1:d0dfbce63a89 | 197 | * @} |
| elmot | 1:d0dfbce63a89 | 198 | */ |
| elmot | 1:d0dfbce63a89 | 199 | |
| elmot | 1:d0dfbce63a89 | 200 | /* Exported constants --------------------------------------------------------*/ |
| elmot | 1:d0dfbce63a89 | 201 | /* Exported macro ------------------------------------------------------------*/ |
| elmot | 1:d0dfbce63a89 | 202 | /** @defgroup NOR_Exported_Macros NOR Exported Macros |
| elmot | 1:d0dfbce63a89 | 203 | * @{ |
| elmot | 1:d0dfbce63a89 | 204 | */ |
| elmot | 1:d0dfbce63a89 | 205 | |
| elmot | 1:d0dfbce63a89 | 206 | /** @brief Reset NOR handle state. |
| elmot | 1:d0dfbce63a89 | 207 | * @param __HANDLE__: NOR handle |
| elmot | 1:d0dfbce63a89 | 208 | * @retval None |
| elmot | 1:d0dfbce63a89 | 209 | */ |
| elmot | 1:d0dfbce63a89 | 210 | #define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NOR_STATE_RESET) |
| elmot | 1:d0dfbce63a89 | 211 | |
| elmot | 1:d0dfbce63a89 | 212 | /** |
| elmot | 1:d0dfbce63a89 | 213 | * @} |
| elmot | 1:d0dfbce63a89 | 214 | */ |
| elmot | 1:d0dfbce63a89 | 215 | |
| elmot | 1:d0dfbce63a89 | 216 | /* Exported functions --------------------------------------------------------*/ |
| elmot | 1:d0dfbce63a89 | 217 | /** @addtogroup NOR_Exported_Functions NOR Exported Functions |
| elmot | 1:d0dfbce63a89 | 218 | * @{ |
| elmot | 1:d0dfbce63a89 | 219 | */ |
| elmot | 1:d0dfbce63a89 | 220 | |
| elmot | 1:d0dfbce63a89 | 221 | /** @addtogroup NOR_Exported_Functions_Group1 Initialization and de-initialization functions |
| elmot | 1:d0dfbce63a89 | 222 | * @{ |
| elmot | 1:d0dfbce63a89 | 223 | */ |
| elmot | 1:d0dfbce63a89 | 224 | |
| elmot | 1:d0dfbce63a89 | 225 | /* Initialization/de-initialization functions ********************************/ |
| elmot | 1:d0dfbce63a89 | 226 | HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming); |
| elmot | 1:d0dfbce63a89 | 227 | HAL_StatusTypeDef HAL_NOR_DeInit(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 228 | void HAL_NOR_MspInit(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 229 | void HAL_NOR_MspDeInit(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 230 | void HAL_NOR_MspWait(NOR_HandleTypeDef *hnor, uint32_t Timeout); |
| elmot | 1:d0dfbce63a89 | 231 | |
| elmot | 1:d0dfbce63a89 | 232 | /** |
| elmot | 1:d0dfbce63a89 | 233 | * @} |
| elmot | 1:d0dfbce63a89 | 234 | */ |
| elmot | 1:d0dfbce63a89 | 235 | |
| elmot | 1:d0dfbce63a89 | 236 | /** @addtogroup NOR_Exported_Functions_Group2 Input and Output functions |
| elmot | 1:d0dfbce63a89 | 237 | * @{ |
| elmot | 1:d0dfbce63a89 | 238 | */ |
| elmot | 1:d0dfbce63a89 | 239 | |
| elmot | 1:d0dfbce63a89 | 240 | /* I/O operation functions ***************************************************/ |
| elmot | 1:d0dfbce63a89 | 241 | HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_ID); |
| elmot | 1:d0dfbce63a89 | 242 | HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 243 | HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData); |
| elmot | 1:d0dfbce63a89 | 244 | HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData); |
| elmot | 1:d0dfbce63a89 | 245 | |
| elmot | 1:d0dfbce63a89 | 246 | HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize); |
| elmot | 1:d0dfbce63a89 | 247 | HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize); |
| elmot | 1:d0dfbce63a89 | 248 | |
| elmot | 1:d0dfbce63a89 | 249 | HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address); |
| elmot | 1:d0dfbce63a89 | 250 | HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address); |
| elmot | 1:d0dfbce63a89 | 251 | HAL_StatusTypeDef HAL_NOR_Read_CFI(NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR_CFI); |
| elmot | 1:d0dfbce63a89 | 252 | |
| elmot | 1:d0dfbce63a89 | 253 | /** |
| elmot | 1:d0dfbce63a89 | 254 | * @} |
| elmot | 1:d0dfbce63a89 | 255 | */ |
| elmot | 1:d0dfbce63a89 | 256 | |
| elmot | 1:d0dfbce63a89 | 257 | /** @addtogroup NOR_Exported_Functions_Group3 Peripheral Control functions |
| elmot | 1:d0dfbce63a89 | 258 | * @{ |
| elmot | 1:d0dfbce63a89 | 259 | */ |
| elmot | 1:d0dfbce63a89 | 260 | |
| elmot | 1:d0dfbce63a89 | 261 | /* NOR Control functions *****************************************************/ |
| elmot | 1:d0dfbce63a89 | 262 | HAL_StatusTypeDef HAL_NOR_WriteOperation_Enable(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 263 | HAL_StatusTypeDef HAL_NOR_WriteOperation_Disable(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 264 | |
| elmot | 1:d0dfbce63a89 | 265 | /** |
| elmot | 1:d0dfbce63a89 | 266 | * @} |
| elmot | 1:d0dfbce63a89 | 267 | */ |
| elmot | 1:d0dfbce63a89 | 268 | |
| elmot | 1:d0dfbce63a89 | 269 | /** @addtogroup NOR_Exported_Functions_Group4 Peripheral State functions |
| elmot | 1:d0dfbce63a89 | 270 | * @{ |
| elmot | 1:d0dfbce63a89 | 271 | */ |
| elmot | 1:d0dfbce63a89 | 272 | |
| elmot | 1:d0dfbce63a89 | 273 | /* NOR State functions ********************************************************/ |
| elmot | 1:d0dfbce63a89 | 274 | HAL_NOR_StateTypeDef HAL_NOR_GetState(NOR_HandleTypeDef *hnor); |
| elmot | 1:d0dfbce63a89 | 275 | HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout); |
| elmot | 1:d0dfbce63a89 | 276 | |
| elmot | 1:d0dfbce63a89 | 277 | /** |
| elmot | 1:d0dfbce63a89 | 278 | * @} |
| elmot | 1:d0dfbce63a89 | 279 | */ |
| elmot | 1:d0dfbce63a89 | 280 | |
| elmot | 1:d0dfbce63a89 | 281 | /** |
| elmot | 1:d0dfbce63a89 | 282 | * @} |
| elmot | 1:d0dfbce63a89 | 283 | */ |
| elmot | 1:d0dfbce63a89 | 284 | |
| elmot | 1:d0dfbce63a89 | 285 | /** |
| elmot | 1:d0dfbce63a89 | 286 | * @} |
| elmot | 1:d0dfbce63a89 | 287 | */ |
| elmot | 1:d0dfbce63a89 | 288 | |
| elmot | 1:d0dfbce63a89 | 289 | /** |
| elmot | 1:d0dfbce63a89 | 290 | * @} |
| elmot | 1:d0dfbce63a89 | 291 | */ |
| elmot | 1:d0dfbce63a89 | 292 | |
| elmot | 1:d0dfbce63a89 | 293 | #endif /* STM32L471xx || STM32L475xx || STM32L476xx || STM32L485xx || STM32L486xx */ |
| elmot | 1:d0dfbce63a89 | 294 | |
| elmot | 1:d0dfbce63a89 | 295 | #ifdef __cplusplus |
| elmot | 1:d0dfbce63a89 | 296 | } |
| elmot | 1:d0dfbce63a89 | 297 | #endif |
| elmot | 1:d0dfbce63a89 | 298 | |
| elmot | 1:d0dfbce63a89 | 299 | #endif /* __STM32L4xx_HAL_NOR_H */ |
| elmot | 1:d0dfbce63a89 | 300 | |
| elmot | 1:d0dfbce63a89 | 301 | /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/ |