Working LCD_USE_DMA_FSMC (#19522)

This commit is contained in:
Tanguy Pruvot 2020-09-28 04:28:48 +02:00 committed by GitHub
parent 7415e4e66d
commit f3de0f6c53
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
2 changed files with 11 additions and 1 deletions

View file

@ -89,6 +89,16 @@ void TFT_FSMC::Init() {
uint8_t cs = FSMC_CS_PIN, rs = FSMC_RS_PIN; uint8_t cs = FSMC_CS_PIN, rs = FSMC_RS_PIN;
uint32_t controllerAddress; uint32_t controllerAddress;
#if PIN_EXISTS(TFT_BACKLIGHT)
OUT_WRITE(TFT_BACKLIGHT_PIN, DISABLED(DELAYED_BACKLIGHT_INIT));
#endif
#if ENABLED(LCD_USE_DMA_FSMC)
dma_init(FSMC_DMA_DEV);
dma_disable(FSMC_DMA_DEV, FSMC_DMA_CHANNEL);
dma_set_priority(FSMC_DMA_DEV, FSMC_DMA_CHANNEL, DMA_PRIORITY_MEDIUM);
#endif
#if PIN_EXISTS(TFT_RESET) #if PIN_EXISTS(TFT_RESET)
OUT_WRITE(TFT_RESET_PIN, HIGH); OUT_WRITE(TFT_RESET_PIN, HIGH);
delay(100); delay(100);

View file

@ -124,7 +124,7 @@
#define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1 #define FSMC_CS_PIN PD7 // pin 88 = FSMC_NE1
#define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed #define FSMC_RS_PIN PD11 // pin 58 A16 Register. Only one address needed
//#define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT (broken) #define LCD_USE_DMA_FSMC // Use DMA transfers to send data to the TFT
#define FSMC_DMA_DEV DMA2 #define FSMC_DMA_DEV DMA2
#define FSMC_DMA_CHANNEL DMA_CH5 #define FSMC_DMA_CHANNEL DMA_CH5