cancel
Showing results for 
Search instead for 
Did you mean: 

Can I work this process minimum 750 Hz in Nucleo L432?

MÇeli.2
Associate II

Hello. For a project, I need to read 4 channels analog data and save them in to the sd card for 10 seconds. I should record every data minimum with 750 Hz. And then I generate pwm signal with these data.

I tried that but it was not successful, recording was slow and I was losing some data. So that I decided to use two microcontroller, one of them for data logging and the other one for pwm generating associated with analog input. I agree that this solution is very silly.

I do not know if it is a silly question but I want to ask. Can I do this process (data log with minimum 750 Hz 4 channels and pwm generating associated with recorded analog data) with Nucleo L432 board? Thanks in advance!

3 REPLIES 3
TDK
Guru

You should absolutely be able to log data at 750 Hz and store that to a disk. SD card writes are not instantaneous or consistent, so you will need to buffer data and send it out when you have enough stored. For example, save data to a 16kB circular buffer and save the first 8kB to disk when it's populated while the second half is being updated, then save the second half, etc.

If you feel a post has answered your question, please click "Accept as Solution".
MÇeli.2
Associate II

Thank you for answer. Yes, when I tried I used DMA and buffer. When half of the buffer was fulled, data sent to the sd card module with SPI protocol. But, when the half of the buffer data was sending to the sd card I lost the data. My code is below. Thanks in advance!

0693W00000FDJApQAP.jpg0693W00000FDJB9QAP.jpg0693W00000FDJBOQA5.jpg0693W00000FDJBdQAP.jpg

Imen.D
ST Employee

Hello @Mehmet Çelik​ ,

Were you able to resolve the issue you described here?

Maybe you problem is related to the known issue in CubeMX v 6.3.0 with DMA initialization (For more detail, please have a look at this post)

It will be interesting to share with us your update please.

Thanks

Imen

When your question is answered, please close this topic by clicking "Accept as Solution".
Thanks
Imen