Go to the documentation of this file.
21 #ifndef __STM32F7xx_HAL_NOR_H
22 #define __STM32F7xx_HAL_NOR_H
106 #if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
107 typedef struct __NOR_HandleTypeDef
123 #if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
124 void (* MspInitCallback) (
struct __NOR_HandleTypeDef * hnor);
125 void (* MspDeInitCallback) (
struct __NOR_HandleTypeDef * hnor);
129 #if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
135 HAL_NOR_MSP_INIT_CB_ID = 0x00U,
136 HAL_NOR_MSP_DEINIT_CB_ID = 0x01U
137 }HAL_NOR_CallbackIDTypeDef;
157 #if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
158 #define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__) do { \
159 (__HANDLE__)->State = HAL_NOR_STATE_RESET; \
160 (__HANDLE__)->MspInitCallback = NULL; \
161 (__HANDLE__)->MspDeInitCallback = NULL; \
164 #define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__) ((__HANDLE__)->State = HAL_NOR_STATE_RESET)
206 #if (USE_HAL_NOR_REGISTER_CALLBACKS == 1)
248 #define MC_ADDRESS ((uint16_t)0x0000U)
249 #define DEVICE_CODE1_ADDR ((uint16_t)0x0001U)
250 #define DEVICE_CODE2_ADDR ((uint16_t)0x000EU)
251 #define DEVICE_CODE3_ADDR ((uint16_t)0x000FU)
254 #define CFI1_ADDRESS ((uint16_t)0x61U)
255 #define CFI2_ADDRESS ((uint16_t)0x62U)
256 #define CFI3_ADDRESS ((uint16_t)0x63U)
257 #define CFI4_ADDRESS ((uint16_t)0x64U)
260 #define NOR_TMEOUT ((uint16_t)0xFFFFU)
263 #define NOR_MEMORY_8B ((uint8_t)0x0U)
264 #define NOR_MEMORY_16B ((uint8_t)0x1U)
267 #define NOR_MEMORY_ADRESS1 ((uint32_t)0x60000000U)
268 #define NOR_MEMORY_ADRESS2 ((uint32_t)0x64000000U)
269 #define NOR_MEMORY_ADRESS3 ((uint32_t)0x68000000U)
270 #define NOR_MEMORY_ADRESS4 ((uint32_t)0x6C000000U)
286 #define NOR_ADDR_SHIFT(__NOR_ADDRESS, __NOR_MEMORY_WIDTH_, __ADDRESS__) \
287 ((uint32_t)(((__NOR_MEMORY_WIDTH_) == NOR_MEMORY_16B)? \
288 ((uint32_t)((__NOR_ADDRESS) + (2 * (__ADDRESS__)))): \
289 ((uint32_t)((__NOR_ADDRESS) + (__ADDRESS__)))))
297 #define NOR_WRITE(__ADDRESS__, __DATA__) do{ \
298 (*(__IO uint16_t *)((uint32_t)(__ADDRESS__)) = (__DATA__)); \
NOR handle Structure definition.
HAL_StatusTypeDef
HAL Status structures definition
static FMC_SDRAM_TimingTypeDef Timing
HAL_StatusTypeDef HAL_NOR_Erase_Block(NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address)
@ HAL_NOR_STATE_PROTECTED
__IO HAL_NOR_StateTypeDef State
FMC_NORSRAM_EXTENDED_TypeDef * Extended
HAL_StatusTypeDef HAL_NOR_DeInit(NOR_HandleTypeDef *hnor)
HAL_LockTypeDef
HAL Lock structures definition
#define FMC_NORSRAM_TypeDef
FMC_NORSRAM_TypeDef * Instance
FMC NORSRAM Timing parameters structure definition
HAL_StatusTypeDef HAL_NOR_Read_ID(NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_ID)
HAL_StatusTypeDef HAL_NOR_ReadBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
HAL_NOR_StateTypeDef
HAL SRAM State structures definition
HAL_NOR_StatusTypeDef HAL_NOR_GetStatus(NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout)
HAL_StatusTypeDef HAL_NOR_Erase_Chip(NOR_HandleTypeDef *hnor, uint32_t Address)
FMC_NORSRAM_InitTypeDef Init
HAL_StatusTypeDef HAL_NOR_ProgramBuffer(NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
HAL_StatusTypeDef HAL_NOR_Init(NOR_HandleTypeDef *hnor, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming)
uint16_t Manufacturer_Code
HAL_StatusTypeDef HAL_NOR_Program(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
HAL_NOR_StatusTypeDef
FMC NOR Status typedef.
HAL_StatusTypeDef HAL_NOR_WriteOperation_Enable(NOR_HandleTypeDef *hnor)
void HAL_NOR_MspInit(NOR_HandleTypeDef *hnor)
HAL_StatusTypeDef HAL_NOR_ReturnToReadMode(NOR_HandleTypeDef *hnor)
HAL_StatusTypeDef HAL_NOR_WriteOperation_Disable(NOR_HandleTypeDef *hnor)
HAL_StatusTypeDef HAL_NOR_Read_CFI(NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR_CFI)
FMC NORSRAM Configuration Structure definition.
Header file of FMC HAL module.
#define FMC_NORSRAM_EXTENDED_TypeDef
HAL_StatusTypeDef HAL_NOR_Read(NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
void HAL_NOR_MspWait(NOR_HandleTypeDef *hnor, uint32_t Timeout)
HAL_NOR_StateTypeDef HAL_NOR_GetState(NOR_HandleTypeDef *hnor)
void HAL_NOR_MspDeInit(NOR_HandleTypeDef *hnor)