Showing results for 
Search instead for 
Did you mean: 

FMC SDRAM communication continuously working (even when not used)



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;
    sdramstatus = SDRAM_OK;
  /* SDRAM initialization sequence */
  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!


>>Do you know why the SDRAM is always talking to my STM32, even when I do not use it ?


Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..
Chief II

Memory refresh is the process of periodically reading information from an area of computer memory and immediately rewriting the read information to the same area without modification, for the purpose of preserving the information.[1] Memory refresh is a background maintenance process required during the operation of semiconductor dynamic random-access memory (DRAM), the most widely used type of computer memory, and in fact is the defining characteristic of this class of memory.

When you plan no refresh maybe you need use SRAM (STATIC) but for reduce EMI you need perfect PCB , short bus and maybe add R arays


Thanks for your advices!

I think my PCB can indeed by improved. Traces are all 80mm for length matching = I have a lot of 45-degree style miter. Also I use a 2-layers PCB, that was my technical spec. And I will add R arays (even if I found that the gpio speed HIGH instead of VERY_HIGH only improves a little little bit the dB.

But before making a new board iteration, I want to do everything possible by software to improve the electromagnetic compatibility.

Is there a way to decrease the refresh frequency and so decrease the average power emitted? Should it work on paper?

I tried to change the SDRAM init parameters (Timing.SelfRefreshTime, RefreshRate, AutoRefreshNumber) but no significant changes, I'm not sure to act on the right parameters...

I mean only one clk PLL spread settings enable, that use spread spectrum technique to reduce your trouble maybe all.


Thanks, I will try it.

Seems that there is no spread settings on the STM32H7 for the PLL but I will do my own spread.