Forum Discussion
solution for mcu to configure ALTERA FPGA
Hello, i'm trying to use a MCU(like C8051) to configure Cyclone IV device(EP4CE30) in Passive Serial mode.
In the past, i was using GPIO of MCU to simulate the configure timing. But configure speed is very slow. And workload for MCU is very high to generate each bit on GPIO pin. Now, i'm thinking if SPI interface can be used to configure Cyclone IV device with PS mode. If it's feasible, the configuration speed will be improved very much as SPI clock can go upto 24mhz in MCU. Another advantage is workload of MCU will be dramatically reduced as SPI interface will generate clock and data automatically. See the attached picture for system connection. My question is: Is it feasible? Is it reliable? What should i take care about? https://www.alteraforum.com/forum/attachment.php?attachmentid=815714 Replies
- Altera_Forum
Honored Contributor
There is also a capability of "Remote System Update" (that basically gives you access to write to the EPCS through the internals of the FGPA and boot off a secondary location.
We have used both methods. If you hook the MCU directly to the SPI, make sure it has it's lines tristated when the FPGA is loading. It works, but there are contention issues you need to be careful with. Remote System Update works, but there's no real simulation model, so you end up having a play with in a trail and error fashion to get it to work. A wiki artical is available at: http://www.alterawiki.com/wiki/epcs_based_remote_system_update_(rsu)_example_on_bemicro_sdk?gsa_pos=2&wt.oss_r=1&wt.oss=remote%20upgrade When we did it, we basically gave the external MCU access to the RSU block registers directly though a UART interface. (that had some CRC validation) Pete - Altera_Forum
Honored Contributor
Thanks for your reply. Yes. Micro processor can access the flash from the SPI master inside FPGA image. I have one concern that what if the power failure happens during programming the flash. Then the data inside flash is not complete. When power on again, the SPI master in FPGA won't work anymore if the configuration data in the flash is corrupted. Is there a way to recover from such kind of failure?
- Altera_Forum
Honored Contributor
With the Remote System Update system it basically boots in Active Serial mode, and the "Updated" image is written to a secondary block. Once it is there, you tell it to boot from this secondary block. If that block fails CRC, it reloads the original image again.
You check the status of the RSU to figure out it the secondary or primary image is actually loaded. It works, and offers some protection. But if you mess up and overwrite the original image, you are still in trouble. Pete - Altera_Forum
Honored Contributor
The example for RSU in the wiki below is based on EPCS chip from Altera. But, in my system, a SPI flash from Micron (M25P80) is used. Is there any problem to use this example in my system?
http://www.alterawiki.com/wiki/epcs_...mote%20upgrade