STM32 SDIO DMA: Ignore DMA FIFO errors; these seem to be bogus. SD multiple block transfers result in CRC errors; avoid them by using smaller FTP buffer sizes

git-svn-id: https://nuttx.svn.sourceforge.net/svnroot/nuttx/trunk@4410 7fd9a85b-ad96-42d3-883c-3090e2eb8679
This commit is contained in:
patacongo
2012-02-21 22:00:28 +00:00
parent a663979a1e
commit 20b15f2d8c
10 changed files with 72 additions and 40 deletions
+2 -2
View File
@@ -953,9 +953,9 @@ defconfig -- This is a configuration file similar to the Linux
CONFIG_FTPD_SERVERID - The server name to use in FTP communications.
Default: "NuttX FTP Server"
CONFIG_FTPD_CMDBUFFERSIZE - The maximum size of one command. Default:
512 bytes.
128 bytes.
CONFIG_FTPD_DATABUFFERSIZE - The size of the I/O buffer for data
transfers. Default: 2048 bytes.
transfers. Default: 512 bytes.
CONFIG_FTPD_WORKERSTACKSIZE - The stacksize to allocate for each
FTP daemon worker thread. Default: 2048 bytes.
+22
View File
@@ -737,6 +737,28 @@ Where <subdir> is one of the following:
Then DMA works fine. The downside is, of course, is that we lose 64Kb
of precious SRAM.
5. Another SDIO/DMA issue. This one is probably a software bug. This is
the bug as stated in the TODO list:
"If you use a large I/O buffer to access the file system, then the
MMCSD driver will perform multiple block SD transfers. With DMA
ON, this seems to result in CRC errors detected by the hardware
during the transfer. Workaround: Use I/O buffers less the 1024
bytes."
For this reason, CONFIG_FTPD_DATABUFFERSIZE=512 appears in the defconfig
file.
6. Another DMA-related concern. I see this statement in the reference
manual: "The burst configuration has to be selected in order to respect
the AHB protocol, where bursts must not cross the 1 KB address boundary
because the minimum address space that can be allocated to a single slave
is 1 KB. This means that the 1 KB address boundary should not be crossed
by a burst block transfer, otherwise an AHB error would be generated,
that is not reported by the DMA registers."
There is nothing in the DMA driver to prevent this now.
ostest:
------
This configuration directory, performs a simple OS test using
+3 -2
View File
@@ -864,9 +864,9 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_FTPD_SERVERID - The server name to use in FTP communications.
# Default: "NuttX FTP Server"
# CONFIG_FTPD_CMDBUFFERSIZE - The maximum size of one command. Default:
# 512 bytes.
# 128 bytes.
# CONFIG_FTPD_DATABUFFERSIZE - The size of the I/O buffer for data
# transfers. Default: 2048 bytes.
# transfers. Default: 512 bytes.
# CONFIG_FTPD_WORKERSTACKSIZE - The stacksize to allocate for each
# FTP daemon worker thread. Default: 2048 bytes.
#
@@ -876,6 +876,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_DISABLE_PTHREAD - pthread support is required
# CONFIG_DISABLE_POLL - poll() support is required
#
CONFIG_FTPD_CMDBUFFERSIZE=512
#
# RTC Configuration
+3 -2
View File
@@ -865,9 +865,9 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_FTPD_SERVERID - The server name to use in FTP communications.
# Default: "NuttX FTP Server"
# CONFIG_FTPD_CMDBUFFERSIZE - The maximum size of one command. Default:
# 512 bytes.
# 128 bytes.
# CONFIG_FTPD_DATABUFFERSIZE - The size of the I/O buffer for data
# transfers. Default: 2048 bytes.
# transfers. Default: 512 bytes.
# CONFIG_FTPD_WORKERSTACKSIZE - The stacksize to allocate for each
# FTP daemon worker thread. Default: 2048 bytes.
#
@@ -877,6 +877,7 @@ CONFIG_NET_RESOLV_ENTRIES=4
# CONFIG_DISABLE_PTHREAD - pthread support is required
# CONFIG_DISABLE_POLL - poll() support is required
#
CONFIG_FTPD_CMDBUFFERSIZE=512
#
# RTC Configuration