79 #if defined(FMC_BANK1) 85 #ifdef HAL_SRAM_MODULE_ENABLED 133 if(hsram->
State == HAL_SRAM_STATE_RESET)
170 hsram->
State = HAL_SRAM_STATE_RESET;
271 __IO uint8_t * psramaddress = (uint8_t *)pAddress;
277 hsram->
State = HAL_SRAM_STATE_BUSY;
280 for(; BufferSize != 0; BufferSize--)
282 *pDstBuffer = *(__IO uint8_t *)psramaddress;
288 hsram->
State = HAL_SRAM_STATE_READY;
307 __IO uint8_t * psramaddress = (uint8_t *)pAddress;
310 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
319 hsram->
State = HAL_SRAM_STATE_BUSY;
322 for(; BufferSize != 0; BufferSize--)
324 *(__IO uint8_t *)psramaddress = *pSrcBuffer;
330 hsram->
State = HAL_SRAM_STATE_READY;
349 __IO uint16_t * psramaddress = (uint16_t *)pAddress;
355 hsram->
State = HAL_SRAM_STATE_BUSY;
358 for(; BufferSize != 0; BufferSize--)
360 *pDstBuffer = *(__IO uint16_t *)psramaddress;
366 hsram->
State = HAL_SRAM_STATE_READY;
385 __IO uint16_t * psramaddress = (uint16_t *)pAddress;
388 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
397 hsram->
State = HAL_SRAM_STATE_BUSY;
400 for(; BufferSize != 0; BufferSize--)
402 *(__IO uint16_t *)psramaddress = *pSrcBuffer;
408 hsram->
State = HAL_SRAM_STATE_READY;
431 hsram->
State = HAL_SRAM_STATE_BUSY;
434 for(; BufferSize != 0; BufferSize--)
436 *pDstBuffer = *(__IO uint32_t *)pAddress;
442 hsram->
State = HAL_SRAM_STATE_READY;
462 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
471 hsram->
State = HAL_SRAM_STATE_BUSY;
474 for(; BufferSize != 0; BufferSize--)
476 *(__IO uint32_t *)pAddress = *pSrcBuffer;
482 hsram->
State = HAL_SRAM_STATE_READY;
505 hsram->
State = HAL_SRAM_STATE_BUSY;
515 hsram->
State = HAL_SRAM_STATE_READY;
535 if(hsram->
State == HAL_SRAM_STATE_PROTECTED)
544 hsram->
State = HAL_SRAM_STATE_BUSY;
554 hsram->
State = HAL_SRAM_STATE_READY;
596 hsram->
State = HAL_SRAM_STATE_READY;
616 hsram->
State = HAL_SRAM_STATE_BUSY;
622 hsram->
State = HAL_SRAM_STATE_PROTECTED;
HAL_StatusTypeDef HAL_SRAM_DeInit(SRAM_HandleTypeDef *hsram)
Perform the SRAM device de-initialization sequence.
void HAL_SRAM_MspInit(SRAM_HandleTypeDef *hsram)
Initialize the SRAM MSP.
HAL_StatusTypeDef HAL_SRAM_Write_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
Write a Word data buffer to SRAM memory using DMA transfer.
DMA handle Structure definition.
void(* XferCpltCallback)(struct __DMA_HandleTypeDef *hdma)
__weak void HAL_SRAM_DMA_XferCpltCallback(DMA_HandleTypeDef *hdma)
DMA transfer complete callback.
This file contains all the functions prototypes for the HAL module driver.
HAL_SRAM_StateTypeDef HAL_SRAM_GetState(SRAM_HandleTypeDef *hsram)
Return the SRAM controller state.
HAL_StatusTypeDef HAL_SRAM_Init(SRAM_HandleTypeDef *hsram, FMC_NORSRAM_TimingTypeDef *Timing, FMC_NORSRAM_TimingTypeDef *ExtTiming)
Perform the SRAM device initialization sequence.
void(* XferErrorCallback)(struct __DMA_HandleTypeDef *hdma)
HAL_StatusTypeDef HAL_DMA_Start_IT(DMA_HandleTypeDef *hdma, uint32_t SrcAddress, uint32_t DstAddress, uint32_t DataLength)
Start the DMA Transfer with interrupt enabled.
FMC_NORSRAM_TypeDef * Instance
HAL_StatusTypeDef FMC_NORSRAM_DeInit(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_EXTENDED_TypeDef *ExDevice, uint32_t Bank)
DeInitialize the FMC_NORSRAM peripheral.
HAL_StatusTypeDef HAL_SRAM_Write_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pSrcBuffer, uint32_t BufferSize)
Write 16-bit buffer to SRAM memory.
__weak void HAL_SRAM_DMA_XferErrorCallback(DMA_HandleTypeDef *hdma)
DMA transfer complete error callback.
HAL_StatusTypeDef HAL_SRAM_Read_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pDstBuffer, uint32_t BufferSize)
Read 8-bit buffer from SRAM memory.
HAL_StatusTypeDef FMC_NORSRAM_Extended_Timing_Init(FMC_NORSRAM_EXTENDED_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank, uint32_t ExtendedMode)
Initialize the FMC_NORSRAM Extended mode Timing according to the specified parameters in the FMC_NORS...
HAL_StatusTypeDef HAL_SRAM_Write_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pSrcBuffer, uint32_t BufferSize)
Write 32-bit buffer to SRAM memory.
FMC NORSRAM Timing parameters structure definition.
HAL_StatusTypeDef FMC_NORSRAM_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_InitTypeDef *Init)
Initialize the FMC_NORSRAM device according to the specified control parameters in the FMC_NORSRAM_In...
SRAM handle Structure definition.
HAL_StatusTypeDef HAL_SRAM_Read_DMA(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
Read a Word data buffer from the SRAM memory using DMA transfer.
FMC_NORSRAM_EXTENDED_TypeDef * Extended
HAL_StatusTypeDef HAL_SRAM_Read_16b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint16_t *pDstBuffer, uint32_t BufferSize)
Read 16-bit buffer from SRAM memory.
HAL_StatusTypeDef HAL_SRAM_Write_8b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint8_t *pSrcBuffer, uint32_t BufferSize)
Write 8-bit buffer to SRAM memory.
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Disable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
Disables dynamically FMC_NORSRAM write operation.
void HAL_SRAM_MspDeInit(SRAM_HandleTypeDef *hsram)
DeInitialize the SRAM MSP.
FMC_NORSRAM_InitTypeDef Init
HAL_StatusTypeDef HAL_SRAM_WriteOperation_Enable(SRAM_HandleTypeDef *hsram)
Enable dynamically SRAM write operation.
HAL_StatusTypeDef FMC_NORSRAM_Timing_Init(FMC_NORSRAM_TypeDef *Device, FMC_NORSRAM_TimingTypeDef *Timing, uint32_t Bank)
Initialize the FMC_NORSRAM Timing according to the specified parameters in the FMC_NORSRAM_TimingType...
HAL_StatusTypeDef FMC_NORSRAM_WriteOperation_Enable(FMC_NORSRAM_TypeDef *Device, uint32_t Bank)
Enables dynamically FMC_NORSRAM write operation.
HAL_StatusTypeDef HAL_SRAM_WriteOperation_Disable(SRAM_HandleTypeDef *hsram)
Disable dynamically SRAM write operation.
__IO HAL_SRAM_StateTypeDef State
HAL_StatusTypeDef HAL_SRAM_Read_32b(SRAM_HandleTypeDef *hsram, uint32_t *pAddress, uint32_t *pDstBuffer, uint32_t BufferSize)
Read 32-bit buffer from SRAM memory.