SRAM Initialization and de_initialization functions. STMicroelectronics STM32F4
تبلیغات
تبلیغات
UM1725
2. Declare two FMC_NORSRAM_TimingTypeDef structures, for both normal and extended mode timings; for example: FMC_NORSRAM_TimingTypeDef Timing and
FMC_NORSRAM_TimingTypeDef ExTiming; and fill its fields with the allowed values of the structure member.
3. Initialize the SRAM Controller by calling the function HAL_SRAM_Init(). This function performs the following sequence: a. MSP hardware layer configuration using the function HAL_SRAM_MspInit() b. Control register configuration using the FMC NORSRAM interface function
FMC_NORSRAM_Init() c. Timing register configuration using the FMC NORSRAM interface function
FMC_NORSRAM_Timing_Init() d. Extended mode Timing register configuration using the FMC NORSRAM interface function FMC_NORSRAM_Extended_Timing_Init() e. Enable the SRAM device using the macro __FMC_NORSRAM_ENABLE()
4. At this stage you can perform read/write accesses from/to the memory connected to the NOR/SRAM Bank. You can perform either polling or DMA transfer using the following APIs:
HAL_SRAM_Read()/HAL_SRAM_Write() for polling read/write access
HAL_SRAM_Read_DMA()/HAL_SRAM_Write_DMA() for DMA read/write transfer
5. You can also control the SRAM device by calling the control APIs
HAL_SRAM_WriteOperation_Enable()/ HAL_SRAM_WriteOperation_Disable() to respectively enable/disable the SRAM write operation
6. You can continuously monitor the SRAM device HAL state by calling the function
HAL_SRAM_GetState()
60.3.2 SRAM Initialization and de_initialization functions
This section provides functions allowing to initialize/de-initialize the SRAM memory
This section contains the following APIs:
HAL_SRAM_DMA_XferCpltCallback()
HAL_SRAM_DMA_XferErrorCallback()
60.3.3 SRAM Input and Output functions
This section provides functions allowing to use and control the SRAM memory
This section contains the following APIs:
60.3.4 SRAM Control functions
This subsection provides a set of functions allowing to control dynamically the SRAM interface.
826/963 DOCID025834 Rev 3
دانلود
تبلیغات