Browse Source

Bugfix: ztex: While 1.15y can finish highspeed FPGA config immediately, at least 1.15x needs some delay

200ms might be enough, but 500ms is safer
Luke Dashjr 13 years ago
parent
commit
e65de4ad57
1 changed files with 5 additions and 0 deletions
  1. 5 0
      libztex.c

+ 5 - 0
libztex.c

@@ -394,6 +394,11 @@ static int libztex_configureFpgaHS(struct libztex_device *ztex, const char* firm
 		}
 		while (!feof(fp));
 
+		// While 1.15y can finish immediately, at least 1.15x needs some delay
+		// (200ms might be enough, but 500ms is safer)
+		if (ztex->productId[1] != 15)
+			usleep(500);
+
 		libusb_control_transfer(ztex->hndl, 0x40, 0x35, 0, 0, NULL, 0, 1000);
 		// 0x35 - finishHSFPGAConfiguration
 		if (cnt >= 0)