-
Notifications
You must be signed in to change notification settings - Fork 38
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
New parameter to enable the RTCK clock input. (PROBE_FTDI_JTAG_ENABLE…
…_RTCK).
- Loading branch information
Showing
3 changed files
with
54 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -23,11 +23,14 @@ | |
* @author Jean-François DEL NERO <[email protected]> | ||
*/ | ||
|
||
#include <stdint.h> | ||
#include <stdio.h> | ||
#include <string.h> | ||
|
||
#if !defined(WIN32) | ||
#include <sys/time.h> | ||
#endif | ||
|
||
#include "../drv_loader.h" | ||
#include "../../jtag_core_internal.h" | ||
#include "../../jtag_core.h" | ||
|
@@ -36,6 +39,8 @@ | |
|
||
#include "../../dbg_logs.h" | ||
|
||
#include "../../os_interface/os_interface.h" | ||
|
||
#ifdef __cplusplus | ||
extern "C" { | ||
#endif | ||
|
@@ -191,6 +196,24 @@ static int ft2232_set_data_bits_high_byte(unsigned char value, unsigned char dir | |
return 0; | ||
} | ||
|
||
static int ft2232h_enable_rtck(int enable) | ||
{ | ||
FT_STATUS status; | ||
DWORD dw_bytes_written = 0; | ||
unsigned char buf; | ||
unsigned long bytes_written; | ||
|
||
buf = enable ? 0x96 : 0x97; | ||
|
||
status = pFT_Write(ftdih, &buf, sizeof(buf), &dw_bytes_written); | ||
if (status != FT_OK) { | ||
bytes_written = dw_bytes_written; | ||
return -1; | ||
} | ||
|
||
return 0; | ||
} | ||
|
||
int drv_FTDI_Detect(jtag_core * jc) | ||
{ | ||
int numDevs,i; | ||
|
@@ -584,6 +607,11 @@ int drv_FTDI_Init(jtag_core * jc, int sub_drv, char * params) | |
goto loadliberror; | ||
} | ||
|
||
if(jtagcore_getEnvVarValue( jc, "PROBE_FTDI_JTAG_ENABLE_RTCK") > 0) | ||
{ | ||
ft2232h_enable_rtck(1); | ||
} | ||
|
||
/* Delay... */ | ||
genos_pause(jtagcore_getEnvVarValue( jc, "PROBE_FTDI_JTAG_TRST_DELAY_MS")); | ||
|
||
|