FMC SDRAM communication continuously working (even when not used)
Hello,
I want to improve the electromagnetic compatibility of my design and it seems that the worst part of the circuit is the STM32H7 <> SDRAM IS42S32800J-7TLI communication.
After a day in a specialized lab I know that I am out of the CE range : I have a +60dBuV/m at 120MHz = the SDRAM frequency (maximum is +40dBuV/m)
I have a spectrum analyser and I can do hardware/software changes to see if I can improve it.
The peak at 120MHz (and its harmonics) are always present : they appears from the STM32 FMC configuration that you find below.
uint8_t BSP_SDRAM_Init(void)
{
static uint8_t sdramstatus = SDRAM_ERROR;
sdramHandle.Instance = FMC_SDRAM_DEVICE;
/* Timing configuration for 100Mhz as SDRAM clock frequency (System clock is up to 200Mhz) */
Timing.LoadToActiveDelay = 2;
Timing.ExitSelfRefreshDelay = 7;
Timing.SelfRefreshTime = 4;
Timing.RowCycleDelay = 7;
Timing.WriteRecoveryTime = 2;
Timing.RPDelay = 2;
Timing.RCDDelay = 2;
sdramHandle.Init.SDBank = FMC_SDRAM_BANK1;
sdramHandle.Init.ColumnBitsNumber = FMC_SDRAM_COLUMN_BITS_NUM_9;
sdramHandle.Init.RowBitsNumber = FMC_SDRAM_ROW_BITS_NUM_12;
sdramHandle.Init.MemoryDataWidth = SDRAM_MEMORY_WIDTH;
sdramHandle.Init.InternalBankNumber = FMC_SDRAM_INTERN_BANKS_NUM_4;
sdramHandle.Init.CASLatency = FMC_SDRAM_CAS_LATENCY_3;
sdramHandle.Init.WriteProtection = FMC_SDRAM_WRITE_PROTECTION_DISABLE;
sdramHandle.Init.SDClockPeriod = SDCLOCK_PERIOD;
sdramHandle.Init.ReadBurst = FMC_SDRAM_RBURST_ENABLE;
sdramHandle.Init.ReadPipeDelay = FMC_SDRAM_RPIPE_DELAY_0;
BSP_SDRAM_MspInit(&sdramHandle, NULL); /* __weak function can be rewritten by the application */
if(HAL_SDRAM_Init(&sdramHandle, &Timing) != HAL_OK) sdramstatus = SDRAM_ERROR;
else
sdramstatus = SDRAM_OK;
/* SDRAM initialization sequence */
BSP_SDRAM_Initialization_sequence(REFRESH_COUNT);
return sdramstatus;
}Moreover, the fact that I read or write the SDRAM does not change anything!
I think I can drastically decrease the emitted power if the SDRAM works only when I read/write it.
Do you know why the SDRAM is always talking to my STM32, even when I do not use it ?
Thanks for your precious help!
