Change driver SPI to DMA_SPI
Hi everybody,
I training today to the screen qith the driver ILI9341.
I use a library find the net.If i use the SPI in normal mode (pooling) everyhting it's ok.
But the time to fill is very long ( like 2 second aprox.). SO i would like use the DMA to see if I can increse the speed to speak with my screen.
But it's don't work.
In the library ili9341.h i have this line
#define ILI9341_SPI_PORT hspi2
extern SPI_HandleTypeDef ILI9341_SPI_PORT;
so I comment the previous lin and i have add
#define ILI9341_SPI_PORT2 hdma_spi2_tx
extern DMA_HandleTypeDef ILI9341_SPI_PORT2;
So now in the ili9341.c file.
I have comment all the line with _HAL_SPI_Transmit like this ( only 3 lines) :
HAL_SPI_Transmit(&ILI9341_SPI_PORT, &cmd, sizeof(cmd), HAL_MAX_DELAY);and replace By this line
HAL_SPI_Transmit_DMA(&ILI9341_SPI_PORT2, &cmd, sizeof(cmd));Do you know how I should replace the file to switch from pooling mode to DMA mode?
Thank you
