Ideas on testing memory

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Ideas on testing memory

Postby fly135 » Wed May 09, 2018 3:56 pm

Wondering if anyone has any ideas of doing a system test and especially checking memory (external SPI PSRAM). Maybe a bootloader that does a system check without having the RTOS running. I looked around the site to see if anyone was already doing diagnostics but didn't really find much.

John A

mikemoy
Posts: 604
Joined: Fri Jan 12, 2018 9:10 pm

Re: Ideas on testing memory

Postby mikemoy » Wed May 09, 2018 4:38 pm

Not sure if you wanted to have your own test code for this, but did you see "Run memory test on SPI RAM initialization" in menuconfig ?
Attachments
2018-05-09_11-33-59.jpg
2018-05-09_11-33-59.jpg (67.72 KiB) Viewed 7097 times

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Ideas on testing memory

Postby fly135 » Wed May 09, 2018 5:11 pm

I do have that enabled. It doesn't print anything on boot. My employer is asking that I come up with an array of diagnostic tests for manufacturing, which I can understand. They also wanted benchmarks on flash and ram r/w speed, although I have no idea why that info would be useful to them. I can't see that they are going to make any decisions based on that data except to compare against another platform in the future.

Most of the tests will be checking if peripheral devices are functioning, but a check of flash and ram of some kind is on their list of "must haves".

John A

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Ideas on testing memory

Postby kolban » Wed May 09, 2018 5:22 pm

I guess to test RAM, one would want to write known values into each location and validate that they can successfully be read back. Is that how you interpret a RAM check?

If it were me, I'd first go in deep and figure out what the make menuconfig option actually does. I don't think we can determine if it meets our needs without answering what does it do in the first place. The lack of a message at boot is likely (opinion) because the test passed and there is nothing out of the ordinary to report.

As for flash and ram read/write speeds, that sounds/feels distinct from testing whether the memory works over its entire range. Read/write speeds should be governed under a benchmark.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Ideas on testing memory

Postby fly135 » Wed May 09, 2018 5:45 pm

I guess to test RAM, one would want to write known values into each location and validate that they can successfully be read back. Is that how you interpret a RAM check?
Yes, There are lots of ram check examples like writing alternating patterns of 0xAA55AA55. And writing rotating bit patterns then reading back to see if things are as expected. March tests, etc... I don't want the RTOS to be using the SPI PSRAM, so I'd not integrate it into alloc, but configure to integrate into esp32 memory map.

Not really sure about the flash test. Maybe just writing to a big partition that is everything but the app. If I don't do it in the bootloader then maybe select using only one core for FreeRTOS so there is less going on.
The lack of a message at boot is likely (opinion) because the test passed and there is nothing out of the ordinary to report.
I think they want to see a check list of things passing. Even if it's just a rudimentary test.
As for flash and ram read/write speeds, that sounds/feels distinct from testing whether the memory works over its entire range. Read/write speeds should be governed under a benchmark.
I agree. That's why I don't think the info is going to be all that useful to them. I figure the simplest thing is just do some R/W blocks and time them, then spit out the numbers. I feel like it's a case where management says "we need to test", then throws that nebulous requirement at an engineer in hopes that he'll fill in all the details. It's funny because the benchmark is what got this going. They said they wanted a benchmark and that could be the start of a test platform.

In the end I'm guessing that it will be a standalone app that goes through each component including ram and flash, performs some set to tests, and prints out "yah or nay".

John A

User avatar
kolban
Posts: 1683
Joined: Mon Nov 16, 2015 4:43 pm
Location: Texas, USA

Re: Ideas on testing memory

Postby kolban » Wed May 09, 2018 8:00 pm

John,
As an aside ... your engineering woes make me smile ... ESP32 is a hobby for me ... I'd love the opportunity to tinker with ESP32s as a professional paying job full-time :-) ... color me green with envy.
Free book on ESP32 available here: https://leanpub.com/kolban-ESP32

User avatar
fly135
Posts: 606
Joined: Wed Jan 03, 2018 8:33 pm
Location: Orlando, FL

Re: Ideas on testing memory

Postby fly135 » Wed May 09, 2018 8:35 pm

kolban wrote:John,
As an aside ... your engineering woes make me smile ... ESP32 is a hobby for me ... I'd love the opportunity to tinker with ESP32s as a professional paying job full-time :-) ... color me green with envy.
I was retired last year. Then a friend that I worked with in the early 90's called me up and asked me if I wanted a consulting gig. Didn't even know about the ESP32 until then. Mostly worked with video compression and TI DaVinci stuff in recent years. But the company that I did that for stopped new development so I provided maintenance and gradually went into retirement over the last few years.

Picked up a devkit module off Amazon and spent a week building examples and studying the processor, then started the job. You should totally be able to get a gig with all you know. Your youtube videos helped me a lot. I started with computers back in the early 80's. If you google "Rally Speedway", you'll get hits for one of my games I wrote in 1983. So yeah, I'm that old! :o

John A

Who is online

Users browsing this forum: No registered users and 128 guests