Hello Everyone, I need to write sd card approximately 300 bytes per millisecond and in parallel get these data from another devise via spi, are there some suggestions how to do?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-10 11:49 AM
Hello Everyone, I need to write sd card approximately, 300 bytes per millisecond and in parallel get these data from another devise via spi, are there some suggestions how to do?
I have tried to use SDMMC1 + Freertos, but I cant communicate with sd card when RTOS enabled. Thanks.
- Labels:
-
SDIO-SDMMC
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-10 12:38 PM
300 bytes is not a good fit with file systems. Small unaligned writes are a performance nightmare.
The SDIO/SDMMC has hard dead-lines on the transfers. DMA should be workable. Watch for cache coherency. On F7 use DTCM RAM.
Suggest you use a large buffer you flush periodically in you main() loop as it fills have as some multiple of sector or cluster size, perhaps 32KB to reach about optimal performance.
Collect data and fill buffers in IRQ Handlers / Callbacks.
Up vote any posts that you find helpful, it shows what's working..
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-10 1:10 PM
It must be low power, so I have selected STML452. Sure I will collect data and send near to 32 kb as you mentioned. The problem is I cant use SDMMC without cpu blocking and it isn't working with freertos. I am writing a working program with SDMMC and communicating with SD from main (outside of wile) perfectly. When I just turning on Freertos it blocks this communication. I would like to communicate with sd from one task and get data from another. So if SDMMC + Freertos not working are there another combination to solve this problem? Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
‎2023-05-14 12:32 PM
Solved ! One solution is: REENTRANT in RTOS must be enabled and FS_REENTRANT in Fatfs must be deceabled.
