Sign In

Don't have a Xilinx account yet?

  • Choose to receive important news and product information
  • Gain access to special content
  • Personalize your web experience on Xilinx.com

Create Account

Username

Password

Forgot your password?
XClose Panel
Xilinx Home
Reply
Visitor
politoleo
Posts: 3
Registered: ‎05-30-2012
0

Programming FPGA's spi flash with microcontroller

Hi, this is my first post on this forum!


In our company we used an FPGA for high speed data acquisition for the first time, we are about to relase the product, so we need to insert a "bootloader" for let our client do upgrades in future.

 

The fpga boot with a SPI Flash memory, witch is connected also with the microcontroller (tristated pin)!

 

My question is:


How can i stream the MCS file onto the spi flash? 

 

I mean, i know how to program the flash with mcu, but i need something readable  by the mcu, and i don't know anything about MCS file format, or what sector i need to program on the flash.

 

I've found this: 

http://www.xilinx.com/support/documentation/application_notes/xapp058.pdf

 

but i think my situation is different, i don't want to go trough the fpga to program the flash (the board is already done, so i just can't do it)

 

Sorry in advance if this would be a stupid question! 

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009

Re: Programming FPGA's spi flash with microcontroller

i don't know anything about MCS file format, or what sector i need to program on the flash.

 

When you use the Xilinx search tool to find "mcs file format", AR #476 shows up first in the list.

 

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Visitor
politoleo
Posts: 3
Registered: ‎05-30-2012
0

Re: Programming FPGA's spi flash with microcontroller

Thank you very much for the fast reply!

 

It's so simple?

 

I just need to program the flash with the hex generated  by this command "promgen -p hex -r input.mcs -o output.hex" and that's all? 

Expert Contributor
eteam00
Posts: 7,505
Registered: ‎07-21-2009
0

Re: Programming FPGA's spi flash with microcontroller

It's so simple?

 

Here's an experiment that everyone needs to try at least once in their careers:

  • Use iMPACT to erase and program the SPI flash memory
  • Have the uController decode the .MCS file and compare the decoded binary with the SPI flash memory contents

This helps sort out lingering questions with

  • bit ordering
  • start address
  • preamble
  • post-amble
  • etc. etc.

-- Bob Elkind

SIGNATURE:
README for newbies is here: http://forums.xilinx.com/t5/New-Users-Forum/README-first-Help-for-new-users/td-p/219369

Summary:
1. Read the manual or user guide. Have you read the manual? Can you find the manual?
2. Search the forums (and search the web) for similar topics.
3. Do not post the same question on multiple forums.
4. Do not post a new topic or question on someone else's thread, start a new thread!
5. Students: Copying code is not the same as learning to design.
6 "It does not work" is not a question which can be answered. Provide useful details (with webpage, datasheet links, please).
7. You are not charged extra fees for comments in your code.
8. I am not paid for forum posts. If I write a good post, then I have been good for nothing.
Visitor
politoleo
Posts: 3
Registered: ‎05-30-2012
0

Re: Programming FPGA's spi flash with microcontroller

Ok, i've done the first step hundred time, so i know the pcb and the flash works!

 

Now i will do the same with the mcu, if i'll have some problem I'll post it here!

Thank you!