diff options
author | Fabien Poussin <fabien.poussin@gmail.com> | 2019-10-30 13:19:08 +0100 |
---|---|---|
committer | Fabien Poussin <fabien.poussin@gmail.com> | 2019-10-30 13:19:08 +0100 |
commit | f6b1a12ecf14e4c703b18f3d13537e878215e91a (patch) | |
tree | 9425e1fdfbcccef5c210a87e93d2aa0c5e9a13b3 /demos | |
parent | b15b68c1c4dd59a846c36e52ef4502eb8ad84a5a (diff) | |
download | ChibiOS-Contrib-f6b1a12ecf14e4c703b18f3d13537e878215e91a.tar.gz ChibiOS-Contrib-f6b1a12ecf14e4c703b18f3d13537e878215e91a.tar.bz2 ChibiOS-Contrib-f6b1a12ecf14e4c703b18f3d13537e878215e91a.zip |
Fixed DMA2D example
Diffstat (limited to 'demos')
3 files changed, 29 insertions, 14 deletions
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 55a66a5..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"
@@ -557,7 +556,7 @@ int main(void) { * Initialise FSMC for SDRAM.
*/
sdramInit();
- sdramStart(&SDRAMD, &sdram_cfg);
+ 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 6ecfe91..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_NAND1 FALSE -#define STM32_NAND_USE_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. |