Contains the BSP driver for the B-L475E-IOT01 board.

Dependents:   mbed-os-example-ble-Thermometer DISCO_L475VG_IOT01-Telegram-BOT DISCO_L475VG_IOT01-sche_cheveux DISCO_L475VG_IOT01-QSPI_FLASH_FILE_SYSTEM ... more

Embed: (wiki syntax)

« Back to documentation index

stm32l475e_iot01_qspi.c File Reference

stm32l475e_iot01_qspi.c File Reference

This file includes a standard driver for the MX25R6435F QSPI memory mounted on STM32L475E IOT01 board. More...

Go to the source code of this file.

Functions

static uint8_t QSPI_ResetMemory (QSPI_HandleTypeDef *hqspi)
 This function reset the QSPI memory.
static uint8_t QSPI_WriteEnable (QSPI_HandleTypeDef *hqspi)
 This function send a Write Enable and wait it is effective.
static uint8_t QSPI_AutoPollingMemReady (QSPI_HandleTypeDef *hqspi, uint32_t Timeout)
 This function read the SR of the memory and wait the EOP.
static uint8_t QSPI_QuadMode (QSPI_HandleTypeDef *hqspi, uint8_t Operation)
 This function enables/disables the Quad mode of the memory.
static uint8_t QSPI_HighPerfMode (QSPI_HandleTypeDef *hqspi, uint8_t Operation)
 This function enables/disables the high performance mode of the memory.
uint8_t BSP_QSPI_Init (void)
 Initializes the QSPI interface.
uint8_t BSP_QSPI_DeInit (void)
 De-Initializes the QSPI interface.
uint8_t BSP_QSPI_Read (uint8_t *pData, uint32_t ReadAddr, uint32_t Size)
 Reads an amount of data from the QSPI memory.
uint8_t BSP_QSPI_Write (uint8_t *pData, uint32_t WriteAddr, uint32_t Size)
 Writes an amount of data to the QSPI memory.
uint8_t BSP_QSPI_Erase_Block (uint32_t BlockAddress)
 Erases the specified block of the QSPI memory.
uint8_t BSP_QSPI_Erase_Sector (uint32_t Sector)
 Erases the specified sector of the QSPI memory.
uint8_t BSP_QSPI_Erase_Chip (void)
 Erases the entire QSPI memory.
uint8_t BSP_QSPI_GetStatus (void)
 Reads current status of the QSPI memory.
uint8_t BSP_QSPI_GetInfo (QSPI_Info *pInfo)
 Return the configuration of the QSPI memory.
uint8_t BSP_QSPI_EnableMemoryMappedMode (void)
 Configure the QSPI in memory-mapped mode.
uint8_t BSP_QSPI_SuspendErase (void)
 This function suspends an ongoing erase command.
uint8_t BSP_QSPI_ResumeErase (void)
 This function resumes a paused erase command.
uint8_t BSP_QSPI_EnterDeepPowerDown (void)
 This function enter the QSPI memory in deep power down mode.
uint8_t BSP_QSPI_LeaveDeepPowerDown (void)
 This function leave the QSPI memory from deep power down mode.
__weak void BSP_QSPI_MspInit (void)
 Initializes the QSPI MSP.
__weak void BSP_QSPI_MspDeInit (void)
 De-Initializes the QSPI MSP.

Detailed Description

This file includes a standard driver for the MX25R6435F QSPI memory mounted on STM32L475E IOT01 board.

Author:
MCD Application Team
  ==============================================================================
                     ##### How to use this driver #####
  ==============================================================================  
  [..] 
   (#) This driver is used to drive the MX25R6435F QSPI external 
       memory mounted on STM32L475E IOT01 board.
       
   (#) This driver need a specific component driver (MX25R6435F) to be included with.

   (#) Initialization steps:
       (++) Initialize the QPSI external memory using the BSP_QSPI_Init() function. This 
            function includes the MSP layer hardware resources initialization and the
            QSPI interface with the external memory. The BSP_QSPI_DeInit() can be used 
            to deactivate the QSPI interface.
  
   (#) QSPI memory operations
       (++) QSPI 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_QSPI_Read()/BSP_QSPI_Write().
       (++) The function to the QSPI memory in memory-mapped mode is possible after 
            the call of the function BSP_QSPI_EnableMemoryMappedMode().
       (++) The function BSP_QSPI_GetInfo() returns the configuration of the QSPI memory. 
            (see the QSPI memory data sheet)
       (++) Perform erase block operation using the function BSP_QSPI_Erase_Block() and by
            specifying the block address. You can perform an erase operation of the whole 
            chip by calling the function BSP_QSPI_Erase_Chip(). 
       (++) The function BSP_QSPI_GetStatus() returns the current status of the QSPI memory. 
            (see the QSPI memory data sheet)
       (++) Perform erase sector operation using the function BSP_QSPI_Erase_Sector()
            which is not blocking. So the function BSP_QSPI_GetStatus() should be used
            to check if the memory is busy, and the functions BSP_QSPI_SuspendErase()/
            BSP_QSPI_ResumeErase() can be used to perform other operations during the 
            sector erase.
       (++) Deep power down of the QSPI memory is managed with the call of the functions
            BSP_QSPI_EnterDeepPowerDown()/BSP_QSPI_LeaveDeepPowerDown()
  
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 stm32l475e_iot01_qspi.c.