cancel
Showing results for 
Search instead for 
Did you mean: 

Real time data logging with STM32F446RE possible?

MStix.1
Associate II

Hi guys,

I am currently trying to get a real time data logging device up and running. To measure a voltage with ADC I am using the STM32F446RE that is capable of 12bit 2.4Msps or even 7.2 Msps in 3ADC interleafed mode. For my application I want as much data as possible so ultimately the interleafed mode is my goal.

The problem I am having is how to transfer this amount of data because the F446RE has no sufficient internal memory to safe it. I tried USART already but that's to slow. Currently I am trying a SD Card with SPI interface but here I only get 36kByte/s and I am not able to make it faster.

Do you have any idea what I could do to safe the data? Would a 4bit SDIO SD-Card adapter and a faster SD-Card be good enough?

Yours Michael

7 REPLIES 7
DJC
Senior

You probably should mention a target data rate, amount you want to store and how you want to access it. Putting an SD card in the middle sounds like you are ok with not reading the data in real time, only storing it. (in which case quad-spi would work pretty well, i think)

Oh sorry.

Since I want to read 12 bit data at 5 Msps this amounts to 60 Mbit/s if I'm correct.

I dont need to read the data no. Only storing is fine since I want to process it later using matlab.

Do you think quad-spi can handle that?

And can you maybe recommend a quad spi hardware?

Cheers

Also I have a SanDisk Extreme 64GB V30 A2. And a Kingston 4GB SDHC C4 that I am trying to use.

But the SanDisk one doesnt even work with the SPI FatFS adapter i have.

(QVGA 2.2 TFT SPI)

TDK
Guru

You should be able to get something like 8 MBps stored to an SD card in 4-bit data mode, but it will likely require you to write your own drivers. The freely available ones are not built for speed.

You would need to look at the performance and determine why/where the code is not achieving the max data rate possible. It's not a trivial exercise, but it can absolutely be done.

With the amount of RAM available, it may be difficult to have a buffer big enough to compensate for unavoidable delays writing to the SD card. Faster cards help, but storing things to SD is not something that can be done in real-time. An onboard SDRAM chip can help.

If you feel a post has answered your question, please click "Accept as Solution".
Uwe Bonnes
Principal III

Consider a part with USB-HS.

Quad-SPI NOR Flash write speeds are pretty low, can't say I've benchmarked the NANDs but they are pretty raw/unpolished.

For applications requiring soldered down memory eMMC is the substitute for MicroSD cards.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

Ok so onboard SDRAM and USB-HS would be able to handle that amount of data you think?

I guess setting those up is no trivial task either right?

Is there any sdram available to increase the STM32F446RE storage to maybe be able to safe one second of data?

That should be 60MByte if I am not mistaken