6 years, 9 months ago.

Store signal in memory for calibration

Dear friends,

I have a signal coming in from a sensor. I want to let it through the ADC and store the result somewhere in the memory to keep it as a sample for later calibrations, because the new signals will be changing with time and I wish to correlate them with the stored signal. Anyone got any ideas on how this could be implemented on the mbed LPC1768? I read somewhere that it does not have EEPROM, and I was thinking if that is a problem here or is there any other alternatives?

Any help will be valued.

Regards

2 Answers

6 years, 9 months ago.

It all depends on how much you want to store.

If you aren't using Ethernet or CAN then there is 32k of extra RAM available that you can use for storage which may give you enough space. While this is defined as two blocks of 16k they are next to each other in memory so as long as you don't try to perform a memory access that crosses the boundry you can treat them as one single block of memory.

Access it by declaring memory structures with the attribute of section AHBSRAM0/1 e.g.

static char extraMemory1[16384] __attribute__((section("AHBSRAM0")));
static char extraMemory2[16384] __attribute__((section("AHBSRAM1")));

You can then access them just like any other variable.

Accepted Answer
6 years, 9 months ago.

Hello Saulius,

I think these hints could be helpful.

Best regards,

Zoltan