Hello Community,
i have the problem, that i have no idea how i could initialize the SDRAM with the HAL-Functions for STM32F42xx.
The correct chip is STM32F427-IGH6. My problem is that i could not initialize the external SDRAM with the HAL Functions. What did i wrong?
int main(void) { /* STM32F4xx HAL library initialization: - Configure the Flash prefetch, instruction and Data caches - Configure the Systick to generate an interrupt each 1 msec - Set NVIC Group Priority to 4 - Global MSP (MCU Support Package) initialization */ HAL_Init(); //Configure the System clock to have a frequency of 180 MHz SystemClock_Config(); //Initialize OS OS_IncDI(); // Initially disable interrupts OS_InitKern(); // Initialize OS OS_InitHW(); // Initialize Hardware for OS OS_DecRI(); // Enable interrupts Trace_Init(); // Initialize embOS-Trace //initialize peripherals InitPeripherals(); FMC_SDRAM_InitTypeDef ini; ini.SDBank = FMC_SDRAM_BANK2; ini.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_8; ini.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12; ini.MemoryDataWidth = FMC_SDRAM_MEM_BUS_WIDTH_16; ini.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4; ini.CASLatency = FMC_SDRAM_CAS_LATENCY_3; ini.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE; ini.SDClockPeriod = FMC_SDRAM_CLOCK_PERIOD_2; ini.ReadBurst = FMC_SDRAM_RBURST_DISABLE; ini.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_1; FMC_SDRAM_Init(FMC_Bank5_6,&ini);
I think after the FMC_SDRAM_Init - the SDRAM should work? I did a SDRAM Sample without the HAL-Functions and it worked fine - but now i would use this Functions and i have no idea which kind of functions i should call and use. I also have no idea about the First-Parameter of FMC_SDRAM_Init - There should be FMC_Bank5_6_TypeDef, but with which configuration?