DMA to SDIO NDTR Problem
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2013-01-23 09:22 AM
Posted on January 23, 2013 at 18:22I have much the same problem as wilczewski.jeffrey. I see it on my F4 Discovery board. If his problem is the same then it�s the DMA2_S3CR_bit.EN = 1; line that makes the problem. I have single stepped through my SD card assembly code and watched NDTR go from 0x0080 to 0xFFFF when setting EN=1.With NDTR set incorrectly the DMA completion interrupt never happens. Always I see 0xFF7F words remaining until DMA completion. At least the data transfer part of DMA works.I�ve tried several ways to set EN=1. All useful ways cause the NDTR change including following the sample F4 Discovery code which uses bit band addressing to set EN=1. (Using the debugger and playing around with the enable flag I was able to set things such that EN=1 and NDTR=0x0080.)I tried the idea from van_hooft.frank.001. Changing the flow controller did not work. FWIW, sample F4 Discovery code sets the peripheral as flow controller. #dma-sdio-ndtr-problem
Labels:
- Labels:
-
SDIO-SDMMC
1 REPLY 1
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Email to a Friend
- Report Inappropriate Content
2014-11-21 10:06 PM
Posted on November 22, 2014 at 07:06
I hope you figured this out, but I believe this is normal behaviour.
From what I can gather from section ''10.3.15 Flow Controller'' of the reference manual, the DMA's NDTR register does not determine when the transfer is complete.Since the SDIO is the flow controller, the SDIO module signals to the DMA when the transfer is complete, so the NDTR doesn't really matter.