/** * @brief Writes an mount of data to the SDRAM memory in polling mode. * @param uwStartAddress : Write start address * @param pData : Pointer to data to be written * @param uwDataSize: Size of written data from the memory * @retval None */ void BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) { /* Disable write protection */ HAL_SDRAM_WriteProtection_Disable(&SdramHandle); /*Write 32-bit data buffer to SDRAM memory*/ HAL_SDRAM_Write_32b(&SdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize); }
/** * @brief Writes an amount of data to the SDRAM memory in polling mode. * @param uwStartAddress: Write start address * @param pData: Pointer to data to be written * @param uwDataSize: Size of written data from the memory * @retval SDRAM status */ uint8_t BSP_SDRAM_WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize) { if(HAL_SDRAM_Write_32b(&sdramHandle, (uint32_t *)uwStartAddress, pData, uwDataSize) != HAL_OK) { return SDRAM_ERROR; } else { return SDRAM_OK; } }
/** * @brief Writes an amount of data to the SDRAM memory in polling mode. * @param uwStartAddress: Write start address * @param pData: Pointer to data to be written * @param uwDataSize: Size of written data from the memory * @retval SDRAM status */ rt_err_t SDRAM_WriteData(uint32_t Address, uint32_t *Data, uint32_t DataSize) { if(HAL_SDRAM_Write_32b(&sdramHandle, (uint32_t *)Address, Data, DataSize) != HAL_OK) { return RT_ERROR; } else { return RT_EOK; } }