简体   繁体   中英

How can you do a full range memory test on an SRAM test on the SRAM your application is using?

Working on a bear metal application in a Nios II embedded processor. A requirement of the product is that it does a full range memory test of the SRAM which the application code uses once up and running.

How can I do this? Clearly, I can't blindly just setup a pointer before main() and start writing / reading test patterns. Is there a way to run a "pre-application" before any of the application code variables are setup for example.

Thanks!

I would solve it with an assembler block, do a full test for RAM blocks.
Copy a block to a temp location, test the block and restore it.
Obviously the interrupts has to be disabled, when the test executes.
It's not necessary to test all blocks at once, to avoid long blocking times.

Using assembler here to have the full control of the used registers and avoid RAM use for the necessary variables.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM