Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 6 additions & 0 deletions Processors/TFT_eSPI_STM32.c
Original file line number Diff line number Diff line change
Expand Up @@ -623,6 +623,12 @@ bool TFT_eSPI::initDMA(bool ctrl_cs)

__HAL_LINKDMA(&spiHal, hdmatx, dmaHal); // Attach DMA engine to SPI peripheral

// The SPI peripheral is already configured and enabled by Arduino's SPI.begin(),
// but spiHal is a separate HAL handle with only Instance set. HAL_SPI_Transmit_DMA
// requires State == HAL_SPI_STATE_READY, so we must set it here. After each
// completed DMA transfer, the HAL callback resets State back to READY automatically.
spiHal.State = HAL_SPI_STATE_READY;

return DMA_Enabled = true;
}

Expand Down
Loading