cancel
Showing results for 
Show  only  | Search instead for 
Did you mean: 
tmonaghan84
Explorer
Explorer
6,041 Views
Registered: ‎04-19-2018

JTAG Boot mode

 

Hi

I have read the MPSoC TRM with its description of the boot mode pins for the PS booting.

However my colleagues have stated that on previous generations of Xilinx FPGAs you do not need to have these pins wired to boot from JTAG, and the conneciton of JTAG overides the boot sequence/

Is this correct?, The table below from the US+ TRM seems to sugggest to boot from JTAG you need to set the boot mode to 0000.

References to documentation to support this would be appreciated.

Thanks

Tim

MPSoC boot mode pins.PNG

 

 

 

0 Kudos
Reply
12 Replies
glena
Moderator
Moderator
6,029 Views
Registered: ‎03-19-2014

The TRM, UG1085 for the Zynq UltraScale + MPSoC, describes the boot mode pin settings necessary for the desired boot mode.   For JTAG, that is 0000 as shown in tbale 11-1 that you posted.    

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Reply
tmonaghan84
Explorer
Explorer
6,004 Views
Registered: ‎04-19-2018

thanks @glena , That is my understanding, however i have been told previous generations allowed booting and programming from Impact/Vivado without setting/changing the boot mode pins to JTAG.

 

I would like to know is this is still true for the Ultrascale MPSoC?

 

0 Kudos
Reply
stephenm
Moderator
Moderator
5,994 Views
Registered: ‎09-12-2007

What is your bootmode set to? If you have this set to QSPI mode (for example), and you have no valid image here. Then you will most likely see the dummy_dap in the jtag chain after power up. If you do have a valid image here, it will attempt to boot, but you can connect to jtag.

See Figure 39-1:

https://www.xilinx.com/support/documentation/user_guides/ug1085-zynq-ultrascale-trm.pdf

 

tmonaghan84
Explorer
Explorer
5,987 Views
Registered: ‎04-19-2018

thanks, @stephenm , we would have the boot mode pins set to QSPI but we would need to program the board for bringup.

I took a look at the document but it wasn't clear, I'm assuming the CSU ROM would look for an image at the location set by the boot mode pins if this fails i'm not sure what it would do?, you seem to suggest as my colleague has that it will fall back to jtag?

 

Or does the JTAG hold the CSU in reset and change the boot mode registers ?
(use_alt = 0001 , alt_boot_mode = 0000)

https://www.xilinx.com/html_docs/registers/ug1087/ug1087-zynq-ultrascale-registers.html#crl_apb___boot_mode_user.html

 

0 Kudos
Reply
stephenm
Moderator
Moderator
5,980 Views
Registered: ‎09-12-2007

If it fails to find the image it should default to the dummy_dap. For example:

dummy_dap.PNG

tmonaghan84
Explorer
Explorer
5,973 Views
Registered: ‎04-19-2018

thanks again @stephenm , for some reason my kudo button arnt working, to show my appreciation.

What is the benefit of fitting switches/jumpers to boards for the boot mode pins as the Evaluation boards do, seems JTAG value is surplus to requirements.

 

Thanks

Tim

0 Kudos
Reply
glena
Moderator
Moderator
5,956 Views
Registered: ‎03-19-2014

The benifit of bootmode selection is change the boot flash device.  If you only are booting QSPI, then QSPI is all you would need in most cases.  I would advise selecting QSPI32.    

I said most cases because there may be QSPI images that can put your hardware in a state where it will not reprogram the QSPI device with the standard FSBL as a guide.   In that event, you can either short the bootmode pins to ground briefly while sending a PS_POR_B or edit the code in xfsbl_initialization.c to make the FSBL think it's booting in JTAG mode.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
tmonaghan84
Explorer
Explorer
5,944 Views
Registered: ‎04-19-2018

Thanks again

So the design will use QSPI and we will boot strap it for that in the PCB, with not option to change the bootmode pins.

So we need to activly set the boot mode to JTAG during development in the FSBL(xfsbl_initialization.c) , to enable us to recover later if we manage to get into a state where the bootloader cannot program the QSPI? , or can this be done after we are "stuck"?

I'm confused you mention FSBL Guide and not boot.bin?, what is FSBL guide?

 

Seem the kudos issue i had was internet explorer issue, chrome on my mobile is ok.

 

 

0 Kudos
Reply
glena
Moderator
Moderator
5,938 Views
Registered: ‎03-19-2014

In most cases you can reprogram QSPI when booting in QSPI mode.   There are some cases where that does not work.    So, you can manually short the mode pin to ground and issue a PS_POR_B - boot mode is checked very early after release of PS_POR_B.   

If you don't have access to those signals, then you can edit xfsbl_initialization.c in your guide FSBL (do not edit your FSBL in boot.bin)

                /**
                * Read Boot Mode register and update the value
                */
                BootMode = XFsbl_In32(CRL_APB_BOOT_MODE_USER) &
                                                CRL_APB_BOOT_MODE_USER_BOOT_MODE_MASK;
 
                //Add this line
                BootMode = XFSBL_JTAG_BOOT_MODE;
-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Reply
tmonaghan84
Explorer
Explorer
5,929 Views
Registered: ‎04-19-2018

THnaks @glena,Could you elabourate on the "Some cases where that wouldn't work"?

Do we have to edit the xfsbl_initialization.c in FSBL before we get stuck?, would you advise doing this for development only , then reverting when in produciton?

You mention "guide" FSBL what do you mean by guide?

 

Thanks for the help , this is really helping understand the boot process.

0 Kudos
Reply
glena
Moderator
Moderator
5,926 Views
Registered: ‎03-19-2014

Guide FSBL = the FSBL required by program_flash to program your device.   This does not need to be the same FSBL that is in your boot.bin.   

 

If you make this edit, ONLY edit the guide FSBL.   Do not make these edits on the FSBL that is in your boot.bin

 

Program_flash programs whatever is in boot.bin, it does not open it, does not read it, has no knowledge of the contents.   The guide FSBL is necessary to set up the clocks and MIOs on the ZU+ MPSoC and prepare it for the mini u-boot that programs the QSPI.

-------------------------------------------------------------------------
Don’t forget to reply, kudo, and accept as solution.
-------------------------------------------------------------------------
0 Kudos
Reply
stephenm
Moderator
Moderator
5,911 Views
Registered: ‎09-12-2007

There are pull up resistors on the bootmode pins. This is used during bootrom to set the bootmode register, asnd load the fsbl. Fsbl then takes over to load other partitions in boot image.

0 Kudos
Reply