STM32L4xx_HAL_Driver  1.14.0
stm32l4xx_hal_nor.c File Reference

NOR HAL module driver. This file provides a generic firmware to drive NOR memories mounted as external device. More...

Go to the source code of this file.

Functions

HAL_StatusTypeDef HAL_NOR_Init (NOR_HandleTypeDef *hnor, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming)
 Perform the NOR memory Initialization sequence. More...
 
HAL_StatusTypeDef HAL_NOR_DeInit (NOR_HandleTypeDef *hnor)
 Perform NOR memory De-Initialization sequence. More...
 
void HAL_NOR_MspInit (NOR_HandleTypeDef *hnor)
 Initialize the NOR MSP. More...
 
void HAL_NOR_MspDeInit (NOR_HandleTypeDef *hnor)
 DeInitialize the NOR MSP. More...
 
void HAL_NOR_MspWait (NOR_HandleTypeDef *hnor, uint32_t Timeout)
 NOR MSP Wait for Ready/Busy signal. More...
 
HAL_StatusTypeDef HAL_NOR_Read_ID (NOR_HandleTypeDef *hnor, NOR_IDTypeDef *pNOR_ID)
 Read NOR flash IDs. More...
 
HAL_StatusTypeDef HAL_NOR_ReturnToReadMode (NOR_HandleTypeDef *hnor)
 Return the NOR memory to Read mode. More...
 
HAL_StatusTypeDef HAL_NOR_Read (NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
 Read data from NOR memory. More...
 
HAL_StatusTypeDef HAL_NOR_Program (NOR_HandleTypeDef *hnor, uint32_t *pAddress, uint16_t *pData)
 Program data to NOR memory. More...
 
HAL_StatusTypeDef HAL_NOR_ReadBuffer (NOR_HandleTypeDef *hnor, uint32_t uwAddress, uint16_t *pData, uint32_t uwBufferSize)
 Read a half-word buffer from the NOR memory. More...
 
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. This function must be used only with S29GL128P NOR memory. More...
 
HAL_StatusTypeDef HAL_NOR_Erase_Block (NOR_HandleTypeDef *hnor, uint32_t BlockAddress, uint32_t Address)
 Erase the specified block of the NOR memory. More...
 
HAL_StatusTypeDef HAL_NOR_Erase_Chip (NOR_HandleTypeDef *hnor, uint32_t Address)
 Erase the entire NOR chip. More...
 
HAL_StatusTypeDef HAL_NOR_Read_CFI (NOR_HandleTypeDef *hnor, NOR_CFITypeDef *pNOR_CFI)
 Read NOR flash CFI IDs. More...
 
HAL_StatusTypeDef HAL_NOR_WriteOperation_Enable (NOR_HandleTypeDef *hnor)
 Enable dynamically NOR write operation. More...
 
HAL_StatusTypeDef HAL_NOR_WriteOperation_Disable (NOR_HandleTypeDef *hnor)
 Disable dynamically NOR write operation. More...
 
HAL_NOR_StateTypeDef HAL_NOR_GetState (NOR_HandleTypeDef *hnor)
 Return the NOR controller state. More...
 
HAL_NOR_StatusTypeDef HAL_NOR_GetStatus (NOR_HandleTypeDef *hnor, uint32_t Address, uint32_t Timeout)
 Return the NOR operation status. More...
 

Variables

static uint32_t uwNORMemoryDataWidth = NOR_MEMORY_8B
 

Detailed Description

NOR HAL module driver. This file provides a generic firmware to drive NOR memories mounted as external device.

Author
MCD Application Team
==============================================================================
                   ##### How to use this driver #####
==============================================================================
  [..]
    This driver is a generic layered driver which contains a set of APIs used to
    control NOR flash memories. It uses the FMC layer functions to interface
    with NOR devices. This driver is used as follows:

    (+) NOR flash memory configuration sequence using the function HAL_NOR_Init()
        with control and timing parameters for both normal and extended mode.

    (+) Read NOR flash memory manufacturer code and device IDs using the function
        HAL_NOR_Read_ID(). The read information is stored in the NOR_ID_TypeDef
        structure declared by the function caller.

    (+) Access NOR flash memory by read/write data unit operations using the functions
        HAL_NOR_Read(), HAL_NOR_Program().

    (+) Perform NOR flash erase block/chip operations using the functions
        HAL_NOR_Erase_Block() and HAL_NOR_Erase_Chip().

    (+) Read the NOR flash CFI (common flash interface) IDs using the function
        HAL_NOR_Read_CFI(). The read information is stored in the NOR_CFI_TypeDef
        structure declared by the function caller.

    (+) You can also control the NOR device by calling the control APIs HAL_NOR_WriteOperation_Enable()/
        HAL_NOR_WriteOperation_Disable() to respectively enable/disable the NOR write operation

    (+) You can monitor the NOR device HAL state by calling the function
        HAL_NOR_GetState()
  [..]
   (@) This driver is a set of generic APIs which handle standard NOR flash operations.
       If a NOR flash device contains different operations and/or implementations,
       it should be implemented separately.

   *** NOR HAL driver macros list ***
   =============================================
   [..]
     Below the list of most used macros in NOR HAL driver.

    (+) NOR_WRITE : NOR memory write data to specified address
Attention

© Copyright (c) 2017 STMicroelectronics. All rights reserved.

This software component is licensed by ST under BSD 3-Clause license, the "License"; You may not use this file except in compliance with the License. You may obtain a copy of the License at: opensource.org/licenses/BSD-3-Clause

Definition in file stm32l4xx_hal_nor.c.