STM32F1 transmit images from external FLASH to the LCD via SPI and DMA
Hello,
my STM32F103C8T6 is being used for driving LCD display (ST7789, SPI2). Images are stored in the external FLASH memory (GD25Q16C, SPI1).
I am looking for an efficient way to transfer images from external FLASH to the LCD. In order to read data from the FLASH, I have to send start address, and then keep sending dummy bytes (so the chip increments address before sending new byte).
So far, I have managed to do the following procedure:
-tell LCD, that incoming bytes will be pixel colors,
-send start address to the External Flash chip
-send dummy byte, receive corresponding pixel color, send it to the LCD. Repeat 115200 times (1PAGE = 240x240x2bytes)
**LCD displays image**
I would like to improve this process, for example by using DMA in following way:
-tell LCD, that incoming bytes will be pixel colors,
-send start address to the External Flash chip
-enable SPI1 (flash) DMA transmit channel: send dummy byte 115200 times,
-enable SPI1 (flash) receive channel: receive data and put it into SPI2 (lcd) DMA Transmit register immediately
I am however unsure if this reasonable way, or if it is even possible to get data from SPI1 RX and put it into SPI2 TX by DMA
