UPGRADE YOUR BROWSER

We have detected your current browser version is not the latest one. Xilinx.com uses the latest web technologies to bring you the best online experience possible. Please upgrade to a Xilinx.com supported browser:Chrome, Firefox, Internet Explorer 11, Safari. Thank you!

cancel
Showing results for 
Search instead for 
Did you mean: 
Observer dbircsak
Observer
3,417 Views
Registered: ‎06-13-2016

How to hard reset a board programmatically?

Jump to solution

Is there a way to reset a ZC706 board programmatically? Can I send a press command to a pushbutton like the Reset pushbutton?

 

I see there's commands like XDdr_ResetHw()... anything that will reset the entire board and get it to load from flash again?

 

Thanks!

1 Solution

Accepted Solutions
Observer dbircsak
Observer
4,814 Views
Registered: ‎06-13-2016

Re: How to hard reset a board programmatically?

Jump to solution

This worked for me:

xil_printf("Resetting\r\n");
// Taken from ug585-Zynq-7000-TRM.pdf
Xil_Out32(0xf8000008, 0xdf0d); // Must call SLCR_LOCK first
Xil_Out32(0xf8000200, 0x1);
5 Replies
Scholar hbucher
Scholar
3,388 Views
Registered: ‎03-22-2016

Re: How to hard reset a board programmatically?

Jump to solution

@dbircsak

Not 100% sure it is equivalent but you can start xsdb (<VIVADO>/<VERSION>/bin/xsdb) and issue something like

 

xsdb / connect / targets <id> / rst -srst

 

 

 

vitorian.com --- We do this for fun. Always give kudos. Accept as solution if your question was answered.
I will not answer to personal messages - use the forums instead.
boardreset.PNG
0 Kudos
Xilinx Employee
Xilinx Employee
3,375 Views
Registered: ‎10-24-2013

Re: How to hard reset a board programmatically?

Jump to solution

Hi @dbircsak

 

You can pulse PROGRAM_B.

When PROGRAM_B is pulsed Low, the FPGA configuration is cleared and a new configuration sequence is initiated.

Thanks,Vijay
--------------------------------------------------------------------------------------------
Please mark the post as an answer "Accept as solution" in case it helped resolve your query.
Give kudos in case a post in case it guided to the solution.
0 Kudos
Xilinx Employee
Xilinx Employee
3,364 Views
Registered: ‎08-01-2012

Re: How to hard reset a board programmatically?

Jump to solution

There is no separate push-button kind of switch to reset the ZC706 board. You need to use ON/OFF power switch to do that. 

________________________________________________

Please mark this post as an "Accept as solution" in case if it helped to resolve your query. So that it will help to other forum users to directly refer to the answer.

Give kudos to this post in case if you think the information is useful and reply oriented.

0 Kudos
Observer dbircsak
Observer
3,343 Views
Registered: ‎06-13-2016

Re: How to hard reset a board programmatically?

Jump to solution

This is what I'm trying but nothing happens:

#include "xgpiops.h"

int main() {
	int i;
	XGpioPs Gpio;
	XGpioPs_Config *ConfigPtr;
	int Status;
	ConfigPtr = XGpioPs_LookupConfig(XPAR_XGPIOPS_0_DEVICE_ID);
	if (ConfigPtr == NULL) {
		return XST_FAILURE;
	}
	XGpioPs_CfgInitialize(&Gpio, ConfigPtr, ConfigPtr->BaseAddr);
	Status = XGpioPs_SelfTest(&Gpio);
	if (Status != XST_SUCCESS) {
		return XST_FAILURE;
	}
	xil_printf("\r\n");
	for (i = 0; i < Gpio.MaxPinNum; i++) {
//		XGpioPs_SetDirectionPin(&Gpio, i, 0x1); // What does this do?
		XGpioPs_WritePin(&Gpio, i, 0x1);
		xil_printf("%d Dir %u Read %u\r\n", i,
				XGpioPs_GetDirectionPin(&Gpio, i), XGpioPs_ReadPin(&Gpio, i));
	}
	return 0;
}
0 Kudos
Observer dbircsak
Observer
4,815 Views
Registered: ‎06-13-2016

Re: How to hard reset a board programmatically?

Jump to solution

This worked for me:

xil_printf("Resetting\r\n");
// Taken from ug585-Zynq-7000-TRM.pdf
Xil_Out32(0xf8000008, 0xdf0d); // Must call SLCR_LOCK first
Xil_Out32(0xf8000200, 0x1);