cancel
Showing results for 
Search instead for 
Did you mean: 

Dear All, I have no experience with STM32 board but I'm planning to use one to log data for my impact test setup.I need 2 simultaneous 12bit readings from the ADC channels at the highest rate possible with DMA.

MAli.11
Associate II

1st question: How many numbers will be saved in RAM?

2nd question: Is it possible to get more accurate data by decreasing the ADC sampling rate.

Thank you.

P.S: I'm sorry, if this is a very simple question but I am a structural engineer and nobody is perfect..

1 ACCEPTED SOLUTION

Accepted Solutions

You might need to use DMA to transfer data from ADC to memory and it's limit would be 65535 - but you're right, DMA can transfer only into 192kB of RAM in 'F407 and that's 4 bytes * 48k.

 [EDIT] In F407, total SRAM size is 192kB but DMA can transfer into only 128kB of it, limiting number of samples from two ADC to 32k.

There's an extra 64kB of RAM available for all non-DMA data the program may be (so called CCM RAM), so you might be able to capture all 48k.

DMA is not a necessity in case of a very simple program, which does nothing during the acquisition but transfer data from ADC to memory, but whether this is viable is up to your particular application.

For high-speed ADC, you may need to have a relatively low impedance input signal (in other words, if you signal comes from a high impedance source, you may need to have some amplifier).

JW

View solution in original post

5 REPLIES 5

> I have no experience with STM32 board but I'm planning to use one

Which one?

> How many numbers will be saved in RAM?

65535, if you use DMA.

> Is it possible to get more accurate data by decreasing the ADC sampling rate.

It is possible to postprocess the data numerically, if there's a known tendency in the data.

JW

MAli.11
Associate II

Thanks Jan. I really appreciate your help because I don't want to throw away the card if it is not suitable for my purpose.

The model I'm planning to buy is STM32F407G-DISC1. According to the research I made, I believe that I can simultaneously collect 1Msps from both analog input channels and will get a total of 48000 4-byte data. I assume that I can use only a part of sram, so the total number will probably be less than 48000.

I hope that I'm not wrong.

You might need to use DMA to transfer data from ADC to memory and it's limit would be 65535 - but you're right, DMA can transfer only into 192kB of RAM in 'F407 and that's 4 bytes * 48k.

 [EDIT] In F407, total SRAM size is 192kB but DMA can transfer into only 128kB of it, limiting number of samples from two ADC to 32k.

There's an extra 64kB of RAM available for all non-DMA data the program may be (so called CCM RAM), so you might be able to capture all 48k.

DMA is not a necessity in case of a very simple program, which does nothing during the acquisition but transfer data from ADC to memory, but whether this is viable is up to your particular application.

For high-speed ADC, you may need to have a relatively low impedance input signal (in other words, if you signal comes from a high impedance source, you may need to have some amplifier).

JW

MAli.11
Associate II

Thank you very much for the information. I was planning to use an oscilloscope having 8 bit resolution but now STM-32 seems like a much better option. I'm planning to use either INA126 or INA125p to amplify the signal. I'll share my results here as soon as I get the test setup finished.

Best Regards

M.Ali

Please note that the ADC is quite noisy and you certainly should not count on the 12 bits of it. Read AN2834 and AN4073

JW