Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: io535b on July 03, 2020, 08:27:36 PM

Title: TE0741 and TE0703 can't boot to flash
Post by: io535b on July 03, 2020, 08:27:36 PM
Hello. I have both a TE0741 Kintex 7 module and a TE0703 carrier board. I'd like to write my firmware to the flash memory - the S25FL256SAGBHI20 according to the documentation. In Vivado, after generating the .bit file, I go to Write Memory Configuration File. I choose the part to be "s25fl256sxxxxxx-spi-x1_x2_x4". I use SPIx1, I point to the .bit file I just generated and I create an .mcs file. I program the .mcs like normally to the flash config once connected to the TE0741/TE0703 system. Everything says it worked. But when I power cycle, the firmware is not loaded. If I connect to it again through the hardware manager, it says the chip is not loaded.

In the documentation, I have checked and made sure that TE0703, S2-4 is set to "OFF" to boot from QSPI. I also see that the PHY lights are green, so I know it's correct. On the TE0741 documentation, it mentions that "SPI Flash QE (Quad Enable) bit must be set, or the FPGA would not configure itself from Flash. This bit is always set at the manufacturing." Is the SPI Flash QE bit the one in the DIP switch? Or is it something else?
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: JH on July 06, 2020, 07:18:13 AM
Hi,

can you try out prebuilt mcs from:
https://wiki.trenz-electronic.de/display/PD/TE0741+Test+Board

which external power supply did you use? Some current limit?
Which Vivado version? Which OS?

QuoteI use SPIx1, I point to the .bit file I just generated and I create an .mcs file.
Use X4 mode, set the basic constrains from reference design and regenerate bistream again, before you generate mcs in x4 :
https://wiki.trenz-electronic.de/display/PD/TE0741+Test+Board#TE0741TestBoard-Basicmoduleconstrains

QuoteIn the documentation, I have checked and made sure that TE0703, S2-4 is set to "OFF" to boot from QSPI
TE0741 has fix boot mode. But mode is only selectable for Zynq modules

QuoteIs the SPI Flash QE bit the one in the DIP switch? Or is it something else?
No. Its some configuration bit of the qspi flash, if the interface is used in as X4 or as X1

br
John
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: io535b on July 06, 2020, 11:29:03 PM
Hi John,

Adding the basic constraints and writing the MCS with X4 mode worked! Thanks!
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: io535b on September 25, 2020, 10:51:52 PM
While it worked that one time, I can't program the flash again. I get:

ERROR: [Labtools 27-3347] Flash Programming Unsuccessful: Failure to set flash parameters.
ERROR: [Common 17-39] 'program_hw_cfgmem' failed due to earlier errors.



I'm getting the same exact errors detailed here, it looks like the first post is using a Trenz module as well:

https://forums.xilinx.com/t5/FPGA-Configuration/Artix-7-Failure-to-set-flash-parameters/m-p/941988#M11480
https://forums.xilinx.com/t5/FPGA-Configuration/Configuration-flash-programming-fails-if-the-Artix-7-FPGA-is/m-p/929468#M11128

Title: Re: TE0741 and TE0703 can't boot to flash
Post by: JH on September 28, 2020, 07:08:38 AM
Hi,

does your design use Flash? In this case, I think it can prevent access to flash from JTAG.  Configure FPGA with other design before you try to program flash

Can you
Can you also send me the whole log file from starting vivado until you has try to program flash (vivado.log --> it's in the vivado base folder or in case you use our reference designs with our scripts, in the v_log subfolder of the project delivery).
brJohn
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: io535b on September 29, 2020, 11:28:50 PM
I tried restarting everything and it still doesn't work. I also tried multiple machines, Windows and Linux. The log file is attached.
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: JH on September 30, 2020, 08:18:51 AM
Hi,
I saw you use some IBERT design. Do you use a heat sink?
Can you program at first FPGA with the bitstream form the our test board reference design:
https://wiki.trenz-electronic.de/display/PD/TE0741+Test+Board
-->  I mean Programm Device with *.bit from the prebuilt folder of the reference design
--> after that setup "s25fl256sxxxxxx0-spi-x1_x2_x4" for Flash and program the .mcs from the same reference design.
Does this work?

br
John
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: io535b on September 30, 2020, 05:54:33 PM
Hi,

No I haven't used a heat sink, just the regular modules. Should I?

I'll try with the prebuilt folders tomorrow, but I'm not hopeful it will work. Before I wrote to the Flash on this module, I was able to switch between *.bit files with no problem. I had one for 500 MHz IBERT and 1 GHz IBERT. When I wrote the *.bit file, the Serial I/O Link would immediately change to reflect the new value. Ever since I wrote the 500 MHz .mcs file, that's the only programming I ever get. Even if I write the 1 GHz *.bit file or a completely different *.bit file, it still behaves as when the 500 MHz Flash was loaded.
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: JH on October 01, 2020, 06:47:01 AM
Hi,
hm this sounds like some other problem.
Can you try following:

Does this works?
br
John
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: io535b on October 01, 2020, 09:11:47 PM
Yes, that ended up erasing the Flash, but then it happened again. I realized that the error was on my end. I had designed a new carrier board for the TE0741 and RESIN (CSS) was being held low. Once I toggled that, everything worked as expected. Thanks for your patience.
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: JH on October 02, 2020, 09:21:58 AM
Hi,
ok your one carrier. Good to hear that it works now.

But only for own interest:
You mean the Reset Pin (Carrier JB2-17)? https://wiki.trenz-electronic.de/display/PD/4+x+5+SoM+Integration+Guide#id-4x5SoMIntegrationGuide-4x5ModuleControllerIOs
But how could see IBERT when you reset was hold low? Or did you try to program on your carrier only and test it on our carrier?


br
John
Title: Re: TE0741 and TE0703 can't boot to flash
Post by: io535b on October 02, 2020, 04:01:24 PM
Hi,

No, I meant RESIN, Pin 17 on JB2 of TE0703 or Pin 18 on JM2 of TE0741 (PB2A/CSSPIN on the FPGA). It looks like if that's held to the wrong value, you can program once, but not again.