Pages: [1]   Go Down
Author Topic: How to use all 96kb RAM  (Read 633 times)
0 Members and 1 Guest are viewing this topic.
Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

I'm currently working with Arduino Mega with QuadRAM from ruggedcurcuits.com.
512kb of QuadRAM is too large for me but I require around 100kb of RAMS.

So,I'm planning to buy Due, but I'm not sure how to use banks.
Product page says,

"The available SRAM is 96 KB in two contiguous bank of 64 KB and 32 KB. "

but what exactly this means? can I use malloc for utilize full of 96kb? or should I use some technique to select bank?

Logged

Offline Offline
God Member
*****
Karma: 32
Posts: 507
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

You don't have to do anything - the compiler will do it all for you. The banks are contiguous in the memory map so large mallocs work, as well as declaring large arrays. You won't be able to malloc the whole 96Kb because Arduino uses some for itself. The largest I've practically needed so far was a 77Kb array char fb[240][320]; which worked with no problems at all. (You only need to worry about banks when dealing with very advanced DMA timing using multiple channels simultaneously)
« Last Edit: February 04, 2013, 08:31:23 am by stimmer » Logged


Offline Offline
Newbie
*
Karma: 0
Posts: 2
View Profile
 Bigger Bigger  Smaller Smaller  Reset Reset

stimmer,

Thank you, well It's fine for me. I'll buy Due.
Logged

Pages: [1]   Go Up
Jump to: