ST / BSP_DISCO_L4R9I

Dependents:   DISCO_L4R9I-LCD-demo

Embed: (wiki syntax)

« Back to documentation index

stm32l4r9i_discovery_ospi_nor.c File Reference

stm32l4r9i_discovery_ospi_nor.c File Reference

This file includes a standard driver for the MX25LM51245G OSPI memory mounted on STM32L4R9I_DISCOVERY board. More...

Go to the source code of this file.

Functions

static void OSPI_NOR_MspInit (void)
 Initializes the OSPI MSP.
static void OSPI_NOR_MspDeInit (void)
 De-Initializes the OSPI MSP.
static uint8_t OSPI_NOR_ResetMemory (OSPI_HandleTypeDef *hospi)
 This function reset the OSPI memory.
static uint8_t OSPI_NOR_WriteEnable (OSPI_HandleTypeDef *hospi)
 This function send a Write Enable and wait it is effective.
static uint8_t OSPI_NOR_AutoPollingMemReady (OSPI_HandleTypeDef *hospi, uint32_t Timeout)
 This function read the SR of the memory and wait the EOP.
static uint8_t OSPI_NOR_OctalMode (OSPI_HandleTypeDef *hospi, uint8_t Operation)
 This function enables/disables the octal mode of the memory.
uint8_t BSP_OSPI_NOR_Init (void)
 Initializes the OSPI interface.
uint8_t BSP_OSPI_NOR_DeInit (void)
 De-Initializes the OSPI interface.
uint8_t BSP_OSPI_NOR_Read (uint8_t *pData, uint32_t ReadAddr, uint32_t Size)
 Reads an amount of data from the OSPI memory.
uint8_t BSP_OSPI_NOR_Write (uint8_t *pData, uint32_t WriteAddr, uint32_t Size)
 Writes an amount of data to the OSPI memory.
uint8_t BSP_OSPI_NOR_Erase_Block (uint32_t BlockAddress)
 Erases the specified block of the OSPI memory.
uint8_t BSP_OSPI_NOR_Erase_Sector (uint32_t Sector)
 Erases the specified sector of the OSPI memory.
uint8_t BSP_OSPI_NOR_Erase_Chip (void)
 Erases the entire OSPI memory.
uint8_t BSP_OSPI_NOR_GetStatus (void)
 Reads current status of the OSPI memory.
uint8_t BSP_OSPI_NOR_GetInfo (OSPI_NOR_Info *pInfo)
 Return the configuration of the OSPI memory.
uint8_t BSP_OSPI_NOR_EnableMemoryMappedMode (void)
 Configure the OSPI in memory-mapped mode.
uint8_t BSP_OSPI_NOR_SuspendErase (void)
 This function suspends an ongoing erase command.
uint8_t BSP_OSPI_NOR_ResumeErase (void)
 This function resumes a paused erase command.
uint8_t BSP_OSPI_NOR_EnterDeepPowerDown (void)
 This function enter the OSPI memory in deep power down mode.
uint8_t BSP_OSPI_NOR_LeaveDeepPowerDown (void)
 This function leave the OSPI memory from deep power down mode.

Detailed Description

This file includes a standard driver for the MX25LM51245G OSPI memory mounted on STM32L4R9I_DISCOVERY board.

Author:
MCD Application Team
  ==============================================================================
                     ##### How to use this driver #####
  ==============================================================================
  [..]
   (#) This driver is used to drive the MX25LM51245G OSPI external
       memory mounted on STM32L4R9I_DISCOVERY evaluation board.

   (#) This driver need a specific component driver (MX25LM51245G) to be included with.

   (#) Initialization steps:
       (++) Initialize the OPSI external memory using the BSP_OSPI_NOR_Init() function. This
            function includes the MSP layer hardware resources initialization and the
            OSPI interface with the external memory.

   (#) OSPI memory operations
       (++) OSPI memory can be accessed with read/write operations once it is
            initialized.
            Read/write operation can be performed with AHB access using the functions
            BSP_OSPI_NOR_Read()/BSP_OSPI_NOR_Write().
       (++) The function BSP_OSPI_NOR_GetInfo() returns the configuration of the OSPI memory.
            (see the OSPI memory data sheet)
       (++) Perform erase block operation using the function BSP_OSPI_NOR_Erase_Block() and by
            specifying the block address. You can perform an erase operation of the whole
            chip by calling the function BSP_OSPI_NOR_Erase_Chip().
       (++) The function BSP_OSPI_NOR_GetStatus() returns the current status of the OSPI memory.
            (see the OSPI memory data sheet)
  
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 stm32l4r9i_discovery_ospi_nor.c.