Single event upset counter

Hi

Does anyone have any good suggestions on how to build a single event upset counter? The purpose of it would be to detect bit flips in the SRAM, i.e. spontaneous changes in the volatile data stored in SRAM that can occur due to exposure to radiation (such as cosmic rays).

I presume a possible approach could be to fill the SRAM with predefined data, e.g. string variables, and to read them afterwards followed by a checksum. Any good ideas or references to sketches on how to identify and to precisely count these bit flips??? Via Coolterm? This must be pretty straightforward (although not for a complete novice like me).

BTW. Are Arduinos born with error correction/prevention algorithms so that such bit flips get corrected even before you can see them?

Thanks!

Do you have a source of radiation? Under normal operating conditions you probably won't get an error in your lifetime... I built an alarm system with a microcontroller about 20 years ago. It runs 24/7 whither it's armed or not and it's never "glitched".

In real life, errors in memory would more-likely to be caused by power/voltage irregularities. Or, by a software glitch that writes the wrong data to the wrong address. When your computer crashes, it's usually a bug in the software or driver. And, I've had a few hard drives go bad. But, I've never seen a "random data error" where some data gets changed in solid state memory. I've had flash chips & EPROMS go bad, but when they're bad, they're bad... I've never seen a random bit flip. I'm sure it happens, but it might be one of the least-common kinds of failures.

If it's real data (so you can't write test-patterns), a checksum is probably best. Errors are very rare so you can probably assume if there's a checksum mis-match, only one bit/byte has been corrupted. so, it shouldn't be too hard to count errors.

Otherwise for general testing, I don't think I'd use a checksum because you might want to know exactly which bits got flipped/corrupted. So, maybe just fill it full of ones or zeros and then read one address at a time in a loop. Or, you can do other things like writing the address of the byte/word into the bite/word, or write AA (hex*) into the even addresses and 55 into the odd addresses.**

It would also be helpful to know if 1-to-0 errors or 0-to-1 errors are more likely. If you can determine that, you can choose the best test-data and fill the memory with ones or zeros. For example, EPROMS are full of ones when erased and only the low-bits are written/changed when the EPROM is programmed. So, it would make more sense to test the EPROM by writing zeros and then check for any bits that get randomly to their "natural" state.... It would be very unlikely for a 1 in an EPROM to be accidentally "flipped" to a zero.

and to precisely count these bit flips???

:smiley: If you know how to count, I don't know how you could count imprecisely... Unless a bit in your count variable gets flipped... Then you're screwed...

  • 55 (hex) = 01010101
    AA (hex) = 10101010

** For a general-purpose memory test, you can't write simple patterns like 00, 55, AA or FF because you can be reading/writing the wrong address, or you can have shorted data lines, etc., and you can still read-back the right data. But, when looking for random failures in a known-good system, or for basic troubleshooting these simple patterns usually work... When I'm troubleshooting data lines the 1st thing I usually do is read/write 55 & AA, and then usually 00 and FF.

Thank you, DVDdoug! This clears things up a bit. :slight_smile:

The project I'm trying to work out would be something similar to a single event upset (SEU) counter which is commonly present onboard nanosatellites, where cosmic radiation is an issue. I'm interested in counting the number of SUEs per data unit. The particular experiment would take place in a proximity of a linear accelerator where SUEs are relatively common. I presume, Arduino could be used for this purpose as it consists of a microcontroller and SRAM. It's the SRAM that should be most prone to SEUs due its low charges that keep the data.

Running a checksum would probably give only a yes/no result... Therefore, if I may ask, do you possibly have any good references or ideas to a sketch which writes sample patterns to particular adresses and then reads and checks them accordingly? Ideally, it would be nice to check every individual bit and to quantify, how many flips have occured per let's say KB.

Thanks once again.