Hi all!
Due to project's requirements I have to clear the memory in U-Boot after each reset as there is residual data in RAM after, at least, WDOG reset.
I can't get rid of this requirement.
I've implemented two distinct approaches to clear the memory:
1) If the current reset cause is not POR, then I set 1s wake up timer and power down the unit.
After 1s it wakes up and it's actually a POR and the memory doesn't contain residual data.
Time taken: approx 1s. It's constant regardless of memory size
2) use memset() upon reset.
Depending on the boot stage I'm at, to clean 1 Gb takes from 28s (no caches, no MMU, I guess, still need to investigate the exact cause for slowness) to 2.5 s.
Let's assume the best case i.e. 2.5s per 1Gb.
Are there any other ways to clear the memory?
Maybe somehow I can request a POR reset without using SNVS_LP timer and powerdown?
Maybe somehow I could reset MMDC?
TIA.
Best regards,
Alex.
Hello,
Generally DRAM should be cleared after initialization, therefore You may try just to re-initialize
MMDC and DRAM part, as it is implemented in the DCD.
Note, in order to avoid problems, when only i.MX is reset, but external devices, such as PMIC,
eMMC, DRAM are not (say, DRAM may be if self-refresh mode and skip memory initialization ;
PMIC can provide non-proper for start up voltages) - it is highly recommended to perform total
system (power on) reset.
This may be implemented via PMIC or WDOG signals of the i.MX and some external schematic.
Have a great day,
Yuri
-----------------------------------------------------------------------------------------------------------------------
Note: If this post answers your question, please click the Correct Answer button. Thank you!
-----------------------------------------------------------------------------------------------------------------------