2025-07-13 9:41 PM
I am designing a system with an STM32 and an FPGA(Xilinx 7 series).
STM32 is in charge of the user interface and the FPGA is in charge of driving the LCD to show images.
Information needs to be exchanged between the STM32 and the FPGA. (STM32 send a command to the FPGA to choose which image to display or to stop displaying. STM32 also need to write all logs to the SD card through the FPGA. FPGA needs to report to the STM32 how many images are displayed and how many remain.)
After some research, I found SPI seems to be fast and easy to implement.(I am not sure which interface is commonly used for communication between STM32 and FPGA?). I wonder if there is another interface that is faster or easier to implement?
Solved! Go to Solution.
2025-07-14 10:56 PM
You can use USART with no problems.
I had done a project previously where we had 17 STM32 + one TM4C129, each with a Command and Telemetry port using USART connected to a Xilinx Spartan 7. So that's 36 UART ports.
The Xilinx has had no issues communicating with that many microcontrollers at the same time with just UART.
2025-07-13 9:57 PM
The "fastest" option would be a Cortex core in the FPGA itself.
However ...
> STM32 send a command to the FPGA to choose which image to display or to stop displaying. STM32 also need to write all logs to the SD card through the FPGA. FPGA needs to report to the STM32 how many images are displayed and how many remain.
This does not sound as you need a high bandwidth here, a proper protocol between both seems more important.
> STM32 is in charge of the user interface and the FPGA is in charge of driving the LCD to show images.
Which suggests "fast" means without noticeable delay for the operator.
I suspect reading the actual images and rendering them to the display require more time than the transfer of GUI commands.
2025-07-13 10:53 PM
Which STM32?
FMC, QUADSPI, OCTOSPI, DCMI (inbound), PSSI
LCD, then perhaps LTDC and an RGB interface.
2025-07-14 7:48 AM
Hello @snkparty1 ,
FPGA and MCU (such as STM32) are 2 completely different hardware products.
The MCU is a multi purpose component able to make various calculations based on C code
On the other hand, an FPGA is not coded using C but rather it is coded by closing or opening gates to create a new hardware configuration that perfectly fits your application.
Therefore, FPGA are usually faster (even though it depends on what you get) but they are more complex, lower level and require more time to get the same result.
Regards,
2025-07-14 9:42 AM
You haven't indicate what kind of information? String information? Telemetry binary data?
How often are they communicating with each other?
2025-07-14 9:10 PM
Sorry for not providing detail and confused you.
The system is for 3D printer and MCU is STM32H743, the reason to choose this stm32 is I have a development board with STM32H743 and this chip is powerful enough to have a touchGFX user interface and freertos system runing on it.(Availability also matters)
The MCU will send
1.Get information about how many images are in SD card and how many images has been displayed on LCD
2."show next image" command to FPGA to inform FPGA to display image on LCD.(Print process complete and change to next image)
3.save system log on SD card
Since MCU needs to communicate to send command, poll the status, log information to SD card. All of which does not require large amount of data to be transfered.The speed requirement is not that high so SPI seems to be a ok choice. But if I choose SPI then MCU is master and FPGA is slave so FPGA can not start to send information to MCU. MCU needs to poll FPGA continously to check if FPGA side works fine or not.
2025-07-14 10:22 PM
> Since MCU needs to communicate to send command, poll the status, log information to SD card. All of which does not require large amount of data to be transfered.The speed requirement is not that high so SPI seems to be a ok choice.
Exactly this was my point.
There are no high throughput requirements for such a GUI controller, no need to overcomplicate things.
And the more "standardized" the communication channel is, the easier you can port your applications to other MCUs.
2025-07-14 10:56 PM
You can use USART with no problems.
I had done a project previously where we had 17 STM32 + one TM4C129, each with a Command and Telemetry port using USART connected to a Xilinx Spartan 7. So that's 36 UART ports.
The Xilinx has had no issues communicating with that many microcontrollers at the same time with just UART.
2025-07-14 11:02 PM
IMHO not clear what the FPGA does here at all. The MCU can drive the SD card, maybe even the LCD,
2025-07-21 8:19 PM
Your suggestion helps a lot, thanks. I will try both spi and usart during development to see which protocol suits this project better.