Jump to content
  • 0

Reset ARTY via UART instead of pressing PROG button


emfries

Question

Hello,

I am using ARTY as part of a control system by making a serial connection between ARTY and a computer using the UART functionality. I supply ARTY with 5VDC external power, and have set the power selection jumper as appropriate.

Sometimes parts of the control system get into a bad state and I want to reset ARTY. One way to do this is to physically press the PROG button. ARTY then loads it's program from flash and is reset. I then initiate a new serial connection between ARTY and a computer using UART and I'm good to go. The problem with this is that it requires a physical presence at the control system. My goal is to be able to reset ARTY without a human onsite after remoting into the computer. Is there a way to "press the PROG button" in software via a UART command, even if ARTY is not expecting to receive a command via UART?

Alternatively, I can reset ARTY by power cycling the 5VDC supply, and then unplugging and plugging back in (cycling) the microUSB cable. Power cycling the 5VDC can be controlled remotely if I set up a computer-controlled relay. (Maybe I can do the same for the USB connection, but I'm unsure. For now, assume that I can't.) I have tried power cycling the 5VDC but not cycling the microUSB cable, and while ARTY does reset, I cannot successfully establish a new serial connection between ARTY and the computer after this. If I then do cycle the microUSB cable I can establish a new serial connection. My best guess is that the computer is still bound to the serial connection so it cannot "rebind", but I'm really not sure what is happening. Is this a Linux problem or an ARTY problem, or both?

Thanks in advance.

Link to comment
Share on other sites

6 answers to this question

Recommended Posts

Hi @emfries,

Are you using the Arty board with SDK/Vitis, or just Vivado? I know I have found that the Prog button needs to be pressed for the former, though not necessarily when just using Vivado though I am uncertain on the differences. I am looking into the details on this as well as your other question on resetting the serial connection.

Thanks,
JColvin

Link to comment
Share on other sites

Hi @JColvin,

Thanks for the reply.

I've never heard of Vitis so I don't think I'm using that. This project was "completed" a couple years ago but now needs minor updates, so if Vitis is a new feature then I certainly haven't used it. I did use the SDK to write the code that was loaded into ARTY's flash memory.

Thanks for looking into the serial connection issue.

Link to comment
Share on other sites

Hi @JColvin,

I dug into this a bit more and may have found a solution. The PROG button is inside of a square that is connected to the ARTY board by 4 leads. The four leads are in the four corners of the square. When the button is not pressed the leads in the upper-left and upper-right corners are shorted together, the leads in the lower-left and lower-right corners are shorted together, but there is about 5.5 kOhm of resistance between the two sets (upper vs lower) of leads. When the PROG button is pushed all four leads are shorted together.

One idea that I had is to solder onto the board a connection between the upper and lower sets, but in between the upper and lower sets include a computer-controlled relay. The relay can be opened or closed to either either connect or disconnect the two sets. When I want to "press the PROG button" I can send the signal to connect the upper and lower sets. Is there any obvious reason that this wouldn't work?

Thanks,

Link to comment
Share on other sites

@emfries,

What you want to do is to command the internal ICAPE2 port, and issue an IPROG command.  Each Series-7 chip, ,to include the Artix-7, has an ICAPE2 hardware block within it.  This block allows you access to the internal configuration controller of the FPGA.

See this project for an example ICAPE2 controller driven from a Wishbone bus.  The documentation should describe how to write an IPROG command to the device.

Dan

Link to comment
Share on other sites

2 hours ago, D@n said:

What you want to do is to command the internal ICAPE2 port

@D@nhas a good idea. A better idea would be to see if you can improve your design so that it doesn't "get into a bad state". Have you learned about writing testbench code and simulation? If you used the board design flow then this might require moving to the next level of HDL competence, but so will the ICAPE2 idea.

Your design should be able to recover from getting "stuck" without resorting to FPGA device reconfiguration. Adding a synchronous "soft reset" to your design elements is not all that difficult if you follow good design practices.

Link to comment
Share on other sites

Hi @emfries,

A computer controlled relay would work for relaunching the SDK application (and may be fairly easily to implement if you are already going to remotely have an option to power cycle the entire board). My understanding is that it's the on-board processor, whether ARM or Microblaze, when running an application through the basic setup via SDK/Vitis needs the PROG button to be pushed to relaunch the application.

Both @D@n and @zygot are correct in using a software reset and otherwise ensuring the design get into an undefined/locked state, though I do understand that it can be difficult to debug, but that's engineering.

Thanks,
JColvin

Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...