cancel
Showing results for 
Search instead for 
Did you mean: 

QSPI Data Transfer between MCU and FPGA

Triptendu14
Associate

 

 

I have designed a PCB that connects an Artix-7 XC7A35T-1FTG256C FPGA with an STM32F469VET6 (LQFP 100) MCU. My goal is to transfer data between these two devices, with the MCU as the QUADSPI master and the FPGA as the slave. For communication, all QUADSPI pins of the MCU are connected to the FPGA. I need to perform periodic data transfers every 10 microseconds. Specifically, the FPGA should send 10 16-bit values to the MCU, which will process them and then send back 10 16-bit values to the FPGA.

As a starting point, consider sending 10 16-bit data to the FPGA, and reading 10 16-bit data from the FPGA. To ensure periodic transfers, I initially used a TIM2 interrupt, triggering every 10 microseconds. However, I am facing difficulties in performing both read and write operations reliably.

Most available references use QUADSPI in polling mode, which is blocking and unsuitable for my high-speed application. I want to use DMA to accelerate the process. Could you guide me on how to set up periodic QUADSPI transfers using DMA, ideally with an example where data transfer occurs every 10 microseconds?

2 REPLIES 2
KDJEM.1
ST Employee

Hello @Triptendu14 and welcome to the community;

 

May QSPI_ReadWrite_DMA example can help you to start with QUADSPI interface (read and write with DMA). This example describes how to erase part of a QSPI memory, write data in DMA mode, read data in DMA mode and compare the result in an infinite loop.

Also, I recommend you to take a look at AN5050 precisely IV. HyperFlash and HyperRAM memories with Multiplexed mode example  section. This section shows how to read data from the external HyperFlash using DMA1, while the CPU reads data from the HyperRAM.

 

I hope this help you.

Thank you.

Kaouthar

To give better visibility on the answered topics, please click on Accept as Solution on the reply which solved your issue or answered your question.

You'd need to emulate command modes similar to a NOR FLASH, so the FPGA can sequence for read or write, and transition the bus.

Memory-Mapped mode would only work for READs on the F469, plus that would block other command usage.

The QSPI doesn't allow for concurrent operations, so you'd need to serialize operations.

You can use IT and DMA HAL_QSPI methods, single byte commands, without addresses, and then 20 bytes of data.

 

Tips, Buy me a coffee, or three.. PayPal Venmo
Up vote any posts that you find helpful, it shows what's working..