Trenz Electronic GmbH Support Forum

Trenz Electronic Products => Trenz Electronic FPGA Modules => Topic started by: johnabel on September 11, 2019, 01:06:57 PM

Title: Cannot configure the flash with some FSBL
Post by: johnabel on September 11, 2019, 01:06:57 PM
I'm using TE0803 on carrier board TE0808. I ran into problems when writing the config flash from SDK. This message popped up:

Initialization done, programming the memory
===== mrd->addr=0xFF5E0204, data=0x00000222 =====
BOOT_MODE REG = 0x0222
WARNING: [Xicom 50-100] The current boot mode is QSPI32.
If flash programming fails, configure device for JTAG boot mode and try again.
Downloading FSBL...
Running FSBL...
Finished running FSBL.
Problem in running uboot
Flash programming initialization failed.

ERROR: Flash Operation Failed


I changed the switches in S5 (1,2) to OFF-OFF to boot from JTAG as adviced, but got the same message and result.

Nevertheless, if I try the same BIN file with a different FSBL it works, although when it runs produced the error:

TE0803 TE_XFsbl_BoardInit_Custom
GTR Lane0 LOCK Status failed. (Reg:0xFD4023E4,Val:0x0)
GTR Lane3 LOCK Status failed. (Reg:0xFD40E3E4,Val:0x0)
Configure Carrier I2C Switch 0x73 for EEPROM access


The thing is that my FSBLs are basically the same, the only thing I change is the Si5338 oscillator configuration.
How to solve that?
Title: Re: Cannot configure the flash with some FSBL
Post by: JH on September 12, 2019, 11:53:47 AM
Hi,
you must change boot mode to JTAG to program Flash with Xilinx tools or your use or second FSBL(for QSPI programming) on the gui for programming --> not in the Boot.bin
In case something crash in Vivado with JTAG, it's always good to close jtag connected one time and check one task manager, that hw_server.exe is closed (if this is not closed, it's crashed and JTAG des not work like it should). For Zynq it's also good to reset or power off/on the module. Zynq can also block JTAG access, in case it crashed or the running design doesn't allowed JTAG

Did you select the correct QSPI Flash like it's connected on the module and set in your design PS IP (predefined with our board parts, but I didn't know if you use it or if you has change QSPI settings).



QuoteGTR Lane0 LOCK Status failed. (Reg:0xFD4023E4,Val:0x0)
GTR Lane3 LOCK Status failed. (Reg:0xFD40E3E4,Val:0x0)
This is only a note, our FSBL part check the lock state of the GTR PLLs independent of he usage. If this warning is imported or not depends on:
1. if you use this GTR or not
2. if the gtr will be configured with FSBL or late in linux or so --> so it depends on the protocol which is running on the GTR lane.

br
John
Title: Re: Cannot configure the flash with some FSBL
Post by: johnabel on September 12, 2019, 02:25:56 PM
I changed the boot mode with the switches but got the same result.
vivado didn't crash, it just failed at writing (te be precise, it didn't even erase - the previous config was there)
yes, I tried switching off and back on things, even disconnecting the JTAG pod
Maybe the GTR messages are not related to the failure as I'm not using them

I eventually managed to have a successful FSBL. Not completely comfortable as I don't know the exact reason.
so I will come back here with more tears...
Title: Re: Cannot configure the flash with some FSBL
Post by: JH on September 12, 2019, 02:41:33 PM
Hi,
custom carrier or our tebf0808?
In this case you must power off/on or hold reset button longer --> if you use newer TEBF0808 cpld firmware. Reset button does soft rest(which did not read again boot mode) if you hold appr. 1 sec and hard reset if you hold appr 3 sec.
See: https://wiki.trenz-electronic.de/display/PD/TEBF0808+Getting+Started#TEBF0808GettingStarted-DIP-SwitchesandPushButtons

In case of custom carrier, did you use correct MIO configuration and did you generate fsbl from this hdf project?
In case of our carrier, can you try out our prebuilt Boot.bin with hello te0808 example for qspi boot?

If both not help, please generate FSBL with debug flag to get more information. Search for debug flags on:
https://www.xilinx.com/support/documentation/user_guides/ug1137-zynq-ultrascale-mpsoc-swdev.pdf

br
John
Title: Re: Cannot configure the flash with some FSBL
Post by: johnabel on September 12, 2019, 04:52:58 PM
I had to tweak the FSBL with these things:

- enable the iic_init call  in TE_XFsbl_BoardInit_Custom (disabled because of the ifdef)
- just after that, call  TE_XFsbl_TPSU_MODIFIED()
- comment all uses of    psu_status    in TE_XFsbl_TPSU_MODIFIED

I got to that conclusion because:
- Whenever the FSBL didn't finish (hanged) it was before using the IIC (because it wasn't initialized)
- When the FSBL finished, the GTH didn't work (the oscillator wasn't configured and there was no ref. clock)

That is something that could probably be done with the defines... I just had no time to play with them
Title: Re: Cannot configure the flash with some FSBL
Post by: JH on September 12, 2019, 08:04:00 PM
Hi,
enable debug flags in your fsbl to see where it stops:

https://www.xilinx.com/support/documentation/user_guides/ug1137-zynq-ultrascale-mpsoc-swdev.pdf

From your other forum post I expect prebuilt Boot.bin from the reference designs works, correct?

So in case you create the reference design without changes, does this work?
br
John