Best practice using DMA to read from UART and write to SD?
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2018-06-17 3:09 AM
I'm reading data from a UART with DMA and want to write that data to an SD card (on a F722). Since the data is much longer than my buffer, I chose circular buffer for the DMA.
The problem now is that I need to save the receive buffer to SD occasionally, but how do I know when I need to do this?
Can someone recommend the best approach here, using Cube HAL:
- Should I chop my Receive_DMA() into smaller chunks of buffer size, and receive them individually? (I may loose data.)
- Should I count the number of received bytes (how?) and save the buffer if some threshold is reached?
- Can I enable direct UART-to-SDMMC DMA? (I don't even know what that means: Does the data go into an open file, and how can I remove the length header of the data first?)
I'd really appreciate some ideas. The Cube examples are way too simple.
#dmaSolved! Go to Solution.
- Labels:
-
DMA
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2020-01-05 5:22 PM
I'll have to go dig, probably talking 6-7 years ago, and 2-3 forum transitions. Looking at the Google Drive it was likely a forum attachment, a lot of that stuff got destroyed by ST in the process(es).
Up vote any posts that you find helpful, it shows what's working..

- « Previous
-
- 1
- 2
- Next »