Class used to drive the IS42S16400J SDRAM memory mounted on STM32F429I-Discovery board.

Dependents:   DISCO-F429ZI_Gauge DISCO-F429ZI_SDRAM_demo WIRE-BANDING_FT810 WIRE-BANDING_copy

Committer:
Jerome Coutant
Date:
Wed May 17 12:53:57 2017 +0200
Revision:
1:d0070c48e1b9
Parent:
0:0a443e2fe92c
DISCO-F429ZI BSP update with Cube V1.16.0

Who changed what in which revision?

UserRevisionLine numberNew contents of line
bcostm 0:0a443e2fe92c 1 /* Copyright (c) 2010-2011 mbed.org, MIT License
bcostm 0:0a443e2fe92c 2 *
bcostm 0:0a443e2fe92c 3 * Permission is hereby granted, free of charge, to any person obtaining a copy of this software
bcostm 0:0a443e2fe92c 4 * and associated documentation files (the "Software"), to deal in the Software without
bcostm 0:0a443e2fe92c 5 * restriction, including without limitation the rights to use, copy, modify, merge, publish,
bcostm 0:0a443e2fe92c 6 * distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the
bcostm 0:0a443e2fe92c 7 * Software is furnished to do so, subject to the following conditions:
bcostm 0:0a443e2fe92c 8 *
bcostm 0:0a443e2fe92c 9 * The above copyright notice and this permission notice shall be included in all copies or
bcostm 0:0a443e2fe92c 10 * substantial portions of the Software.
bcostm 0:0a443e2fe92c 11 *
bcostm 0:0a443e2fe92c 12 * THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING
bcostm 0:0a443e2fe92c 13 * BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
bcostm 0:0a443e2fe92c 14 * NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM,
bcostm 0:0a443e2fe92c 15 * DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
bcostm 0:0a443e2fe92c 16 * OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
bcostm 0:0a443e2fe92c 17 */
bcostm 0:0a443e2fe92c 18
bcostm 0:0a443e2fe92c 19 #include "SDRAM_DISCO_F429ZI.h"
bcostm 0:0a443e2fe92c 20
bcostm 0:0a443e2fe92c 21 // Constructor
bcostm 0:0a443e2fe92c 22 SDRAM_DISCO_F429ZI::SDRAM_DISCO_F429ZI()
bcostm 0:0a443e2fe92c 23 {
bcostm 0:0a443e2fe92c 24 BSP_SDRAM_Init();
bcostm 0:0a443e2fe92c 25 }
bcostm 0:0a443e2fe92c 26
bcostm 0:0a443e2fe92c 27 // Destructor
bcostm 0:0a443e2fe92c 28 SDRAM_DISCO_F429ZI::~SDRAM_DISCO_F429ZI()
bcostm 0:0a443e2fe92c 29 {
bcostm 0:0a443e2fe92c 30 }
bcostm 0:0a443e2fe92c 31
bcostm 0:0a443e2fe92c 32 //=================================================================================================================
bcostm 0:0a443e2fe92c 33 // Public methods
bcostm 0:0a443e2fe92c 34 //=================================================================================================================
bcostm 0:0a443e2fe92c 35
bcostm 0:0a443e2fe92c 36 void SDRAM_DISCO_F429ZI::Init(void)
bcostm 0:0a443e2fe92c 37 {
bcostm 0:0a443e2fe92c 38 BSP_SDRAM_Init();
bcostm 0:0a443e2fe92c 39 }
bcostm 0:0a443e2fe92c 40
bcostm 0:0a443e2fe92c 41 void SDRAM_DISCO_F429ZI::Initialization_sequence(uint32_t RefreshCount)
bcostm 0:0a443e2fe92c 42 {
bcostm 0:0a443e2fe92c 43 BSP_SDRAM_Initialization_sequence(RefreshCount);
bcostm 0:0a443e2fe92c 44 }
bcostm 0:0a443e2fe92c 45
bcostm 0:0a443e2fe92c 46 void SDRAM_DISCO_F429ZI::ReadData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
bcostm 0:0a443e2fe92c 47 {
bcostm 0:0a443e2fe92c 48 BSP_SDRAM_ReadData(uwStartAddress, pData, uwDataSize);
bcostm 0:0a443e2fe92c 49 }
bcostm 0:0a443e2fe92c 50
bcostm 0:0a443e2fe92c 51 void SDRAM_DISCO_F429ZI::ReadData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
bcostm 0:0a443e2fe92c 52 {
bcostm 0:0a443e2fe92c 53 BSP_SDRAM_ReadData_DMA(uwStartAddress, pData, uwDataSize);
bcostm 0:0a443e2fe92c 54 }
bcostm 0:0a443e2fe92c 55
bcostm 0:0a443e2fe92c 56 void SDRAM_DISCO_F429ZI::WriteData(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
bcostm 0:0a443e2fe92c 57 {
bcostm 0:0a443e2fe92c 58 BSP_SDRAM_WriteData(uwStartAddress, pData, uwDataSize);
bcostm 0:0a443e2fe92c 59 }
bcostm 0:0a443e2fe92c 60
bcostm 0:0a443e2fe92c 61 void SDRAM_DISCO_F429ZI::WriteData_DMA(uint32_t uwStartAddress, uint32_t *pData, uint32_t uwDataSize)
bcostm 0:0a443e2fe92c 62 {
bcostm 0:0a443e2fe92c 63 BSP_SDRAM_WriteData_DMA(uwStartAddress, pData, uwDataSize);
bcostm 0:0a443e2fe92c 64 }
bcostm 0:0a443e2fe92c 65
Jerome Coutant 1:d0070c48e1b9 66 uint8_t SDRAM_DISCO_F429ZI::Sendcmd(FMC_SDRAM_CommandTypeDef *SdramCmd)
bcostm 0:0a443e2fe92c 67 {
bcostm 0:0a443e2fe92c 68 return BSP_SDRAM_Sendcmd(SdramCmd);
bcostm 0:0a443e2fe92c 69 }