Skip to main content
MÇeli.2
Associate II
October 20, 2021
Question

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

  • October 20, 2021
  • 3 replies
  • 971 views

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!

This topic has been closed for replies.

3 replies

TDK
October 20, 2021

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
MÇeli.2Author
Associate II
October 21, 2021

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

Technical Moderator
October 27, 2021

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

In order to give better visibility on the answered topics, please click on 'Best answer' on the reply which solved your issue or answered your question. Thanks