STM32H743I_EVAL BSP User Manual: stm32h743i_eval_sdram.h File Reference

STM32H743I_EVAL BSP

stm32h743i_eval_sdram.h File Reference

This file contains the common defines and functions prototypes for the stm32h743i_eval_sdram.c driver. More...

#include "stm32h7xx_hal.h"

Go to the source code of this file.

Defines

#define SDRAM_OK   ((uint8_t)0x00)
 SDRAM status structure definition.
#define SDRAM_ERROR   ((uint8_t)0x01)
#define SDRAM_DEVICE_ADDR   ((uint32_t)0xD0000000)
#define SDRAM_DEVICE_SIZE   ((uint32_t)0x2000000) /* SDRAM device size in Bytes (32MB)*/
#define SDRAM_MEMORY_WIDTH   FMC_SDRAM_MEM_BUS_WIDTH_32
#define SDCLOCK_PERIOD   FMC_SDRAM_CLOCK_PERIOD_2
#define REFRESH_COUNT   ((uint32_t)0x0603) /* SDRAM refresh counter (100Mhz FMC clock) */
#define SDRAM_TIMEOUT   ((uint32_t)0xFFFF)
#define __MDMAx_CLK_ENABLE   __HAL_RCC_MDMA_CLK_ENABLE
#define __MDMAx_CLK_DISABLE   __HAL_RCC_MDMA_CLK_DISABLE
#define SDRAM_MDMAx_CHANNEL   MDMA_Channel0
#define SDRAM_MDMAx_IRQn   MDMA_IRQn
#define SDRAM_MODEREG_BURST_LENGTH_1   ((uint16_t)0x0000)
 FMC SDRAM Mode definition register defines.
#define SDRAM_MODEREG_BURST_LENGTH_2   ((uint16_t)0x0001)
#define SDRAM_MODEREG_BURST_LENGTH_4   ((uint16_t)0x0002)
#define SDRAM_MODEREG_BURST_LENGTH_8   ((uint16_t)0x0004)
#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL   ((uint16_t)0x0000)
#define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED   ((uint16_t)0x0008)
#define SDRAM_MODEREG_CAS_LATENCY_2   ((uint16_t)0x0020)
#define SDRAM_MODEREG_CAS_LATENCY_3   ((uint16_t)0x0030)
#define SDRAM_MODEREG_OPERATING_MODE_STANDARD   ((uint16_t)0x0000)
#define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED   ((uint16_t)0x0000)
#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE   ((uint16_t)0x0200)

Functions

uint8_t BSP_SDRAM_Init (void)
 Initializes the SDRAM device.
uint8_t BSP_SDRAM_DeInit (void)
 DeInitializes the SDRAM device.
void BSP_SDRAM_Initialization_sequence (uint32_t RefreshCount)
 Programs the SDRAM device.
uint8_t BSP_SDRAM_ReadData (uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
 Reads an amount of data from the SDRAM memory in polling mode.
uint8_t BSP_SDRAM_ReadData_DMA (uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
 Reads an amount of data from the SDRAM memory in DMA mode.
uint8_t BSP_SDRAM_WriteData (uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
 Writes an amount of data to the SDRAM memory in polling mode.
uint8_t BSP_SDRAM_WriteData_DMA (uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
 Writes an amount of data to the SDRAM memory in DMA mode.
uint8_t BSP_SDRAM_Sendcmd (FMC_SDRAM_CommandTypeDef *SdramCmd)
 Sends command to the SDRAM bank.
__weak void BSP_SDRAM_MspInit (SDRAM_HandleTypeDef *hsdram, void *Params)
 Initializes SDRAM MSP.
__weak void BSP_SDRAM_MspDeInit (SDRAM_HandleTypeDef *hsdram, void *Params)
 DeInitializes SDRAM MSP.

Detailed Description

This file contains the common defines and functions prototypes for the stm32h743i_eval_sdram.c driver.

Author:
MCD Application Team
Version:
V1.0.0
Date:
21-April-2017
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 stm32h743i_eval_sdram.h.

Generated on Wed Aug 23 2017 17:45:14 for STM32H743I_EVAL BSP User Manual by   doxygen 1.7.6.1