STM32F769IDiscovery  1.00
uDANTE Audio Networking with STM32F7 DISCO board
stm32f7xx_hal_sdram.c File Reference

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

#include "stm32f7xx_hal.h"

Go to the source code of this file.

Detailed Description

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

Author
MCD Application Team
Version
V1.1.0
Date
22-April-2016
==============================================================================
                     ##### How to use this driver #####
============================================================================== 
[..]
  This driver is a generic layered driver which contains a set of APIs used to 
  control SDRAM memories. It uses the FMC layer functions to interface 
  with SDRAM devices.  
  The following sequence should be followed to configure the FMC to interface
  with SDRAM memories: 
    
 (#) Declare a SDRAM_HandleTypeDef handle structure, for example:
        SDRAM_HandleTypeDef  hdsram 
        
     (++) Fill the SDRAM_HandleTypeDef handle "Init" field with the allowed 
          values of the structure member.
          
     (++) Fill the SDRAM_HandleTypeDef handle "Instance" field with a predefined 
          base register instance for NOR or SDRAM device 
           
 (#) Declare a FMC_SDRAM_TimingTypeDef structure; for example:
        FMC_SDRAM_TimingTypeDef  Timing;
    and fill its fields with the allowed values of the structure member.
    
 (#) Initialize the SDRAM Controller by calling the function HAL_SDRAM_Init(). This function
     performs the following sequence:
        
     (##) MSP hardware layer configuration using the function HAL_SDRAM_MspInit()
     (##) Control register configuration using the FMC SDRAM interface function 
          FMC_SDRAM_Init()
     (##) Timing register configuration using the FMC SDRAM interface function 
          FMC_SDRAM_Timing_Init()
     (##) Program the SDRAM external device by applying its initialization sequence
          according to the device plugged in your hardware. This step is mandatory
          for accessing the SDRAM device.   

 (#) At this stage you can perform read/write accesses from/to the memory connected 
     to the SDRAM Bank. You can perform either polling or DMA transfer using the
     following APIs:
     (++) HAL_SDRAM_Read()/HAL_SDRAM_Write() for polling read/write access
     (++) HAL_SDRAM_Read_DMA()/HAL_SDRAM_Write_DMA() for DMA read/write transfer
     
 (#) You can also control the SDRAM device by calling the control APIs HAL_SDRAM_WriteOperation_Enable()/
     HAL_SDRAM_WriteOperation_Disable() to respectively enable/disable the SDRAM write operation or 
     the function HAL_SDRAM_SendCommand() to send a specified command to the SDRAM
     device. The command to be sent must be configured with the FMC_SDRAM_CommandTypeDef 
     structure.   
     
 (#) You can continuously monitor the SDRAM device HAL state by calling the function
     HAL_SDRAM_GetState()         
Attention

© COPYRIGHT(c) 2016 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 stm32f7xx_hal_sdram.c.