Go Down

Topic: MicroSD card and Serial/Reset issue (Read 1 time) previous topic - next topic


Hey all,

I'm trying to store arrays to a 2GB SD card which I can then access later. I am using the EtherTen 328P board which contains a microSD socket.
I am able to read/write files to the card in small testing sketches, however I have come across an issue in my main program.

My program seems to reset and start over at times when I am running my program, which I can see using the Serial Monitor. The serial port also sometimes shows garbage and random characters while running the program. Usually the program will restart midway through a Serial.Print() statement.

I am using the standard SD commands (#include <SD.h>). The arrays I am writing can be 400 bytes max.

My question is, might the SD commands be taking up too much SRAM, if I only have 2KB of it? I also read/write from the Serial often in my program, could this contribute to the issue?

My code is long and confusing, so I wont make you read through it, I'm just curious if this is a known issue.



Running out of SRAM is a known issue. It happens a lot, especially if you use a lot of strings without using the "F" function. For an example:
Code: [Select]
Serial.println("This is a string that will be put in SRAM before printing");
Serial.println(F("This string will be printed from program memory"));


Hey thanks a lot for your reply, I have not heard of using the F function when printing strings!
Much appreaciated!

Go Up

Please enter a valid email to subscribe

Confirm your email address

We need to confirm your email address.
To complete the subscription, please click the link in the email we just sent you.

Thank you for subscribing!

via Egeo 16
Torino, 10131