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