Go to the documentation of this file.
38 #ifndef __STM32F769I_DISCOVERY_SDRAM_H
39 #define __STM32F769I_DISCOVERY_SDRAM_H
67 #define SDRAM_OK ((uint8_t)0x00)
68 #define SDRAM_ERROR ((uint8_t)0x01)
74 #define SDRAM_DEVICE_ADDR ((uint32_t)0xC0000000)
75 #define SDRAM_DEVICE_SIZE ((uint32_t)0x1000000)
79 #define SDRAM_MEMORY_WIDTH FMC_SDRAM_MEM_BUS_WIDTH_32
81 #define SDCLOCK_PERIOD FMC_SDRAM_CLOCK_PERIOD_2
84 #define REFRESH_COUNT ((uint32_t)0x0603)
86 #define SDRAM_TIMEOUT ((uint32_t)0xFFFF)
89 #define __DMAx_CLK_ENABLE __HAL_RCC_DMA2_CLK_ENABLE
90 #define __DMAx_CLK_DISABLE __HAL_RCC_DMA2_CLK_DISABLE
91 #define SDRAM_DMAx_CHANNEL DMA_CHANNEL_0
92 #define SDRAM_DMAx_STREAM DMA2_Stream0
93 #define SDRAM_DMAx_IRQn DMA2_Stream0_IRQn
94 #define BSP_SDRAM_DMA_IRQHandler DMA2_Stream0_IRQHandler
102 #define SDRAM_MODEREG_BURST_LENGTH_1 ((uint16_t)0x0000)
103 #define SDRAM_MODEREG_BURST_LENGTH_2 ((uint16_t)0x0001)
104 #define SDRAM_MODEREG_BURST_LENGTH_4 ((uint16_t)0x0002)
105 #define SDRAM_MODEREG_BURST_LENGTH_8 ((uint16_t)0x0004)
106 #define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL ((uint16_t)0x0000)
107 #define SDRAM_MODEREG_BURST_TYPE_INTERLEAVED ((uint16_t)0x0008)
108 #define SDRAM_MODEREG_CAS_LATENCY_2 ((uint16_t)0x0020)
109 #define SDRAM_MODEREG_CAS_LATENCY_3 ((uint16_t)0x0030)
110 #define SDRAM_MODEREG_OPERATING_MODE_STANDARD ((uint16_t)0x0000)
111 #define SDRAM_MODEREG_WRITEBURST_MODE_PROGRAMMED ((uint16_t)0x0000)
112 #define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE ((uint16_t)0x0200)
130 uint8_t
BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize);
132 uint8_t
BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize);
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.
void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params)
DeInitializes SDRAM MSP.
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_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd)
Sends command to the SDRAM bank.
void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount)
Programs the SDRAM device.
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.
void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params)
Initializes SDRAM MSP.
SDRAM command parameters structure definition.
uint8_t BSP_SDRAM_DeInit(void)
DeInitializes the SDRAM device.
uint8_t BSP_SDRAM_Init(void)
Initializes the SDRAM device.
SDRAM handle Structure definition.
This file contains all the functions prototypes for the HAL module driver.