Specialist Supplier of Crystals & Frequency Control Componentssales@mecxtal.com.cn0755-26500570
MERLIN home / Rednote / System Validation and Replacement

STM32F429 SDRAM runs slower. Why does the display corrupt only after sitting idle?

A board uses external SDRAM for a display buffer. After lowering the STM32F429 clock it passes a startup memory test, but a static display later develops bad pixels. Slower operation can give some read and write edges more room. It can also lengthen refresh because the count is expressed in clock cycles. A fast test that reads immediately after writing may not cover retention while the product waits for refresh at temperature and under load. Establish the actual SDCLK and the memory's row refresh requirement first.

Convert the counter back into time

ST RM0090 gives the FMC_SDRTR calculation as the SDRAM refresh interval times the SDRAM clock frequency, minus 20 cycles for controller scheduling margin. The memory's all-row refresh period divided by row count gives the interval. Suppose a device requires 8,192 rows per 64 ms, about 7.8125 µs per row. At 90 MHz this gives 703.125 clocks. Subtracting 20 gives 683.125, so rounding conservatively gives 683, subject to ST's field restrictions. Insert the actual memory timing from its data sheet rather than reusing this example.

At 60 MHz the product is 468.75 cycles. Subtracting 20 and rounding down gives 448. A retained 683 corresponds in a simple count-to-time estimate to about 11.38 µs, roughly 46% longer than 7.8125 µs before accounting for controller details. The estimate is not an observed bus refresh interval. Calculate each approved memory population independently. Some devices require a shorter all-row interval at elevated temperature.

Identify the clock that actually changed

Document the reference, PLL, HCLK, FMC divider, and pin clock in each normal, reduced-power and recovery mode. Refresh counts use actual SDCLK. The CPU frequency is one upstream setting. If a frequency mode preserves SDCLK, verify its clock source and registers. Review access timing, CAS latency and command requirements as well. A correct refresh counter does not validate other timing fields.

If changing rate while running, identify code, stack, DMA, display scanout and other bus users that access SDRAM. Pause accesses and enter the memory retention state using the controller and memory requirements. Verify access recovery and retention supply conditions. If the system cannot pause framebuffer access cleanly, use separate boot modes with complete initialization and a defined retention policy. Editing live clock registers while other masters are active does not reproduce the supported transition.

Exercise retention, temperature and bus competition

Write identifiable patterns across rows, leave them resident, then read the memory through a path that cannot return cached copies. Repeat with display, DMA and the heaviest supported access load. Preserve the first corrupt value and address pattern. A failure appearing after a hot idle interval points toward a refresh investigation. Immediate errors also call for address, command, supply and I/O timing checks. Use two supported frequencies with visibly different refresh counts to verify that software updates the counter.

Record the exact SDRAM, refresh period conditions, actual SDCLK, calculated and read-back COUNT, and data integrity under retention and traffic tests. The oscillator order specifies the reference. Board acceptance establishes working refresh timing at the clock, temperature, and load the product actually uses.

Separate visible display corruption from corruption of the stored frame. Preserve framebuffer checks or the failing region when pixels change. A correct buffer points toward scanout timing or arbitration. Wrong data at the address calls for correlating temperature, retention, I/O timing and power. Rewriting the entire framebuffer can temporarily clear the symptom without qualifying retention.

References

WeChat

MERLIN · TIMING COMPONENTS

Scan with WeChat to contact Sales

Add our WeCom contacts from your usual WeChat app.

On desktop, scan with your phone. On mobile, save the QR image and select it from your album in WeChat Scan.