• 0
Christian Klein

Digilent CMOD A7 Disconnects and/or does not Program

Question

I've seen similar issues in the forum, but no real solution.

I have 5 CMOD A7 boards and only 2 of  them behave properly.

The other 3 do not accept a program and sometimes disconnect.

I get the following errors;
ERROR: [Labtools 27-3165] End of startup status: LOW
ERROR: [Common 17-39] 'program_hw_devices' failed due to earlier errors.

I have tried:

- many different USB cables

- Different ports on the PC

- Powered USB hubs

- Vivado Lab 2017.2 and 2018.1

- 2 different bitstream files

 

The boards that work, always works. No matter the cable or USB ports.

Anything else I should try?

 

 

 

 

Share this post


Link to post
Share on other sites

Recommended Posts

  • 0

Hi,

if you want a 2nd opinion, you can try my labToy executable. It runs completely independent JTAG code.

Most likely, it'll fail the same. But if it happens to work reliably, the next question would be "why".

I suspect it's USB power related - you might give it a shot to supply the boards externally.

Share this post


Link to post
Share on other sites
  • 0

Remembered one thing: You were using only a single PC, is that so? Try another one.

It may be that there are broken drivers somewhere in the Windows directory. Maybe the USB hardware is unreliable. A powered hub won't automatically fix it.

If a full install is too much work, use the LabToy.exe file and put the FTDI drivers into the same folder (or install them system-wide via FTDI's installer). Speaking of which, updating them to the latest version (8/2017!) might be worth a shot in any case.

 

 

Edited by xc6lx45

Share this post


Link to post
Share on other sites
  • 0

I've been experiencing this same issue with my Cmod A7-35T board, and I would love a solution to it. I've seen flaky behavior across multiple USB cables and 3 different computers (a windows and linux laptop, and a linux workstation). Typically I will plug in the device and it will disconnect after 15-20 seconds. On windows, the USB device rarely shows up again, whereas on the Linux workstation it seems to re-connect most of the time. If I'm quick, I was occasionally able to program the FPGA with a new bitfile before it disconnects on linux. I tried programming the flash, but it always dies a couple seconds into the 'erase' step.

My suspicion is some kind of hardware fault, but I'm not sure how to diagnose it further. Any suggestions would be welcome!

Share this post


Link to post
Share on other sites
  • 0

Yes this is an issue with the CMOD-A7. It is not an issue with cables ( even if Digilent would wish it to be so). It is an issue with the interface on the CMOD-A7 and a particular issue when Vivado hardware manager is opened ( for instance in trying to use the ILA feature ).

Some problems, even those that shouldn't be hard, take Digilent years to resolve. I've stopped trying to use Vivado ILA or the USB UART with the CMOD-A7 . I do use something other than Vivado to configure the CMOD-A7. I do connect a separate USB UART cable to 2 spare IO pins to have nice uninterrupted productive UART sessions with my FPGA application. 

This issue has been known for a few years now. It took me almost 3 years to get the Genesys2 documentation free from silly errors but I kept after them until someone actually looked into the problem. I suspect that this problem cannot be resolved retroactively for current customers.... but no one is paying me to figure out the exact nature of the problem.

Edited by zygot

Share this post


Link to post
Share on other sites
  • 0

Yes, I do see the same behavior with and without the USB hub. I only tried adept 2 on the windows 10 laptop, and I see similar behavior (sometimes the board appears briefly, but then it goes away)

Share this post


Link to post
Share on other sites
  • 0

Hi @fentonc,

Here is the forum thread that discussed the USB cable issue that is with the Cmod A7.  Are the usb cable connections loose on the cmod a7 devices that are not working. Also please attach a screen shot of the text in adept when it connects and then disappears.

thank you,

Jon

Share this post


Link to post
Share on other sites
  • 0
On 7/21/2018 at 3:36 PM, fentonc said:

Ugh, this feels like a flakey hardware issue. What do you use besides vivado to configure it?

When working in Windows 7 I use the Digilent Adept Utility which is a very nice and robust program. This is mostly what I do when using the CMOD-A7.

When working in Linux I do use Vivado but make sure to terminate the Hardware Manager as soon as it has finished configuration.

I never have an issue with the CMOD-A7 USB connection detaching now that I've moved all USB UART operations to an external device and Vivado Hardware Manger is not running. I have tried without success to replicate any sort of association with this issue and a particular cable ( I've got a lot of USB cables on hand.... ). This is the only FPGA product that I have experienced this issue with. I almost always us a USB HUB ( USB 2 or USB 3 ) when working with FPGA boards.

