Forum Discussion
Controlling MCU with FPGA
Hi,
accessing MCU thru FPGA is the unusal way, but may be preferred in some cases where FPGA is owning the primary system interface, e.g. PCIe, ethernet or custom specific interface.
In systems that utilize both FPGA and MCU components, non time-critical communication, configuration and housekeeping jobs are typically assigned to MCU, because they are defined in sequential code and can be implemented there with less resource utilization. But that's a general consideration that must not necessarily apply to your design.
Things depend on which interfaces are already determined by the system topology, what's their bandwidth and which share of interface bandwidth is required for intended communication.
Also interface between MCU and FPGA (no matter which peer is director) will be designed according to bandwidth requirements. In order of increasing throughput we have I2C, UART, SPI, Quad-SPI, parallel data bus (e.g. STM32 FMC interface).
For specifically asked MCU configuration, I agree with @Farabi that serial boot loader is a good method, because it doesn't require previous flash programming, at least in case of STM32. There should be ST code examples for using the boot loader interface in custom code.
Regards
Frank
@FvM
Thank you for your wisdom
>>accessing MCU thru FPGA is the unusal way,
I agree. From what I’ve researched, most implementations typically follow the opposite approach.
>>In systems that utilize both FPGA and MCU components...
Point noted, thank you
>>Things depend on which interfaces are already determined by the system topology...
That makes sense. The HPS already provides dedicated pins and dual ARM cores, and I find working with these more straightforward(familiar) compared to directly implementing logic blocks in the FPGA fabric.
>> For specifically asked MCU configuration, I agree with @Farabi that serial boot..
I have decided(for the moment) to use the UART interface of HPS and connect UART0 to the PC application and UART1 to the MCU
But now I am left the two doubts
Must I develop custom software to explicitly control data transfer between UART0 and UART1 (e.g., by configuring registers, managing memory buffers, and handling flow control)?
Or does the HPS provide a built-in capability to automatically forward data between the two UARTs, effectively acting as a UART-to-UART bridge without additional programming effort?
Your guidance is much apprecited
Thank you