STM32F439xx HAL User Manual
Data Structures | Defines | Enumerations | Functions
stm32f4xx_hal_nor.h File Reference

Header file of NOR HAL module. More...

#include "stm32f4xx_ll_fmc.h"

Go to the source code of this file.

Data Structures

struct  NOR_IDTypeDef
 FMC NOR ID typedef. More...
struct  NOR_CFITypeDef
 FMC NOR CFI typedef. More...
struct  NOR_HandleTypeDef
 NOR handle Structure definition. More...

Defines

#define __HAL_NOR_RESET_HANDLE_STATE(__HANDLE__)   ((__HANDLE__)->State = HAL_NOR_STATE_RESET)
 Reset NOR handle state.
#define MC_ADDRESS   ((uint16_t)0x0000)
#define DEVICE_CODE1_ADDR   ((uint16_t)0x0001)
#define DEVICE_CODE2_ADDR   ((uint16_t)0x000E)
#define DEVICE_CODE3_ADDR   ((uint16_t)0x000F)
#define CFI1_ADDRESS   ((uint16_t)0x0061)
#define CFI2_ADDRESS   ((uint16_t)0x0062)
#define CFI3_ADDRESS   ((uint16_t)0x0063)
#define CFI4_ADDRESS   ((uint16_t)0x0064)
#define NOR_TMEOUT   ((uint16_t)0xFFFF)
#define NOR_MEMORY_8B   ((uint8_t)0x00)
#define NOR_MEMORY_16B   ((uint8_t)0x01)
#define NOR_MEMORY_ADRESS1   0x60000000U
#define NOR_MEMORY_ADRESS2   0x64000000U
#define NOR_MEMORY_ADRESS3   0x68000000U
#define NOR_MEMORY_ADRESS4   0x6C000000U
#define NOR_ADDR_SHIFT(__NOR_ADDRESS__, NOR_MEMORY_WIDTH, ADDRESS)
 NOR memory address shifting.
#define NOR_WRITE(ADDRESS, DATA)   (*(__IO uint16_t *)((uint32_t)(ADDRESS)) = (DATA))
 NOR memory write data to specified address.

Enumerations

enum  HAL_NOR_StateTypeDef {
  HAL_NOR_STATE_RESET = 0x00U, HAL_NOR_STATE_READY = 0x01U, HAL_NOR_STATE_BUSY = 0x02U, HAL_NOR_STATE_ERROR = 0x03U,
  HAL_NOR_STATE_PROTECTED = 0x04U
}
 HAL SRAM State structures definition. More...
enum  HAL_NOR_StatusTypeDef { HAL_NOR_STATUS_SUCCESS = 0U, HAL_NOR_STATUS_ONGOING, HAL_NOR_STATUS_ERROR, HAL_NOR_STATUS_TIMEOUT }
 FMC NOR Status typedef. More...

Functions

HAL_StatusTypeDef HAL_NOR_Init (NOR_HandleTypeDef *hnor, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming)
 Perform the NOR memory Initialization sequence.
HAL_StatusTypeDef HAL_NOR_DeInit (NOR_HandleTypeDef *hnor)
 Perform NOR memory De-Initialization sequence.
__weak void HAL_NOR_MspInit (NOR_HandleTypeDef *hnor)
 NOR MSP Init.
__weak void HAL_NOR_MspDeInit (NOR_HandleTypeDef *hnor)
 NOR MSP DeInit.
__weak void HAL_NOR_MspWait (NOR_HandleTypeDef *hnor, uint32_t Timeout)
 NOR MSP Wait for Ready/Busy signal.
HAL_StatusTypeDef HAL_NOR_Read_ID (NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_ID)
 Read NOR flash IDs.
HAL_StatusTypeDef HAL_NOR_ReturnToReadMode (NOR_HandleTypeDef *hnor)
 Returns the NOR memory to Read mode.
HAL_StatusTypeDef HAL_NOR_Read (NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
 Read data from NOR memory.
HAL_StatusTypeDef HAL_NOR_Program (NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
 Program data to NOR memory.
HAL_StatusTypeDef HAL_NOR_ReadBuffer (NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
 Reads a half-word buffer from the NOR memory.
HAL_StatusTypeDef HAL_NOR_ProgramBuffer (NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
 Writes a half-word buffer to the NOR memory.
HAL_StatusTypeDef HAL_NOR_Erase_Block (NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address)
 Erase the specified block of the NOR memory.
HAL_StatusTypeDef HAL_NOR_Erase_Chip (NOR_HandleTypeDef *hnor, uint32_t Address)
 Erase the entire NOR chip.
HAL_StatusTypeDef HAL_NOR_Read_CFI (NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR_CFI)
 Read NOR flash CFI IDs.
HAL_StatusTypeDef HAL_NOR_WriteOperation_Enable (NOR_HandleTypeDef *hnor)
 Enables dynamically NOR write operation.
HAL_StatusTypeDef HAL_NOR_WriteOperation_Disable (NOR_HandleTypeDef *hnor)
 Disables dynamically NOR write operation.
HAL_NOR_StateTypeDef HAL_NOR_GetState (NOR_HandleTypeDef *hnor)
 return the NOR controller state
HAL_NOR_StatusTypeDef HAL_NOR_GetStatus (NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout)
 Returns the NOR operation status.

Detailed Description

Header file of NOR HAL module.

Author:
MCD Application Team
Attention:

© COPYRIGHT(c) 2017 STMicroelectronics

Redistribution and use in source and binary forms, with or without modification, are permitted provided that the following conditions are met: 1. Redistributions of source code must retain the above copyright notice, this list of conditions and the following disclaimer. 2. Redistributions in binary form must reproduce the above copyright notice, this list of conditions and the following disclaimer in the documentation and/or other materials provided with the distribution. 3. Neither the name of STMicroelectronics nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission.

THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE.

Definition in file stm32f4xx_hal_nor.h.