cancel
Showing results for 
Search instead for 
Did you mean: 

FMC SDRAM: How to get timings and refresh rate from datasheet?

Lars Beiderbecke
Senior III

I used some SDRAM with the FMC, and I do have the datasheet of the SDRAM, which lists lots of timing information. But the datasheet uses different terms than CubeMX, so how can I find out which CubeMX parameter corresponds to which datasheet value? it would really, really help if ST included the symbol for each parameter.

Some years ago, I found an (old) forum post explaining everything, but I could not find it again (or anything else).

So, how do I know what Load mode register to active delay, Exit self-refresh delay, Self-refresh time, SDRAM common row cycling delay, Write recovery time, SDRAM common row precharge delay, Row to column delay is called in the datasheet?

Also, my datasheet is for 200 MHz and 166 MHz, but my FMC runs at 100 MHz. How do I recalculate the values in the datasheet for my slower running FMC?

1 ACCEPTED SOLUTION

Accepted Solutions
Lars Beiderbecke
Senior III

I found the link again that describes this and that I used the first time: http://main.lv/writeup/stm32f4_sdram_configuration.md.

View solution in original post

5 REPLIES 5
Lars Beiderbecke
Senior III

I found the link again that describes this and that I used the first time: http://main.lv/writeup/stm32f4_sdram_configuration.md.

Lars Beiderbecke
Senior III

There's one issue, though, that is not covered by that page.

Their approach is basically to compute the duration of a cycle of the FMC, say 10 ns. Then they lookup durations in the datasheet, say T, and compute roundup(T/10 ns).

But according to my datasheet, the SDRAM IC is specified for 200 MHz, and there is also a 166 MHz variant. The "mode register set cycle time" is 10 ns for 200 MHz, but 12 ns for 166 Mhz. You'd think 10ns are 10ns, but the values differ for different clocks.

So what's missing from that linked page is how to "normalize" the SDRAM clock to the FMC clock?

Put differently, I'm using 200 MHz ICs, but FMC is only running with 100 MHz. Should I keep the timing listed in the datasheet for the SDRAM IC, or should I multiply all timings in ns by 2, since the SDRAM clock cycles remain the same, but now the SDRAM clock speed is only 1/2 its original value?

BTW, multiplying everything by 2 (and sometimes 1 less due to rounding) causes an error in CubeMX, as it violates its internal checks. It doesn't work, either, but so doesn't using the 200 MHz values.

I compared settings of an old, working version with a datasheet that had multiple speed ratings, and I used the values in the datasheet as-is for the model I bought, even though that IC was running slower.

Thus, this question is closed.