stm32f769i_discovery_sdram.c
Go to the documentation of this file.
1 
75 /* Dependencies
76 - stm32f7xx_hal_sdram.c
77 - stm32f7xx_ll_fmc.c
78 - stm32f7xx_hal_dma.c
79 - stm32f7xx_hal_gpio.c
80 - stm32f7xx_hal_cortex.c
81 - stm32f7xx_hal_rcc_ex.h
82 EndDependencies */
83 
84 /* Includes ------------------------------------------------------------------*/
86 
145 uint8_t BSP_SDRAM_Init(void)
146 {
147  static uint8_t sdramstatus = SDRAM_ERROR;
148  /* SDRAM device configuration */
150 
151  /* Timing configuration for 100Mhz as SDRAM clock frequency (System clock is up to 200Mhz) */
155  Timing.RowCycleDelay = 7;
157  Timing.RPDelay = 2;
158  Timing.RCDDelay = 2;
159 
170 
171  /* SDRAM controller initialization */
172 
173  BSP_SDRAM_MspInit(&sdramHandle, NULL); /* __weak function can be rewritten by the application */
174 
176  {
177  sdramstatus = SDRAM_ERROR;
178  }
179  else
180  {
181  sdramstatus = SDRAM_OK;
182  }
183 
184  /* SDRAM initialization sequence */
186 
187  return sdramstatus;
188 }
189 
194 uint8_t BSP_SDRAM_DeInit(void)
195 {
196  static uint8_t sdramstatus = SDRAM_ERROR;
197  /* SDRAM device de-initialization */
199 
201  {
202  sdramstatus = SDRAM_ERROR;
203  }
204  else
205  {
206  sdramstatus = SDRAM_OK;
207  }
208 
209  /* SDRAM controller de-initialization */
211 
212  return sdramstatus;
213 }
214 
220 void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount)
221 {
222  __IO uint32_t tmpmrd = 0;
223 
224  /* Step 1: Configure a clock configuration enable command */
229 
230  /* Send the command */
232 
233  /* Step 2: Insert 100 us minimum delay */
234  /* Inserted delay is equal to 1 ms due to systick time base unit (ms) */
235  HAL_Delay(1);
236 
237  /* Step 3: Configure a PALL (precharge all) command */
242 
243  /* Send the command */
245 
246  /* Step 4: Configure an Auto Refresh command */
251 
252  /* Send the command */
254 
255  /* Step 5: Program the external memory mode register */
256  tmpmrd = (uint32_t)SDRAM_MODEREG_BURST_LENGTH_1 |\
261 
266 
267  /* Send the command */
269 
270  /* Step 6: Set the refresh rate counter */
271  /* Set the device refresh rate */
272  HAL_SDRAM_ProgramRefreshRate(&sdramHandle, RefreshCount);
273 }
274 
282 uint8_t BSP_SDRAM_ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
283 {
284  if(HAL_SDRAM_Read_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
285  {
286  return SDRAM_ERROR;
287  }
288  else
289  {
290  return SDRAM_OK;
291  }
292 }
293 
301 uint8_t BSP_SDRAM_ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
302 {
303  if(HAL_SDRAM_Read_DMA(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
304  {
305  return SDRAM_ERROR;
306  }
307  else
308  {
309  return SDRAM_OK;
310  }
311 }
312 
320 uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
321 {
322  if(HAL_SDRAM_Write_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
323  {
324  return SDRAM_ERROR;
325  }
326  else
327  {
328  return SDRAM_OK;
329  }
330 }
331 
339 uint8_t BSP_SDRAM_WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
340 {
341  if(HAL_SDRAM_Write_DMA(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK)
342  {
343  return SDRAM_ERROR;
344  }
345  else
346  {
347  return SDRAM_OK;
348  }
349 }
350 
357 {
359  {
360  return SDRAM_ERROR;
361  }
362  else
363  {
364  return SDRAM_OK;
365  }
366 }
367 
374 __weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params)
375 {
376  static DMA_HandleTypeDef dma_handle;
377  GPIO_InitTypeDef gpio_init_structure;
378 
379  /* Enable FMC clock */
381 
382  /* Enable chosen DMAx clock */
384 
385  /* Enable GPIOs clock */
392 
393  /* Common GPIO configuration */
394  gpio_init_structure.Mode = GPIO_MODE_AF_PP;
395  gpio_init_structure.Pull = GPIO_PULLUP;
396  gpio_init_structure.Speed = GPIO_SPEED_HIGH;
397  gpio_init_structure.Alternate = GPIO_AF12_FMC;
398 
399  /* GPIOD configuration */
400  gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_8| GPIO_PIN_9 | GPIO_PIN_10 |\
401  GPIO_PIN_14 | GPIO_PIN_15;
402 
403 
404  HAL_GPIO_Init(GPIOD, &gpio_init_structure);
405 
406  /* GPIOE configuration */
407  gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_7| GPIO_PIN_8 | GPIO_PIN_9 |\
408  GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\
409  GPIO_PIN_15;
410 
411  HAL_GPIO_Init(GPIOE, &gpio_init_structure);
412 
413  /* GPIOF configuration */
414  gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2| GPIO_PIN_3 | GPIO_PIN_4 |\
415  GPIO_PIN_5 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\
416  GPIO_PIN_15;
417 
418  HAL_GPIO_Init(GPIOF, &gpio_init_structure);
419 
420  /* GPIOG configuration */
421  gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_4|\
422  GPIO_PIN_5 | GPIO_PIN_8 | GPIO_PIN_15;
423  HAL_GPIO_Init(GPIOG, &gpio_init_structure);
424 
425  /* GPIOH configuration */
426  gpio_init_structure.Pin = GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_5 | GPIO_PIN_8 | GPIO_PIN_9 |\
427  GPIO_PIN_10 | GPIO_PIN_11 | GPIO_PIN_12 | GPIO_PIN_13 | GPIO_PIN_14 |\
428  GPIO_PIN_15;
429  HAL_GPIO_Init(GPIOH, &gpio_init_structure);
430 
431  /* GPIOI configuration */
432  gpio_init_structure.Pin = GPIO_PIN_0 | GPIO_PIN_1 | GPIO_PIN_2 | GPIO_PIN_3 | GPIO_PIN_4 |\
433  GPIO_PIN_5 | GPIO_PIN_6 | GPIO_PIN_7 | GPIO_PIN_9 | GPIO_PIN_10;
434  HAL_GPIO_Init(GPIOI, &gpio_init_structure);
435 
436  /* Configure common DMA parameters */
437  dma_handle.Init.Channel = SDRAM_DMAx_CHANNEL;
438  dma_handle.Init.Direction = DMA_MEMORY_TO_MEMORY;
439  dma_handle.Init.PeriphInc = DMA_PINC_ENABLE;
440  dma_handle.Init.MemInc = DMA_MINC_ENABLE;
443  dma_handle.Init.Mode = DMA_NORMAL;
444  dma_handle.Init.Priority = DMA_PRIORITY_HIGH;
445  dma_handle.Init.FIFOMode = DMA_FIFOMODE_DISABLE;
447  dma_handle.Init.MemBurst = DMA_MBURST_SINGLE;
448  dma_handle.Init.PeriphBurst = DMA_PBURST_SINGLE;
449 
450  dma_handle.Instance = SDRAM_DMAx_STREAM;
451 
452  /* Associate the DMA handle */
453  __HAL_LINKDMA(hsdram, hdma, dma_handle);
454 
455  /* Deinitialize the stream for new transfer */
456  HAL_DMA_DeInit(&dma_handle);
457 
458  /* Configure the DMA stream */
459  HAL_DMA_Init(&dma_handle);
460 
461  /* NVIC configuration for DMA transfer complete interrupt */
464 }
465 
472 __weak void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params)
473 {
474  static DMA_HandleTypeDef dma_handle;
475 
476  /* Disable NVIC configuration for DMA interrupt */
478 
479  /* Deinitialize the stream for new transfer */
480  dma_handle.Instance = SDRAM_DMAx_STREAM;
481  HAL_DMA_DeInit(&dma_handle);
482 
483  /* GPIO pins clock, FMC clock and DMA clock can be shut down in the applications
484  by surcharging this __weak function */
485 }
486 
503 /************************ (C) COPYRIGHT STMicroelectronics *****END OF FILE****/
GPIO_PIN_14
#define GPIO_PIN_14
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:100
FMC_SDRAM_TimingTypeDef
FMC SDRAM Timing parameters structure definition.
Definition: stm32f7xx_ll_fmc.h:601
DMA_InitTypeDef::Channel
uint32_t Channel
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:51
FMC_SDRAM_DEVICE
#define FMC_SDRAM_DEVICE
Definition: stm32f7xx_ll_fmc.h:391
REFRESH_COUNT
#define REFRESH_COUNT
Definition: stm32f769i_discovery_sdram.h:84
__HAL_LINKDMA
#define __HAL_LINKDMA(__HANDLE__, __PPP_DMA_FIELD__, __DMA_HANDLE__)
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:66
__IO
#define __IO
Definition: imxrt1050/imxrt1050-evkb/CMSIS/core_cm7.h:237
GPIO_MODE_AF_PP
#define GPIO_MODE_AF_PP
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:122
BSP_SDRAM_ReadData
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.
Definition: stm32f769i_discovery_sdram.c:282
BSP_SDRAM_Init
uint8_t BSP_SDRAM_Init(void)
Initializes the SDRAM device.
Definition: stm32f769i_discovery_sdram.c:145
FMC_SDRAM_CommandTypeDef::CommandMode
uint32_t CommandMode
Definition: stm32f7xx_ll_fmc.h:637
Timing
static FMC_SDRAM_TimingTypeDef Timing
Definition: stm32f769i_discovery_sdram.c:124
FMC_SDRAM_COLUMN_BITS_NUM_8
#define FMC_SDRAM_COLUMN_BITS_NUM_8
Definition: stm32f7xx_ll_fmc.h:905
BSP_SDRAM_MspInit
__weak void BSP_SDRAM_MspInit(SDRAM_HandleTypeDef *hsdram, void *Params)
Initializes SDRAM MSP.
Definition: stm32f769i_discovery_sdram.c:374
HAL_NVIC_EnableIRQ
void HAL_NVIC_EnableIRQ(IRQn_Type IRQn)
__DMA_HandleTypeDef
DMA handle Structure definition.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:139
NULL
#define NULL
Definition: porcupine/demo/c/dr_libs/tests/external/miniaudio/extras/speex_resampler/thirdparty/resample.c:92
FMC_SDRAM_InitTypeDef::ReadBurst
uint32_t ReadBurst
Definition: stm32f7xx_ll_fmc.h:590
GPIO_InitTypeDef
GPIO Init structure definition
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:47
DMA_PDATAALIGN_WORD
#define DMA_PDATAALIGN_WORD
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:261
DMA_InitTypeDef::Priority
uint32_t Priority
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:75
DMA_InitTypeDef::PeriphInc
uint32_t PeriphInc
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:58
SDRAM_MODEREG_CAS_LATENCY_3
#define SDRAM_MODEREG_CAS_LATENCY_3
Definition: stm32f769i_discovery_sdram.h:109
FMC_SDRAM_InitTypeDef::MemoryDataWidth
uint32_t MemoryDataWidth
Definition: stm32f7xx_ll_fmc.h:574
GPIO_AF12_FMC
#define GPIO_AF12_FMC
AF 12 selection.
Definition: stm32h735/stm32h735g-dk/Drivers/STM32H7xx_HAL_Driver/Inc/stm32h7xx_hal_gpio_ex.h:305
FMC_SDRAM_InitTypeDef::RowBitsNumber
uint32_t RowBitsNumber
Definition: stm32f7xx_ll_fmc.h:571
FMC_SDRAM_InitTypeDef::CASLatency
uint32_t CASLatency
Definition: stm32f7xx_ll_fmc.h:580
FMC_SDRAM_TimingTypeDef::RPDelay
uint32_t RPDelay
Definition: stm32f7xx_ll_fmc.h:623
GPIO_InitTypeDef::Alternate
uint32_t Alternate
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:61
FMC_SDRAM_TimingTypeDef::ExitSelfRefreshDelay
uint32_t ExitSelfRefreshDelay
Definition: stm32f7xx_ll_fmc.h:607
FMC_SDRAM_INTERN_BANKS_NUM_4
#define FMC_SDRAM_INTERN_BANKS_NUM_4
Definition: stm32f7xx_ll_fmc.h:937
DMA_MEMORY_TO_MEMORY
#define DMA_MEMORY_TO_MEMORY
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:230
FMC_SDRAM_CMD_AUTOREFRESH_MODE
#define FMC_SDRAM_CMD_AUTOREFRESH_MODE
Definition: stm32f7xx_ll_fmc.h:996
GPIOE
#define GPIOE
Definition: stm32f407xx.h:1107
SDRAM_DMAx_STREAM
#define SDRAM_DMAx_STREAM
Definition: stm32f769i_discovery_sdram.h:92
HAL_NVIC_DisableIRQ
void HAL_NVIC_DisableIRQ(IRQn_Type IRQn)
FMC_SDRAM_CommandTypeDef::AutoRefreshNumber
uint32_t AutoRefreshNumber
Definition: stm32f7xx_ll_fmc.h:643
__HAL_RCC_GPIOE_CLK_ENABLE
#define __HAL_RCC_GPIOE_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:661
HAL_SDRAM_Write_DMA
HAL_StatusTypeDef HAL_SDRAM_Write_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
GPIO_PIN_10
#define GPIO_PIN_10
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:96
SDRAM_HandleTypeDef::Init
FMC_SDRAM_InitTypeDef Init
Definition: stm32f7xx_hal_sdram.h:70
FMC_SDRAM_ROW_BITS_NUM_12
#define FMC_SDRAM_ROW_BITS_NUM_12
Definition: stm32f7xx_ll_fmc.h:917
__DMA_HandleTypeDef::Init
DMA_InitTypeDef Init
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:143
DMA_InitTypeDef::FIFOThreshold
uint32_t FIFOThreshold
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:83
FMC_SDRAM_InitTypeDef::SDClockPeriod
uint32_t SDClockPeriod
Definition: stm32f7xx_ll_fmc.h:586
HAL_SDRAM_Init
HAL_StatusTypeDef HAL_SDRAM_Init(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_TimingTypeDef *Timing)
DMA_InitTypeDef::PeriphDataAlignment
uint32_t PeriphDataAlignment
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:64
SDRAM_MEMORY_WIDTH
#define SDRAM_MEMORY_WIDTH
Definition: stm32f769i_discovery_sdram.h:79
BSP_SDRAM_DeInit
uint8_t BSP_SDRAM_DeInit(void)
DeInitializes the SDRAM device.
Definition: stm32f769i_discovery_sdram.c:194
HAL_Delay
void HAL_Delay(uint32_t Delay)
This function provides minimum delay (in milliseconds) based on variable incremented.
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Src/stm32f4xx_hal.c:389
HAL_SDRAM_Read_DMA
HAL_StatusTypeDef HAL_SDRAM_Read_DMA(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
DMA_MBURST_SINGLE
#define DMA_MBURST_SINGLE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:326
FMC_SDRAM_TimingTypeDef::LoadToActiveDelay
uint32_t LoadToActiveDelay
Definition: stm32f7xx_ll_fmc.h:603
__HAL_RCC_GPIOD_CLK_ENABLE
#define __HAL_RCC_GPIOD_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:653
HAL_OK
@ HAL_OK
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_def.h:42
SDRAM_DMAx_CHANNEL
#define SDRAM_DMAx_CHANNEL
Definition: stm32f769i_discovery_sdram.h:91
SDRAM_MODEREG_BURST_LENGTH_1
#define SDRAM_MODEREG_BURST_LENGTH_1
FMC SDRAM Mode definition register defines.
Definition: stm32f769i_discovery_sdram.h:102
FMC_SDRAM_CMD_PALL
#define FMC_SDRAM_CMD_PALL
Definition: stm32f7xx_ll_fmc.h:995
sdramHandle
SDRAM_HandleTypeDef sdramHandle
Definition: stm32f769i_discovery_sdram.c:123
FMC_SDRAM_CMD_CLK_ENABLE
#define FMC_SDRAM_CMD_CLK_ENABLE
Definition: stm32f7xx_ll_fmc.h:994
HAL_GPIO_Init
void HAL_GPIO_Init(GPIO_TypeDef *GPIOx, GPIO_InitTypeDef *GPIO_Init)
BSP_SDRAM_MspDeInit
__weak void BSP_SDRAM_MspDeInit(SDRAM_HandleTypeDef *hsdram, void *Params)
DeInitializes SDRAM MSP.
Definition: stm32f769i_discovery_sdram.c:472
GPIO_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:52
HAL_SDRAM_Write_32b
HAL_StatusTypeDef HAL_SDRAM_Write_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
__HAL_RCC_GPIOF_CLK_ENABLE
#define __HAL_RCC_GPIOF_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:669
DMA_PINC_ENABLE
#define DMA_PINC_ENABLE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:239
DMA_InitTypeDef::MemInc
uint32_t MemInc
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:61
GPIO_InitTypeDef::Pull
uint32_t Pull
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:55
GPIO_PIN_6
#define GPIO_PIN_6
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:92
GPIO_PIN_9
#define GPIO_PIN_9
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:95
DMA_InitTypeDef::PeriphBurst
uint32_t PeriphBurst
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:92
FMC_SDRAM_InitTypeDef::ReadPipeDelay
uint32_t ReadPipeDelay
Definition: stm32f7xx_ll_fmc.h:594
DMA_PRIORITY_HIGH
#define DMA_PRIORITY_HIGH
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:294
__DMA_HandleTypeDef::Instance
DMA_Stream_TypeDef * Instance
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:141
FMC_SDRAM_TimingTypeDef::RowCycleDelay
uint32_t RowCycleDelay
Definition: stm32f7xx_ll_fmc.h:615
BSP_SDRAM_ReadData_DMA
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.
Definition: stm32f769i_discovery_sdram.c:301
DMA_InitTypeDef::MemDataAlignment
uint32_t MemDataAlignment
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:67
stm32f769i_discovery_sdram.h
This file contains the common defines and functions prototypes for the stm32f769i_discovery_sdram....
SDRAM_TIMEOUT
#define SDRAM_TIMEOUT
Definition: stm32f769i_discovery_sdram.h:86
BSP_SDRAM_Initialization_sequence
void BSP_SDRAM_Initialization_sequence(uint32_t RefreshCount)
Programs the SDRAM device.
Definition: stm32f769i_discovery_sdram.c:220
FMC_SDRAM_InitTypeDef::WriteProtection
uint32_t WriteProtection
Definition: stm32f7xx_ll_fmc.h:583
FMC_SDRAM_TimingTypeDef::WriteRecoveryTime
uint32_t WriteRecoveryTime
Definition: stm32f7xx_ll_fmc.h:620
FMC_SDRAM_CMD_LOAD_MODE
#define FMC_SDRAM_CMD_LOAD_MODE
Definition: stm32f7xx_ll_fmc.h:997
FMC_SDRAM_CAS_LATENCY_3
#define FMC_SDRAM_CAS_LATENCY_3
Definition: stm32f7xx_ll_fmc.h:947
HAL_SDRAM_Read_32b
HAL_StatusTypeDef HAL_SDRAM_Read_32b(SDRAM_HandleTypeDef *hsdram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
GPIO_PIN_13
#define GPIO_PIN_13
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:99
GPIO_InitTypeDef::Speed
uint32_t Speed
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:58
GPIOH
#define GPIOH
Definition: stm32f407xx.h:1110
GPIO_PIN_12
#define GPIO_PIN_12
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:98
SDRAM_ERROR
#define SDRAM_ERROR
Definition: stm32f769i_discovery_sdram.h:68
HAL_SDRAM_DeInit
HAL_StatusTypeDef HAL_SDRAM_DeInit(SDRAM_HandleTypeDef *hsdram)
DMA_PBURST_SINGLE
#define DMA_PBURST_SINGLE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:338
GPIO_PULLUP
#define GPIO_PULLUP
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:155
FMC_SDRAM_CMD_TARGET_BANK1
#define FMC_SDRAM_CMD_TARGET_BANK1
Definition: stm32f7xx_ll_fmc.h:1008
HAL_SDRAM_SendCommand
HAL_StatusTypeDef HAL_SDRAM_SendCommand(SDRAM_HandleTypeDef *hsdram, FMC_SDRAM_CommandTypeDef *Command, uint32_t Timeout)
Command
static FMC_SDRAM_CommandTypeDef Command
Definition: stm32f769i_discovery_sdram.c:125
GPIO_PIN_0
#define GPIO_PIN_0
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:86
FMC_SDRAM_CommandTypeDef::CommandTarget
uint32_t CommandTarget
Definition: stm32f7xx_ll_fmc.h:640
GPIOI
#define GPIOI
Definition: stm32f407xx.h:1111
DMA_MINC_ENABLE
#define DMA_MINC_ENABLE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:249
FMC_SDRAM_InitTypeDef::SDBank
uint32_t SDBank
Definition: stm32f7xx_ll_fmc.h:565
__HAL_RCC_FMC_CLK_ENABLE
#define __HAL_RCC_FMC_CLK_ENABLE()
Enables or disables the AHB3 peripheral clock.
Definition: stm32f7xx_hal_rcc_ex.h:895
FMC_SDRAM_WRITE_PROTECTION_DISABLE
#define FMC_SDRAM_WRITE_PROTECTION_DISABLE
Definition: stm32f7xx_ll_fmc.h:955
DMA_InitTypeDef::MemBurst
uint32_t MemBurst
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:86
FMC_SDRAM_TimingTypeDef::SelfRefreshTime
uint32_t SelfRefreshTime
Definition: stm32f7xx_ll_fmc.h:611
FMC_SDRAM_BANK1
#define FMC_SDRAM_BANK1
Definition: stm32f7xx_ll_fmc.h:896
DMA_NORMAL
#define DMA_NORMAL
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:281
DMA_InitTypeDef::FIFOMode
uint32_t FIFOMode
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:78
DMA_FIFOMODE_DISABLE
#define DMA_FIFOMODE_DISABLE
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:304
GPIO_PIN_15
#define GPIO_PIN_15
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:101
SDRAM_OK
#define SDRAM_OK
SDRAM status structure definition
Definition: stm32f769i_discovery_sdram.h:67
HAL_DMA_Init
HAL_StatusTypeDef HAL_DMA_Init(DMA_HandleTypeDef *hdma)
SDRAM_HandleTypeDef::Instance
FMC_SDRAM_TypeDef * Instance
Definition: stm32f7xx_hal_sdram.h:68
GPIO_PIN_1
#define GPIO_PIN_1
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:87
SDRAM_MODEREG_OPERATING_MODE_STANDARD
#define SDRAM_MODEREG_OPERATING_MODE_STANDARD
Definition: stm32f769i_discovery_sdram.h:110
SDRAM_DMAx_IRQn
#define SDRAM_DMAx_IRQn
Definition: stm32f769i_discovery_sdram.h:93
__HAL_RCC_GPIOG_CLK_ENABLE
#define __HAL_RCC_GPIOG_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:677
SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL
#define SDRAM_MODEREG_BURST_TYPE_SEQUENTIAL
Definition: stm32f769i_discovery_sdram.h:106
BSP_SDRAM_WriteData
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.
Definition: stm32f769i_discovery_sdram.c:320
DMA_InitTypeDef::Direction
uint32_t Direction
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:54
FMC_SDRAM_CommandTypeDef
SDRAM command parameters structure definition.
Definition: stm32f7xx_ll_fmc.h:635
HAL_DMA_DeInit
HAL_StatusTypeDef HAL_DMA_DeInit(DMA_HandleTypeDef *hdma)
GPIOG
#define GPIOG
Definition: stm32f407xx.h:1109
GPIO_PIN_2
#define GPIO_PIN_2
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:88
GPIO_PIN_8
#define GPIO_PIN_8
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:94
FMC_SDRAM_RBURST_ENABLE
#define FMC_SDRAM_RBURST_ENABLE
Definition: stm32f7xx_ll_fmc.h:975
FMC_SDRAM_TimingTypeDef::RCDDelay
uint32_t RCDDelay
Definition: stm32f7xx_ll_fmc.h:627
SDCLOCK_PERIOD
#define SDCLOCK_PERIOD
Definition: stm32f769i_discovery_sdram.h:81
HAL_NVIC_SetPriority
void HAL_NVIC_SetPriority(IRQn_Type IRQn, uint32_t PreemptPriority, uint32_t SubPriority)
FMC_SDRAM_CommandTypeDef::ModeRegisterDefinition
uint32_t ModeRegisterDefinition
Definition: stm32f7xx_ll_fmc.h:646
BSP_SDRAM_WriteData_DMA
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.
Definition: stm32f769i_discovery_sdram.c:339
GPIOD
#define GPIOD
Definition: stm32f407xx.h:1106
GPIOF
#define GPIOF
Definition: stm32f407xx.h:1108
DMA_InitTypeDef::Mode
uint32_t Mode
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:70
FMC_SDRAM_InitTypeDef::ColumnBitsNumber
uint32_t ColumnBitsNumber
Definition: stm32f7xx_ll_fmc.h:568
GPIO_PIN_7
#define GPIO_PIN_7
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:93
HAL_SDRAM_ProgramRefreshRate
HAL_StatusTypeDef HAL_SDRAM_ProgramRefreshRate(SDRAM_HandleTypeDef *hsdram, uint32_t RefreshRate)
GPIO_PIN_5
#define GPIO_PIN_5
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:91
FMC_SDRAM_InitTypeDef::InternalBankNumber
uint32_t InternalBankNumber
Definition: stm32f7xx_ll_fmc.h:577
GPIO_PIN_4
#define GPIO_PIN_4
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:90
__DMAx_CLK_ENABLE
#define __DMAx_CLK_ENABLE
Definition: stm32f769i_discovery_sdram.h:89
DMA_FIFO_THRESHOLD_FULL
#define DMA_FIFO_THRESHOLD_FULL
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:317
BSP_SDRAM_Sendcmd
uint8_t BSP_SDRAM_Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd)
Sends command to the SDRAM bank.
Definition: stm32f769i_discovery_sdram.c:356
__HAL_RCC_GPIOH_CLK_ENABLE
#define __HAL_RCC_GPIOH_CLK_ENABLE()
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_rcc.h:407
GPIO_PIN_3
#define GPIO_PIN_3
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:89
SDRAM_MODEREG_WRITEBURST_MODE_SINGLE
#define SDRAM_MODEREG_WRITEBURST_MODE_SINGLE
Definition: stm32f769i_discovery_sdram.h:112
SDRAM_HandleTypeDef
SDRAM handle Structure definition.
Definition: stm32f7xx_hal_sdram.h:65
__HAL_RCC_GPIOI_CLK_ENABLE
#define __HAL_RCC_GPIOI_CLK_ENABLE()
Definition: stm32f7xx_hal_rcc_ex.h:693
GPIO_PIN_11
#define GPIO_PIN_11
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:97
DMA_MDATAALIGN_WORD
#define DMA_MDATAALIGN_WORD
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_dma.h:272
GPIO_InitTypeDef::Pin
uint32_t Pin
Definition: stm32f407/stm32f407g-disc1/Drivers/STM32F4xx_HAL_Driver/Inc/stm32f4xx_hal_gpio.h:49
FMC_SDRAM_RPIPE_DELAY_0
#define FMC_SDRAM_RPIPE_DELAY_0
Definition: stm32f7xx_ll_fmc.h:983


picovoice_driver
Author(s):
autogenerated on Fri Apr 1 2022 02:14:53