diff --git a/Marlin/src/HAL/STM32/sdio.cpp b/Marlin/src/HAL/STM32/sdio.cpp index de388b8e14..89df16628f 100644 --- a/Marlin/src/HAL/STM32/sdio.cpp +++ b/Marlin/src/HAL/STM32/sdio.cpp @@ -238,7 +238,7 @@ void HAL_SD_MspInit(SD_HandleTypeDef *hsd) { hdma_sdio.Init.MemInc = DMA_MINC_ENABLE; hdma_sdio.Init.PeriphDataAlignment = DMA_PDATAALIGN_WORD; hdma_sdio.Init.MemDataAlignment = DMA_MDATAALIGN_WORD; - hdma_sdio.Init.Priority = DMA_PRIORITY_LOW; + hdma_sdio.Init.Priority = DMA_PRIORITY_MEDIUM; __HAL_LINKDMA(&hsd, hdmarx, hdma_sdio); __HAL_LINKDMA(&hsd, hdmatx, hdma_sdio); diff --git a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp index 4dffe8b4fc..e508f90e61 100644 --- a/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_fsmc.cpp @@ -111,11 +111,11 @@ void TFT_FSMC::init() { HAL_SRAM_Init(&SRAMx, &timing, &extTiming); - __HAL_RCC_DMA2_CLK_ENABLE(); - #ifdef STM32F1xx - DMAtx.Instance = DMA2_Channel1; + __HAL_RCC_DMA1_CLK_ENABLE(); + DMAtx.Instance = DMA1_Channel1; #elif defined(STM32F4xx) + __HAL_RCC_DMA2_CLK_ENABLE(); DMAtx.Instance = DMA2_Stream0; DMAtx.Init.Channel = DMA_CHANNEL_0; DMAtx.Init.FIFOMode = DMA_FIFOMODE_ENABLE; @@ -182,6 +182,7 @@ void TFT_FSMC::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t cou DMAtx.Init.PeriphInc = memoryIncrease; HAL_DMA_Init(&DMAtx); HAL_DMA_Start(&DMAtx, (uint32_t)data, (uint32_t)&(LCD->RAM), count); + TERN_(TFT_SHARED_IO, while (isBusy())); } void TFT_FSMC::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) { diff --git a/Marlin/src/HAL/STM32/tft/tft_spi.cpp b/Marlin/src/HAL/STM32/tft/tft_spi.cpp index cda2eb28e3..71ad14534f 100644 --- a/Marlin/src/HAL/STM32/tft/tft_spi.cpp +++ b/Marlin/src/HAL/STM32/tft/tft_spi.cpp @@ -337,7 +337,7 @@ void TFT_SPI::transmitDMA(uint32_t memoryIncrease, uint16_t *data, uint16_t coun SET_BIT(SPIx.Instance->CR2, SPI_CR2_TXDMAEN); // Enable Tx DMA Request #endif - TERN_(TFT_SHARED_IO, while (isBusy()) { /* nada */ }); + TERN_(TFT_SHARED_IO, while (isBusy())); } void TFT_SPI::transmit(uint32_t memoryIncrease, uint16_t *data, uint16_t count) {