diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2019-11-04 10:49:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-11-04 10:49:50 +0100 |
commit | d1aad8853600f3ce2cfbffeaea8e50150e2b6dd8 (patch) | |
tree | 703501bbb1acd3937a1dbba4c68cf98c5d8ac5d2 /demos/STM32 | |
parent | 462e4e00f64027b7f38b33ad2b0737c453cf0fc1 (diff) | |
parent | c65efdcfa1d281a8f0a29bb864e86dd0c892c156 (diff) | |
download | ChibiOS-Contrib-d1aad8853600f3ce2cfbffeaea8e50150e2b6dd8.tar.gz ChibiOS-Contrib-d1aad8853600f3ce2cfbffeaea8e50150e2b6dd8.tar.bz2 ChibiOS-Contrib-d1aad8853600f3ce2cfbffeaea8e50150e2b6dd8.zip |
Merge pull request #205 from ChibiOS/fsmc
FSMC drivers update
Diffstat (limited to 'demos/STM32')
7 files changed, 62 insertions, 19 deletions
diff --git a/demos/STM32/RT-STM32F303-DISCOVERY-PID/halconf_community.h b/demos/STM32/RT-STM32F303-DISCOVERY-PID/halconf_community.h index 631bb9f..246e3cb 100644 --- a/demos/STM32/RT-STM32F303-DISCOVERY-PID/halconf_community.h +++ b/demos/STM32/RT-STM32F303-DISCOVERY-PID/halconf_community.h @@ -32,6 +32,20 @@ #endif
/**
+ * @brief Enables the SDRAM subsystem.
+ */
+#if !defined(HAL_USE_SDRAM) || defined(__DOXYGEN__)
+#define HAL_USE_SDRAM FALSE
+#endif
+
+/**
+ * @brief Enables the SRAM subsystem.
+ */
+#if !defined(HAL_USE_SRAM) || defined(__DOXYGEN__)
+#define HAL_USE_SRAM FALSE
+#endif
+
+/**
* @brief Enables the NAND subsystem.
*/
#if !defined(HAL_USE_NAND) || defined(__DOXYGEN__)
diff --git a/demos/STM32/RT-STM32F303-DISCOVERY-PID/mcuconf_community.h b/demos/STM32/RT-STM32F303-DISCOVERY-PID/mcuconf_community.h index cf6a1ce..785529b 100644 --- a/demos/STM32/RT-STM32F303-DISCOVERY-PID/mcuconf_community.h +++ b/demos/STM32/RT-STM32F303-DISCOVERY-PID/mcuconf_community.h @@ -23,8 +23,8 @@ /* * FSMC NAND driver system settings. */ -#define STM32_NAND_USE_FSMC_NAND1 FALSE -#define STM32_NAND_USE_FSMC_NAND2 FALSE +#define STM32_NAND_USE_NAND1 FALSE +#define STM32_NAND_USE_NAND2 FALSE #define STM32_NAND_USE_EXT_INT FALSE #define STM32_NAND_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) #define STM32_NAND_DMA_PRIORITY 0 diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject index a2a9791..ea4ffa9 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject +++ b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/.cproject @@ -23,8 +23,8 @@ /* * FSMC NAND driver system settings. */ -#define STM32_NAND_USE_FSMC_NAND1 FALSE -#define STM32_NAND_USE_FSMC_NAND2 FALSE +#define STM32_NAND_USE_NAND1 FALSE +#define STM32_NAND_USE_NAND2 FALSE #define STM32_NAND_USE_EXT_INT FALSE #define STM32_NAND_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) #define STM32_NAND_DMA_PRIORITY 0 diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/halconf_community.h b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/halconf_community.h index c28b90b..8082fce 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/halconf_community.h +++ b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/halconf_community.h @@ -32,6 +32,20 @@ #endif /** + * @brief Enables the SDRAM subsystem. + */ +#if !defined(HAL_USE_SDRAM) || defined(__DOXYGEN__) +#define HAL_USE_SDRAM TRUE +#endif + +/** + * @brief Enables the SRAM subsystem. + */ +#if !defined(HAL_USE_SRAM) || defined(__DOXYGEN__) +#define HAL_USE_SRAM FALSE +#endif + +/** * @brief Enables the NAND subsystem. */ #if !defined(HAL_USE_NAND) || defined(__DOXYGEN__) diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/main.c b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/main.c index 25f42ab..ce99e3b 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/main.c +++ b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/main.c @@ -23,7 +23,6 @@ #include "usbcfg.h"
#endif
-#include "hal_fsmc_sdram.h"
#include "ili9341.h"
#include "hal_stm32_ltdc.h"
#include "hal_stm32_dma2d.h"
@@ -556,8 +555,8 @@ int main(void) { /*
* Initialise FSMC for SDRAM.
*/
- fsmcSdramInit();
- fsmcSdramStart(&SDRAMD, &sdram_cfg);
+ sdramInit();
+ sdramStart(&SDRAMD1, &sdram_cfg);
sdram_bulk_erase();
/*
diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/mcuconf_community.h b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/mcuconf_community.h index 36763de..2528ef4 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/mcuconf_community.h +++ b/demos/STM32/RT-STM32F429-DISCOVERY-DMA2D/mcuconf_community.h @@ -19,29 +19,31 @@ */ #define STM32_FSMC_USE_FSMC1 TRUE #define STM32_FSMC_FSMC1_IRQ_PRIORITY 10 +#define STM32_FSMC_DMA_CHN 0x03010201 /* * FSMC NAND driver system settings. */ -#define STM32_NAND_USE_FSMC_NAND1 FALSE -#define STM32_NAND_USE_FSMC_NAND2 FALSE +#define STM32_NAND_USE_NAND1 FALSE +#define STM32_NAND_USE_NAND2 FALSE #define STM32_NAND_USE_EXT_INT FALSE +#define STM32_NAND_DMA_STREAM STM32_DMA_STREAM_ID(2, 7) +#define STM32_NAND_DMA_PRIORITY 0 +#define STM32_NAND_DMA_ERROR_HOOK(nandp) osalSysHalt("DMA failure") /* - * FSMC SDRAM driver system settings. + * FSMC SRAM driver system settings. */ -#define STM32_USE_FSMC_SDRAM TRUE -#define STM32_SDRAM_USE_FSMC_SDRAM1 FALSE -#define STM32_SDRAM_USE_FSMC_SDRAM2 TRUE +#define STM32_SRAM_USE_SRAM1 FALSE +#define STM32_SRAM_USE_SRAM2 FALSE +#define STM32_SRAM_USE_SRAM3 FALSE +#define STM32_SRAM_USE_SRAM4 FALSE /* - * FSMC SRAM driver system settings. + * FSMC SDRAM driver system settings. */ -#define STM32_USE_FSMC_SRAM FALSE -#define STM32_SRAM_USE_FSMC_SRAM1 FALSE -#define STM32_SRAM_USE_FSMC_SRAM2 FALSE -#define STM32_SRAM_USE_FSMC_SRAM3 FALSE -#define STM32_SRAM_USE_FSMC_SRAM4 FALSE +#define STM32_SDRAM_USE_SDRAM1 FALSE +#define STM32_SDRAM_USE_SDRAM2 TRUE /* * LTDC driver system settings. diff --git a/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/halconf_community.h b/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/halconf_community.h index 2e8b241..2e6d633 100644 --- a/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/halconf_community.h +++ b/demos/STM32/RT-STM32F429-DISCOVERY-TRIBUF/halconf_community.h @@ -32,6 +32,20 @@ #endif /** + * @brief Enables the SDRAM subsystem. + */ +#if !defined(HAL_USE_SDRAM) || defined(__DOXYGEN__) +#define HAL_USE_SDRAM FALSE +#endif + +/** + * @brief Enables the SRAM subsystem. + */ +#if !defined(HAL_USE_SRAM) || defined(__DOXYGEN__) +#define HAL_USE_SRAM FALSE +#endif + +/** * @brief Enables the NAND subsystem. */ #if !defined(HAL_USE_NAND) || defined(__DOXYGEN__) |