Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

CPUs keep resetting on PYNQ-Z2 #996

Closed
troibe opened this issue Aug 11, 2021 · 3 comments
Closed

CPUs keep resetting on PYNQ-Z2 #996

troibe opened this issue Aug 11, 2021 · 3 comments
Labels

Comments

@troibe
Copy link
Contributor

troibe commented Aug 11, 2021

I'm adding the PYNQ-Z2 to LiteX.
The process was pretty straight forward as I could base it on the Zybo Z7.
Unfortunately any CPU I use gets reset every 2-3 seconds.
By that I mean the behavior is just like when pressing the reset button (i.e. ledchaser and UART will get reset).
I tried setting pll.reset.eq(0) but it does not seem to be affecting the RTL.

@enjoy-digital
Copy link
Owner

Hi @developandplay,

I assume you are creating a SoC with a Soft Core CPU and not the PS. If so, this is very similar to a regular FPGA and the SoC just need a stable clock to operate correctly. You could first disconnect the reset. If still not working, I would recommend checking the clock and be sure that it's stable during the reset.

While answering, I'm just looking at Pynq Z2 schematic and it seems the clock from the PL is coming from the Ethernet PHY. If so, the issue could be similar to an issue we had on the Pano Logic G2: the LiteX SoC while initializing the Ethernet PHY was reseting it and then stopping the main clock source. To workaround this, you can comment out rst_n pad of the Ethernet PHY and drive it manually as we are doing on the Pano Logic G2: https://github.com/litex-hub/litex-boards/blob/master/litex_boards/targets/pano_logic_g2.py#L36

@troibe
Copy link
Contributor Author

troibe commented Aug 13, 2021

@enjoy-digital Thanks for the second hint.
Just read the PYNQ Z2 manual p.9 again and it seem like the resetting Ethernet PHY is indeed the problem.

Apparently if the ethernet is connected then the board won't reset the PHY.
https://forums.xilinx.com/t5/Other-FPGA-Architecture/MMCM-Losing-Lock-on-a-PYNQ-Z2-Zynq-7020/td-p/923525

@troibe troibe closed this as completed Aug 13, 2021
@enjoy-digital
Copy link
Owner

@developandplay: Great!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants