AnsweredAssumed Answered

Fastest way to clear memory after reset in U-Boot?

Question asked by Alex Z on Jul 19, 2018
Latest reply on Jul 19, 2018 by Yuri Muhin

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?



Best regards,