cancel
Showing results for 
Search instead for 
Did you mean: 

stm32f407 SDIO and USART together

xt
Associate II

when I use the usart6's DMA, my SDIO can't write to the SD card properly

12 REPLIES 12

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 ?

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.

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..

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

just loss data in sd card


@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 ?

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

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?

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?