From c56a18fb38e4d9d11b6799eef395a6dc667750e7 Mon Sep 17 00:00:00 2001 From: patacongo Date: Tue, 21 Feb 2012 19:16:41 +0000 Subject: Fix SDIO DMA (finally) git-svn-id: svn://svn.code.sf.net/p/nuttx/code/trunk@4409 42af7a65-404d-4744-a932-0658087f49c3 --- nuttx/configs/stm3240g-eval/README.txt | 14 ++++++++++++++ nuttx/configs/stm3240g-eval/nsh2/defconfig | 10 +++++----- 2 files changed, 19 insertions(+), 5 deletions(-) (limited to 'nuttx/configs/stm3240g-eval') diff --git a/nuttx/configs/stm3240g-eval/README.txt b/nuttx/configs/stm3240g-eval/README.txt index ef26c0088..e4902947e 100755 --- a/nuttx/configs/stm3240g-eval/README.txt +++ b/nuttx/configs/stm3240g-eval/README.txt @@ -720,9 +720,23 @@ Where is one of the following: configuration. 2. RS-232 is disabled, but Telnet is still available for use as a console. + Since RS-232 and SDIO use the same pins (one controlled by JP22), RS232 + and SDIO cannot be used concurrently. 3. This configuration requires that jumper JP22 be set to enable SDIO operation. + 4. In order to use SDIO without overruns, DMA must be used. The STM32 F4 + has 192Kb of SRAM in two banks: 112Kb of "system" SRAM located at + 0x2000:0000 and 64Kb of "TCM" SRAM located at 0x1000:0000. It appears + that you cannot perform DMA from TCM SRAM. The work around that I have now + is simply to omit the 64Kb of TCM SRAM from the heap so that all memory is + allocated from System SRAM. This is done by setting: + + CONFIG_MM_REGIONS=1 + + Then DMA works fine. The downside is, of course, is that we lose 64Kb + of precious SRAM. + ostest: ------ This configuration directory, performs a simple OS test using diff --git a/nuttx/configs/stm3240g-eval/nsh2/defconfig b/nuttx/configs/stm3240g-eval/nsh2/defconfig index 61fcddf21..25ab466b8 100644 --- a/nuttx/configs/stm3240g-eval/nsh2/defconfig +++ b/nuttx/configs/stm3240g-eval/nsh2/defconfig @@ -90,7 +90,7 @@ CONFIG_ARCH_BOOTLOADER=n CONFIG_ARCH_LEDS=y CONFIG_ARCH_BUTTONS=n CONFIG_ARCH_CALIBRATION=n -CONFIG_ARCH_DMA=n +CONFIG_ARCH_DMA=y # # Identify toolchain and linker options @@ -127,7 +127,7 @@ CONFIG_STM32_CRC=n CONFIG_STM32_BKPSRAM=n CONFIG_STM32_CCMDATARAM=n CONFIG_STM32_DMA1=n -CONFIG_STM32_DMA2=n +CONFIG_STM32_DMA2=y CONFIG_STM32_ETHMAC=y CONFIG_STM32_OTGHS=n # AHB2: @@ -500,7 +500,7 @@ CONFIG_DEBUG_CAN=n CONFIG_DEBUG_I2C=n CONFIG_DEBUG_DMA=n CONFIG_HAVE_CXX=y -CONFIG_MM_REGIONS=2 +CONFIG_MM_REGIONS=1 CONFIG_ARCH_LOWPUTC=y CONFIG_RR_INTERVAL=200 CONFIG_SCHED_INSTRUMENTATION=n @@ -598,7 +598,7 @@ CONFIG_DISABLE_SIGNALS=n CONFIG_DISABLE_MQUEUE=n CONFIG_DISABLE_MOUNTPOINT=n CONFIG_DISABLE_ENVIRON=n -CONFIG_DISABLE_POLL=y +CONFIG_DISABLE_POLL=n # # Misc libc settings @@ -782,7 +782,7 @@ CONFIG_FS_WRITEBUFFER=n # CONFIG_MMCSD_HAVECARDDETECT # SDIO driver card detection is 100% accurate # -CONFIG_SDIO_DMA=n +CONFIG_SDIO_DMA=y #CONFIG_SDIO_PRI=128 #CONFIG_SDIO_DMAPRIO #CONFIG_SDIO_WIDTH_D1_ONLY -- cgit v1.2.3