Edited by zygot

Share this post


Link to post
Share on other sites
  • 0

Update - Success! I found a 3rd USB cable (aside from the other two I had tested with), and it magically started working with Vivado (and Adept, for that matter, although I don't think I can use Adept to program the boot flash). This cable came from a pair of 'Beats' bluetooth headphones (of the other two failures, 1 came with an Arduboy and the other was a random amazon purchase). I was able to both program the FPGA and re-write the flash without incident.

I think my conclusion is just that most micro USB cables are garbage, and the CMOD-A7 is super sensitive to USB noise.

Share this post


Link to post
Share on other sites
  • 0

Hi @fentonc,

Out of curiosity, what were the brands of the two non-working USB cables and the one working USB cable -- curious to see if there is any consistency to what we have seen or not.

Thanks,
JColvin

Share this post


Link to post
Share on other sites
  • 0

For the record, I only have a single CMOD-A7 board. The working cable came with a pair of "Beats" bluetooth headphones, and is otherwise unlabeled. One of the non-working cables is a short, flexible cable (silicone, maybe?) that came with an "Arduboy" Arduino-based gameboy device (and was successfully used to program that), and the other non-working cable was a random micro-USB cable from amazon (unlabeled, and no longer remember the exact purchase model).

Share this post


Link to post
Share on other sites
  • 0
Posted (edited)

I've stumbled upon what seems to be a complete solution to this problem.

First, I switched cables, which did help but I still couldn't run the ILA through the new cable.

In order to get ILA working, I lowered the connection speed. To do this:

1. In the lower left corner of Vivado, right click on "Open Hardware Manager" and press the menu that pops up to close it. This is poorly labeled but what it actually does is disconnects the Cmod.

2. Regular click on "Open Target" and select "Open Hardware Target..." A window will pop up in the middle of the screen.

3. Click "next". Make sure that Local Server is selected in the popup before clicking "next" again.

4. In the next window, you'll have the option to select the connection speed. Select a slower speed and click to connect.

In my case, I'm routing my USB circuitry through a PCB because I need to be able to select between bus power and PCB power. That made my connection unstable so to get things up and running I just directly connected (at the default 15000000 Hz) with a new cable. But I couldn't run ILA successfully. So I had to connect at slower speeds to use ILA (6000000) but when I did that it made the JTAG connection more stable as well, even through the PCB. I went to an extreme and the system was stable at 125000 Hz but at this speed it begins to hurt my personal productivity. I'm going to do a binary search to see what I can get away with.

Can anyone else confirm that this works for them? Would anyone else care to post their successful connection speeds?

If this is a complete solution, then it would seem to obviate the need for a redesign of the Cmod USB/JTAG circuitry.

Edited by dfergenson

Share this post


Link to post
Share on other sites
  • 0

We have found that a 100nF capacitor attached across VBUS and ground near the connector makes the Cmod A7 more tolerant of out of spec cables and we will consider adding it to a future revision.

There aren’t any pads for the capacitor, which makes it a bit challenging to solder in a 10V, 100nF ceramic capacitor. We managed to stack it on top of half of D1 and half of C65, which are both on the bottom of the board.

image.png

When testing with USB.org certified cables, we haven't been able to reproduce any connectivity issues.

We also recommend plugging in the cable into a port directly on the motherboard or into a USB hub instead of a front panel USB port.

Share this post


Link to post
Share on other sites
  • 0

Vicentiu,

Thanks for doing this. I'm having a bit of trouble identifying the pads since some of the features are covered by components.

Can you possibly post a photograph so that I can attempt to perform this modification?

Thanks again for looking into this problem.

-David

P.S. I also found that using a USB 3.0 hub made my connection much more stable.

Share this post


Link to post
Share on other sites
  • 0

Thanks. Got it. I'm going to attempt to implement the fix and will report back when I've been able to reproduce it.

Do you know if this will be addressed in future revisions to the Cmod A7 product line?

-David

Share this post


Link to post
Share on other sites
  • 0
On 9/25/2019 at 4:01 AM, dfergenson said:

Do you know if this will be addressed in future revisions to the Cmod A7 product line?

We are working on resolving this on our side and we’ll provide an exchange for anyone encountering this problem. I don’t have an exact time frame but it will be in a matter of weeks.

Share this post


Link to post
Share on other sites
  • 0

We have boards now.

If you mentioned at some point on the forum that you're having USB issues, I passed on the email you have on the forum account to customer service so they can contact you for a replacement.

If you're reading this post and you haven't made any mention on the forum, send me a private message.

Share this post


Link to post
Share on other sites
  • 0

I had the same problem with USB disconnects.

My solution does not belong to the kind of USB cables or if USB Hubs are in use, but rather looking at the schematics of the board
and - as those pages in schematics are not public - also looking how the USB connector was made on the board..

 

At first, i noticed that the USB connectors shield onboard is not connected to ground.
Thats honestly said *unusual* or *bad style*, therefore i connected it to ground with a short wire.
Did not solve problem.

The second problem is the power supply on cmod a7. Who ever designed it, did it not properly. If the board is powered from USB,
it's powered from +5V (+0.25V, -0.6V). Actually that means, that every USB port at spec is

->  4.4V..5.25V @550mA max.

4.4 Volts is not that much, and after the diode D1(PMEG2020EJ) on page 7 of the schematics, there will be no more than 3.8..4.0 volts; depending on the current..
And this is the input voltage for the buck regulator LTC3569. This regulator has three outputs; which are also not equal. Output 1 has lower Rdson as
output 2 and output 3. And output 3 with highest Rdson serves the 3.3volts for USB (more losses on the rail with lowest voltage reserve..).

I use the cmod on a breakout board i designed for it. Every io (except pmod) is fed through a 74lvx4245 to outside world to protect the fpga.
Also it's powered - via jumper - from MP1584EN external DCDC. VU pin is kept on 5..5.25V@2A max in any case, if external DCDC is jumpered.

What i can confirm is, that powering the CMOD A7 from external voltage immediately solves any USB disconnect problem,
while powering from USB gives disconnects every few minutes. No matter which power supply i choose,
no current flows from FPGA outputs in my case (except the tiny input current of the 74lvx4245's).

Any USB cable works in my case - if i power the board externally.

Share this post


Link to post
Share on other sites
  • 0

@wfpga

The USB shield is AC coupled to ground through a 1nF capacitor with a 1M ohm bleed off resistor, which is the same way we’ve connected USB shield on 95% of our boards.

I just reviewed the datasheet for the LTC3589 regulator and I don’t see any issue with the existing power supply design. Sure the diode adds an additional voltage drop (approximately 350mV at 500mA) that would result in VU being below 4.5V when VBUS as seen by the device is 4.5V, but its still over 4V, which is well above the undervoltage lockout threshold (2.5V) and well above the area where the output would be unregulated because the LTC3589 is capable of 100% duty cycle and at 4.15V the duty cycle is ~80%. If the input voltage were to drop low enough that 100% duty cycle were required to output 3.3V then the minimum voltage for VU would be (0.265*0.6)+(0.170*0.6)+3.3 = 3.561V so I don’t see this being an issue. Using an external power supply may give you a better ground reference then the one provided by the USB cable and provide better noise immunity, especially in the case of a poorly constructed USB cable.

Share this post


Link to post
Share on other sites
  • 0
4 hours ago, malexander said:

Using an external power supply may give you a better ground reference then the one provided by the USB cable and provide better noise immunity, especially in the case of a poorly constructed USB cable.

Hopefully. when Digilent spins the next CMOD they will provide a better arrangement for using the configuration circuitry with an external power supply. Even as a standalone module configured from flash 1 Vcc pin and one GND pin is less than ideal, and likely problematic if the FPGA is driving or receiving a number of single-ended signals.  

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now