From 10ad7f4525e301904d461aa60cbfd8ecffa78622 Mon Sep 17 00:00:00 2001 From: Giovanni Di Sirio Date: Fri, 19 Jan 2018 13:13:11 +0000 Subject: More #912. git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@11348 35acf78f-673a-0410-8e92-d51de3d6d3f4 --- demos/STM32/RT-STM32F767ZI-NUCLEO144/halconf.h | 2 +- demos/STM32/RT-STM32F767ZI-NUCLEO144/mcuconf.h | 4 ++-- os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.c | 9 +++++---- 3 files changed, 8 insertions(+), 7 deletions(-) diff --git a/demos/STM32/RT-STM32F767ZI-NUCLEO144/halconf.h b/demos/STM32/RT-STM32F767ZI-NUCLEO144/halconf.h index d7793e22c..2b9fef087 100644 --- a/demos/STM32/RT-STM32F767ZI-NUCLEO144/halconf.h +++ b/demos/STM32/RT-STM32F767ZI-NUCLEO144/halconf.h @@ -139,7 +139,7 @@ * @brief Enables the SDC subsystem. */ #if !defined(HAL_USE_SDC) || defined(__DOXYGEN__) -#define HAL_USE_SDC FALSE +#define HAL_USE_SDC TRUE #endif /** diff --git a/demos/STM32/RT-STM32F767ZI-NUCLEO144/mcuconf.h b/demos/STM32/RT-STM32F767ZI-NUCLEO144/mcuconf.h index 7d9c3f1a7..536403a38 100644 --- a/demos/STM32/RT-STM32F767ZI-NUCLEO144/mcuconf.h +++ b/demos/STM32/RT-STM32F767ZI-NUCLEO144/mcuconf.h @@ -258,8 +258,8 @@ /* * SDC driver system settings. */ -#define STM32_SDC_USE_SDMMC1 FALSE -#define STM32_SDC_USE_SDMMC2 FALSE +#define STM32_SDC_USE_SDMMC1 TRUE +#define STM32_SDC_USE_SDMMC2 TRUE #define STM32_SDC_SDMMC_UNALIGNED_SUPPORT TRUE #define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000 #define STM32_SDC_SDMMC_READ_TIMEOUT 1000 diff --git a/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.c b/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.c index b88e9b041..4fb98a67a 100644 --- a/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.c +++ b/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.c @@ -427,8 +427,7 @@ void sdc_lld_start(SDCDriver *sdcp) { sdcp->config = &sdc_default_cfg; } - sdcp->dmamode = STM32_DMA_CR_PL(STM32_SDC_SDMMC1_DMA_PRIORITY) | - STM32_DMA_CR_PSIZE_WORD | + sdcp->dmamode = STM32_DMA_CR_PSIZE_WORD | STM32_DMA_CR_MSIZE_WORD | STM32_DMA_CR_MINC; @@ -447,7 +446,8 @@ void sdc_lld_start(SDCDriver *sdcp) { osalDbgAssert(!b, "stream already allocated"); - sdcp->dmamode |= STM32_DMA_CR_CHSEL(SDMMC1_DMA_CHANNEL); + sdcp->dmamode |= STM32_DMA_CR_CHSEL(SDMMC1_DMA_CHANNEL) | + STM32_DMA_CR_PL(STM32_SDC_SDMMC1_DMA_PRIORITY); dmaStreamSetPeripheral(sdcp->dma, &sdcp->sdmmc->FIFO); #if STM32_DMA_ADVANCED dmaStreamSetFIFO(sdcp->dma, STM32_DMA_FCR_DMDIS | @@ -464,7 +464,8 @@ void sdc_lld_start(SDCDriver *sdcp) { osalDbgAssert(!b, "stream already allocated"); - sdcp->dmamode |= STM32_DMA_CR_CHSEL(SDMMC2_DMA_CHANNEL); + sdcp->dmamode |= STM32_DMA_CR_CHSEL(SDMMC2_DMA_CHANNEL) | + STM32_DMA_CR_PL(STM32_SDC_SDMMC2_DMA_PRIORITY); dmaStreamSetPeripheral(sdcp->dma, &sdcp->sdmmc->FIFO); #if STM32_DMA_ADVANCED dmaStreamSetFIFO(sdcp->dma, STM32_DMA_FCR_DMDIS | -- cgit v1.2.3