diff options
Diffstat (limited to 'os')
-rw-r--r-- | os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.h | 4 | ||||
-rw-r--r-- | os/hal/ports/STM32/LLD/SDMMCv1/hal_sdc_lld.h | 16 |
2 files changed, 16 insertions, 4 deletions
diff --git a/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.h b/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.h index fd94835a0..cb35827b1 100644 --- a/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.h +++ b/os/hal/ports/STM32/LLD/SDIOv1/hal_sdc_lld.h @@ -75,14 +75,14 @@ * @brief Write timeout in milliseconds.
*/
#if !defined(STM32_SDC_WRITE_TIMEOUT_MS) || defined(__DOXYGEN__)
-#define STM32_SDC_WRITE_TIMEOUT_MS 250
+#define STM32_SDC_WRITE_TIMEOUT_MS 1000
#endif
/**
* @brief Read timeout in milliseconds.
*/
#if !defined(STM32_SDC_READ_TIMEOUT_MS) || defined(__DOXYGEN__)
-#define STM32_SDC_READ_TIMEOUT_MS 25
+#define STM32_SDC_READ_TIMEOUT_MS 1000
#endif
/**
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
|