This thread has been locked.

If you have a related question, please click the "Ask a related question" button in the top right corner. The newly created question will be automatically linked to this question.

Data storage with fast access

Other Parts Discussed in Thread: MSP430F5529, ADS1292R, MSP430F5528

Hello,

I am using MSP430F5529 to stream out data sequence (DMA and SPI combination), triggered by external signal. For now I have data buffer (1kB of size) and code works fine.

What I wold like to do is stream out 32kB. How to do that? How to store 32kB of data and still have fast access to it?

(controller works with highest frequency - 24MHz, and SPI also)

Thanks

  • Dragana Maksimovic said:
    How to store 32kB of data and still have fast access to it?

    You could consider EEPROM or serial SRAM. Also it would be great if you define "fast access", in bytes/sec.

  • Dragana Maksimovic said:

    I am using MSP430F5529 to stream out data sequence (DMA and SPI combination), triggered by external signal. For now I have data buffer (1kB of size) and code works fine.

    What I wold like to do is stream out 32kB. How to do that? How to store 32kB of data and still have fast access to it?

    (controller works with highest frequency - 24MHz, and SPI also)

    32 KB of data can be stored in MSP430F5529 flash (90 KByte/s). MSP430F5xx have USB transfer up to 1 MByte/s. Highest frequency of MSP430F5529 is 25 MHz, not 24 MHz (and it can be overclocked, also). Detailed description of data source / processing / destination will give us better picture.

  • You may want to look at the ADS1x9xECG-FE Demonstration Kit (doc. SLAU384A). It uses an ADS1292R for data taking, and interfaces to the MSP430F5529, and also on the board is an external high capacity Flash, Micron MT298G08AAWP. If you do not need that high of capacity, there are I2C and SPI interfaces available on external Flash chips.

     

  • Thanks everyone for fast responses.

    Closer description would be:

    - timer captures high-to-low transition of an external signal,

    - capture event triggers DMA transfer from predefined data buffer location to SPI TX buffer.

    In current code data buffer is small (1kB) so everything works fine. In final version I'm supposed to clockout 32kB of data per every trigger. Clockout speed should be over 20MHz (the higher - the better), but stable, therefore 24MHz crystal oscillator is used. What did you mean by overclocking? Is it possible to get MSP working on frequencies higher than 25MHz?

    Final design is supposed to be very small. That's why I'm trying to avoid any external circuitry (if possible). This controller package is on the high dimension edge, but need to use it due to number of peripherals needed for rest of design.

  • Dragana Maksimovic said:
    32kB of data per every trigger. Clockout speed should be over 20MHz (the higher - the better)

    You shall drop idea trying to do this on msp430. Check Tiva C.

  • Dragana Maksimovic said:

    In current code data buffer is small (1kB) so everything works fine. In final version I'm supposed to clockout 32kB of data per every trigger. Clockout speed should be over 20MHz (the higher - the better), but stable, therefore 24MHz crystal oscillator is used.

    What is the frequency / rate for storing data? Maybe internal flash can be used for this. There are also MSP430F5xx devices with 32 / 64 KB of RAM (if RAM must be used).

    Dragana Maksimovic said:

    What did you mean by overclocking? Is it possible to get MSP working on frequencies higher than 25MHz?

    Depending on used hardware modules, it can go over 25 MHz.

    http://forum.43oh.com/topic/3906-msp430f5xx-overclocking

    Dragana Maksimovic said:

    Final design is supposed to be very small. That's why I'm trying to avoid any external circuitry (if possible). This controller package is on the high dimension edge, but need to use it due to number of peripherals needed for rest of design.

    MSP430F5528 is same as MSP430F5529, but it smaller package.
  • Data is predefined, fixed value, so data storing frequency rate is irrelevant.

    I also considered using internal flash, but information memory segments are too small. Each code memory bank is exactly 32kB in size, so I could use one of those if it is possible. Can some area of code memory be dedicated for data storage? The code itself isn't too large, so there would be quite enough space, but can it be done?

  • You can attach a serial SRAM or NVSRAM chip with SPI. Microchip has some with up to 1MBit(128kB). Writing is instantaneous, so with 24MHz SPI clock and DMA, you can write with 3MB/s (11ms/32k). Reading is a little bit slower. However, when you write 32k blocks, 128k won’t last long.
    Nevertheless, to have need of storing 32k at once means you have 32k locally stored. Which is only possible with a few MSPs, as almost all have only up to 16/18k ram or less. (only three or four 6x family devices have 64k)

    However, your application description is still a bit fuzzy. Where does the data come from when writing time is unimportant? Why do you need to store it on the MSP? Usually, data is collected by the MSP and needs to be stored/forwarded. In your case, it ratehr seems that you receive the data from outside like an upload, then teh MSP shall do something with it. Well, in this case, yes, no problem to store the data in flash. Depending on transfer methode, you may even receive the data in chunks, write them to flash, receive the next chunk, write it etc. Then you don't need 32k of ram for temporary storage.
    If the receiving code runs in ram and without interrupts, you may even write incoming data to flash as you receive it, as a permanent stream. As long as you don't receive it faster than you can write.
    5x family offers a lot of MSPs with up to 512k flash.

  • Hello Jens-Michael!

    I will try to give a bit closer explanation. I programmed a custom windows application for bitmap drawing. Bitmap is 32kB in size and should be downloaded to device and stored somewhere (don't now where to store it). Once loaded, bitmap represents fixed data for device which is supposed to display it on monitor.

    Device has 2 operating modes: one is for USB communication and bitmap download, and the other is for bitmap display on monitor.

    Write now I work with 1kB buffer predefined in code, so stored in RAM while code execution, and cycle it for 32 times to generate "image". The displaying sequence (hsync, DMA, SPI) works fine, the only problem is location for storing bitmap data, so that it can be accessed by DMA and transferred to SPITXBUF. Do you have any idea on how to achieve that with no external components, just MSP?

    Thanks :-)

  • Dragana Maksimovic said:
    Bitmap is 32kB in size and should be downloaded to device and stored somewhere

    You can store it in the code flash. Note that flash have limited endurance, it is not made for frequent updates - refer to slaa334 application note

  • You can do this with any MSP with more than 32k of flash.

    Currently, you do with a 1k buffer. What you need to change is, when this 1k has been received, you write it to a fixed location in internal flash. Once all 32k have been received, the complete image is in flash and can be read from there using a pointer.
    For writing, you can do it with a function running in ram (which is faster) or flash (which is safer and easier).

    Indeed, flash has limited endurance, but it is specified for at least 10.000 write cycles (or was it 100k? see datasheet)

    On the project side, you need to reserve a 32k memory block in flash memory. You can of course simply declare a const array of int with a size of 16384 elements, but it needs to be aligned to a 512 bytes border (or, easier, 1k border). So it is better to generate a separate linker segment in the linker control script. Then you can define the exact location of this 32k block.

    Information about how to write to flash or how to generate a linker segment and place your array there can be found in various forum threads.

**Attention** This is a public forum