2025-01-21 02:14 AM - last edited on 2025-01-21 02:25 AM by Andrew Neil
when I use the usart6's DMA, my SDIO can't write to the SD card properly
2025-01-21 02:20 AM - edited 2025-01-21 02:26 AM
Welcome to the forum.
For people to be able to help, you need to give more details - see How to write your question to maximize your chances to find a solution
Remember that we know absolutely nothing about you or your project other than what you provide in your post.
PS:
Does it work if you use USART6 without DMA ?
2025-01-21 02:55 AM
What does this mean? It trashes the file system on the card making it unreadable or just corrupts the file contents of what you are logging?
Do they share resources or channels? I don't recollect there being a problem on this platform.
Debug the issue.
2025-01-21 05:42 PM
if I don't use USART6'DMA ,I can write to SD card normally. But,if I use the USART's DMA ,When I write to SD,it will loss many data
2025-01-21 05:42 PM
just loss data in sd card
2025-01-22 12:48 AM
@xt wrote:if I don't use USART6'DMA ,I can write to SD card normally.
Just to be clear: It does work when you use USART6 - just so long as you don't use DMA with it?
Are you using DMA with the SDIO ?
2025-01-22 12:56 AM
yes,when I don't use the USART6'S DMA,it can work normally,and not loss data.
I also use the DMA with the SDIO
2025-01-22 01:01 AM
So can you try the SDIO without DMA ?
Check carefully that your UART6 DMA setup doesn't conflict with your SDIO DMA setup.
Instrument your code so that you can see what's going on in both the working and non-working cases.
@xt wrote:just loss data in sd card
So look into where & when this "loss" occurs
Have you used a logic analyser on the SDIO to see what's actually happening in the hardware?
2025-01-22 01:05 AM
Take a look at this thread for some potential DMA pitfalls...
2025-01-22 02:07 AM
Thank you ,my problem is solved,I use the FIFO mode with the USART6'DMA ,the SD data was not loss.
but,I don't understand why?