cancel
Showing results for 
Search instead for 
Did you mean: 

STM32F302RCT6 transmit images from external FLASH to the LCD via SPI and DMA

JLee.47
Associate II

Hello,

I am using STM32F302RCT6 in my custom board. I am trying to setup the SPI dma to directly transfer from external flash to TFT display, so it is the most efficient.

Details of implementation:

- External flash is connected to SPI-1

- TFT display is connected to SPI-3

- Both SPIs are set to the same bus speed@ 16MHz

- Both DMAs are set to disable auto-increment mode and to use a single byte for transfer

I followed the setup as close to the one defined in a previous thread here, but on a STM32F1. 

The result is that on my custom board, it simply doesn't work with the setup. There is no dma activity. 

When I tried to call the HAL dma function "HAL_SPI_TransmitReceive_DMA( hspi1, (uint8_t*)spiFlashDummyByte, (uint8_t*)&hspi3.Instance->DR, 8888 );", incorrect data (all black) get passed to the display. The HAL_SPI_TransmitReceive_DMA function is called after I setup both flash (read command + start address) and TFT display (setup display location + incoming bytes are pixel colors) with the necessary startup commands for transfer.

My biggest question here is it even possible for this STM32F302RCT6 chip to transfer via spi dma from one peripheral to another peripheral? It appears both hspi1.Instance->DR and hspi3.Instance->DR are key addresses (SPI 1 & 3 data register) to provide to the dma engine.

Thank you

0 REPLIES 0