Questions tagged [sram]

Volatile memory used by Arduino programs for storing variables and other data at runtime.

61 questions
20
votes
5 answers

I'm using too much RAM. How can this be measured?

I would like to know how much RAM I am using in my project, as far as I can tell, there's no way to actually work that out (other than going through and calculating it myself). I have got to a stage in a rather large project where I have determined…
Madivad
  • 1,372
  • 8
  • 26
2
votes
3 answers

What is the most memory-friendly way to declare integer literals?

I'm having SRAM overflow problems with my 8bit atmega328p in my Arduino Uno, which has 2KB of SRAM, so I'm defining all my for loops with bytes as counters instead of ints. As in: for(byte i=0;i<16;i++) buf[i]=(char)ap1[i]; Would it make any…
Turambar
  • 51
  • 6
1
vote
2 answers

Confusion with storage of declared variables and volatile

I read that volatile is used when we want to store variables in SRAM. But aren't all the variables in a code are stored in SRAM anyway? And what makes it an advantage sometimes for variables(like volatile) to be stored in SRAM?
floppy380
  • 245
  • 4
  • 10
0
votes
0 answers

Access non contiguous RAM slots in Arduino Nicla Vision

I'm working on a TinyML project with an Arduino Nicla Vision and I need to store a model with size 608kB in RAM. In the Nicla Vision datasheet, it is stated that 864kB of SRAM are available, but it is segmented in three non contiguous parts (AXI…
Marco
  • 19
  • 2