diff --git a/jtag/ChangeLog b/jtag/ChangeLog index a7dd036a..1638d2c9 100644 --- a/jtag/ChangeLog +++ b/jtag/ChangeLog @@ -1,3 +1,7 @@ +2009-04-05 Arnim Laeuger + + * src/tap/cable/ft2232.c: check target status for UsbScarab2 (Tomek Cedro) + 2009-04-04 Arnim Laeuger * src/tap/cable/ft2232.c, src/tap/cable.c, src/tap/cable/generic_usbconn.c, diff --git a/jtag/src/tap/cable/ft2232.c b/jtag/src/tap/cable/ft2232.c index 98407c2e..91a3e774 100644 --- a/jtag/src/tap/cable/ft2232.c +++ b/jtag/src/tap/cable/ft2232.c @@ -671,6 +671,16 @@ ft2232_usbscarab2_init( cable_t *cable ) if (usbconn_open( cable->link.usb )) return -1; + /* Check if cable is connected to the target and the target is powered on */ + cx_cmd_queue(cmd_root,1); + cx_cmd_push(cmd_root, GET_BITS_LOW); + cx_xfer( &(params->cmd_root), &imm_cmd, cable, COMPLETELY); + if ( (cx_xfer_recv( cable ) & BITMASK_USBSCARAB2_nCONNECTED) != 0) + { + printf( _("Error: Please power on the TARGET board and connect VCC signal!\n") ); + return -1; + } + /* These bits will be set by default to: */ params->low_byte_value = 0; params->low_byte_dir = 0; @@ -698,6 +708,7 @@ ft2232_usbscarab2_init( cable_t *cable ) params->last_tdo_valid = 0; params->signals = CS_TRST | CS_RESET; + printf("Cable initialization OK!\n"); return 0; }