Memory Test

Hello

I want to know if there is a script that runs a full memory test!
Not the available one.

I want something that erases all memory, write on the memory and read it back, check if all the blocks are ok.

Thank you

I want something that erases all memory, write on the memory and read it back, check if all the blocks are ok.

Reads and writes which kind of memory? The Arduino has three kinds - flash, SRAM, and EEPROM.

Flash is read-only, at run time.

All, I am having a lot of problems, and at the serial port receiving random characters and I think that is a memory problem.
I would like to test them.

What are you sending and what are you receiving? Post both.

Also post your code.
Lots of causes like Low power and maxed out memory.

I posted my code in several topics before but no help :frowning:

Here one of those.

The power is the official power supply, I buy it from arduino.
9v 1A

You can't use a power supply and the USB power at the same time.
They will fight each other like 2 dogs eating from the same bowl.

You were given an answer, you ran out of SRAM. Using a GSM is very taxing on the SRAM, so if you ever need to print other strings to the Serial monitor, you need to use the macro F(). Look at what SurferTim has given you, and do the same for your other serial.print functions.

@Steinie44

That is actually false, I thought so too but after looking at the schematic and the components used, it turns out that if you power the arduino externally (greater then 7V), the USB power is turned off. Thus no struggle.
http://forum.arduino.cc/index.php/topic,22132.0.html

OK, partly false.
What about raw in on mini.
Vin on Uno.

What do you mean by "raw in"

The Vin on the Uno is exactly the same as the barrel jack. Both the Uno and Mini need >7V.
The Pro Mini depends on the model you get. 3.35V minimum on the 3.3V model, and 5V minimum on the 5V model.

So, you can't use the barrel jack and Vin at the same time.
Well, I knew there was some catch.

Vin is the positive connection of the barrel jack (direct connection). Its just an alternative method of powering the arduino instead of using a barrel jack.

@Placido, the chances of you having dodgy RAM are almost non-existent, whereas the chances of you running out of RAM are extremely high, in fact that's one of the most common problems we see around here.

You do not need a RAM test function, you need to look at re factoring your code to use less RAM.


Rob

you can't use the barrel jack and Vin at the same time.

You can't use the barrel jack (OR the USB) if you're powering the Arduino via the +5V pin on the power connector. That is a valid way to power the arduino if you have a regulated 5V power supply, or an appropriate battery pack... (or WAS, anyway. I'm not sure exactly how it will work with the auto-power-switching circuitry.)

It is extremely unlikely that a memory failure would result in badly operating arduino sketches. By the time the chip is that broken, it would probably not be working at all (and "upload" would almost certainly fail; that DOES use RAM.)

changing

Serial.print("...");

to

Serial.print(F("..."));

really help me. thanks!