aboutsummaryrefslogtreecommitdiffstats
path: root/os/hal/ports/STM32/LLD/SDMMCv1
diff options
context:
space:
mode:
authorGiovanni Di Sirio <gdisirio@gmail.com>2016-06-21 08:44:15 +0000
committerGiovanni Di Sirio <gdisirio@gmail.com>2016-06-21 08:44:15 +0000
commitc6cad23bd99a78148063b88a3f9957cb9a5cb7de (patch)
tree0457382232c6eb5d94850bc444b8447c9fa6df7d /os/hal/ports/STM32/LLD/SDMMCv1
parentce6a5d95a0c91f0b575e74b946918d1aef0ef0e9 (diff)
downloadChibiOS-c6cad23bd99a78148063b88a3f9957cb9a5cb7de.tar.gz
ChibiOS-c6cad23bd99a78148063b88a3f9957cb9a5cb7de.tar.bz2
ChibiOS-c6cad23bd99a78148063b88a3f9957cb9a5cb7de.zip
git-svn-id: svn://svn.code.sf.net/p/chibios/svn/trunk@9646 35acf78f-673a-0410-8e92-d51de3d6d3f4
Diffstat (limited to 'os/hal/ports/STM32/LLD/SDMMCv1')
-rw-r--r--os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.h16
1 files changed, 14 insertions, 2 deletions
diff --git a/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.h b/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.h
index 9c517ee36..1b09d6862 100644
--- a/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.h
+++ b/os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.h
@@ -60,14 +60,14 @@
* @brief Write timeout in milliseconds.
*/
#if !defined(STM32_SDC_SDMMC_WRITE_TIMEOUT) || defined(__DOXYGEN__)
-#define STM32_SDC_SDMMC_WRITE_TIMEOUT 250
+#define STM32_SDC_SDMMC_WRITE_TIMEOUT 1000
#endif
/**
* @brief Read timeout in milliseconds.
*/
#if !defined(STM32_SDC_SDMMC_READ_TIMEOUT) || defined(__DOXYGEN__)
-#define STM32_SDC_SDMMC_READ_TIMEOUT 25
+#define STM32_SDC_SDMMC_READ_TIMEOUT 1000
#endif
/**
@@ -104,6 +104,18 @@
#error "SDC driver activated but no SDMMC peripheral assigned"
#endif
+#if !defined(STM32_SDMMCCLK)
+#error "STM32_SDMMCCLK not defined"
+#endif
+
+#if !defined(STM32_HCLK)
+#error "STM32_HCLK not defined"
+#endif
+
+#if STM32_SDC_USE_SDMMC1 * 10 > STM32_HCLK * 7
+#error "STM32_SDC_USE_SDMMC1 must not exceed STM32_HCLK * 0.7"
+#endif
+
#if !OSAL_IRQ_IS_VALID_PRIORITY(STM32_SDC_SDMMC1_IRQ_PRIORITY)
#error "Invalid IRQ priority assigned to SDIO"
#endif