11 years, 2 months ago.

Data storage limit in LPC1768

Hi,

I am reading data at the rate of 1000 values in 1 second. Writing into a file takes time. Hence storing into a temporary variable and then once data collection is done I am writing to a file!

When I try to increase memory allocation for the variable I get the following errors: 1. "No space in execution regions with .ANY selector matching main.cpp.LPC1768" 2. "sections of aggregate size 0x50100 bytes could not fit into .ANY selector(s)."

Can anyone let me know why the error is occurring and how he/she rectified it.

Regards, Manants

0x50100 (hex) = 328kB (decimal)
No way! :)

posted by Yoshi Mimura 29 Jan 2013

Didn't notice that was hex should pay more attention, goes from slightly too much, to considerably =), my answer still stands though max of less then 32kB.

posted by Chris Pepper 29 Jan 2013

One of the solutions is place a ring buffer, write data to the buffer in the ADC routine, then read data from the buffer for writing to a file in main routine.
Following is my example about CAN data logging.
http://mbed.org/users/ym1784/code/CAN_LOG_SD/

posted by Yoshi Mimura 31 Jan 2013

1 Answer

11 years, 2 months ago.

Hey Manas, although the mbed does have 64kB's of RAM, it is seperated into 3 sections one 32kB block and 2 16kB blocks, The 32kB section is the main one used, the other 2 tend to be used by the peripheral controllers.

you are requesting a block of 50kB which isn't available, I'm not sure what the maximum continuous block size available is but its less then 32kB.

If you are not using the other memory blocks you can spread your data between them,

Chris