Freescale application note explaining how restarting the i.MX System PLL stops the SDCLK signal and can corrupt SDRAM data.
This Freescale Semiconductor application note describes the effect of changing the System PLL frequency on SDRAM memories connected to the i.MX microprocessors MC9328MX1, MC9328MXL, and MC9328MXS. When the PLL is restarted, the SDCLK signal stops toggling for about 100 µs, during which no refresh commands are issued, which can corrupt data in non-refreshed rows.
The note explains the refresh requirements of the SDRAM controller and recommends initializing and setting up the PLLs before initializing the SDRAM during cold start up. For changes during system operation, it gives a sequence using the RTC interrupt and STOP mode to keep the SDRAM data intact.
| SDCLK low time during PLL restart | about 100 µs |
|---|---|
| Refresh interval for 2048-row SDRAM | every 31.25 µs |
| Refresh period | 64 ms |
| Supported row addresses | 11, 12, and 13 |
| Refresh commands for 2048 rows | 2048 refresh commands |
| Refresh commands for 4096 rows | two refresh commands every 31.25 µs |
| Refresh commands missed during 100 µs low time | three refresh cycles or twelve refresh commands |
The SDCLK signal goes low and stops toggling for about 100 µs, then starts toggling at the new frequency.
During the SDCLK low time no refresh commands are issued, so rows that need refreshing are not refreshed and their data can be corrupted.
It is recommended to initialize and set up the PLLs before initializing the SDRAM, which is normally done once during cold start up.
Program SPCTL0, set up and enable an RTC interrupt, place the processor in STOP mode and execute WFI; the PLL then restarts at the new frequency and the SDRAM leaves self refresh.