This discussion has been locked.
You can no longer post new replies to this discussion. If you have a question you can start a new discussion

CORTEX M4 - Output an array declared with __DATA(RAM) attribute?

Hi to you all,
I'm using an LPC4370 (in a link2 probe) to output the data acquired @ 40 MSPS using the USB CDC VCOM driver included in the LPCOPEN Libraries.
I can output an array of uint32_t elements and read it properly in Matlab at the host side.
Unfortunately though I'm having troubles with arrays declared as follows: I read some strange numbers, not the ones I stored into the array.

__DATA(RAM3) static uint32_t multiChannel[BINS];

Since the application I'm working on has some real time requirements I need to keep the array allocated into RAM and not in flash.
To output the array right now I'm passing it to the write method of the driver using a cast to uint8_t and specifying the array length, like:

write(uint8_t*)multiChannel, sizeof(multiChannel));


Any help in solving this would be highly appreciated... Of course I'm missing something about the attribute __DATA().

Thanks in advance,
Andrea