Skip to main content
Topic: urJTAG for Bus Blaster v2 JTAG B (Read 39898 times) previous topic - next topic

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #15
Here's the jtagkey implementation.

RE the TGT LED: Yup, I'm going to eliminate it from the first batch of boards, we can decide what to do in the next revision. Basically, if the CPLD is leaking like that from an input when not powered, then I don't see how it should every be connected without a target making the LED useless. The TI design had a different LED based on target ground, but that requires all the JTAG pins be connected and I usually just use a couple jumpers.
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #16
That would be very helpful, the compile for Win-32 only included support for the FTDI drivers.
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #17
I have not found the same functionality in the ftd2xx driver. I think i might have overlooked something.

I still think we should stick with libftdi as it is open-source :) Can we have the urjtag for win32 compiled with libftdi support ?

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #18
I agree. I switched my hardware over to the libusb driver, but got an error message when i tried:

Quote
jtag> cable jtagkey interface=2 driver=ftdi-mpsse
Couldn't connect to suitable USB device.
Error: parse.c:208 urj_parse_file() no error: Cannot open file 'C:Documents and
 Settingsian/.jtag/rc' to parse
jtag> cable jtagkey interface=2 driver=ftd2xx-mpsse
Connected to libftd2xx driver.

Tornado thought his compile included the FTd2xx drivers only, he'd need to elaborate on the driver situation.

Does urJTAG just use the bitbang mode of the FT2232H? I assumed it used the jtag features, but I don;t know if the FTJTAG driver is required or included with the FTD2xx package. It has this in the datasheet for the FTCJTAG.dll:
Quote
The FT2232H MPSSE controller is available through channels A and B of the FT2232H device; both channels A and B can be used for JTAG communication
http://www.ftdichip.com/Support/Documen ... AG_DLL.pdf

I'm reading the datasheets now, but it's not clear to me how the interface number is set.
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #19
From what I understand, libftdi drivers are supported by compiling under cybwin, but not mingw... however, a ftd2xx patch or change should be pretty simple, at least to test with for Ian... I will take a look, and see if I can come up with something for him, in my code, it looks something like this:

           if(devInfo.ID == USBID && strstr(devInfo.Description," A")>0)

               {

                  ftStatus = _FT_Open(0, &ftHandle);

                  ii=0;

                  break;

               }            

only needs to be:

           if(devInfo.ID == USBID && strstr(devInfo.Description," B")>0)

               {

                  ftStatus = _FT_Open(1, &ftHandle);

                  ii=0;

                  break;

               }            


but this is my src code, I will look at urjtag's

Ian, just found this in urjtag's src

#endif

    /* try various methods to open a FTDI device */
    if (p->serial)
    {
        /* serial number/description is specified */

        /* first try to match against the serial string */
        status = FT_OpenEx (p->serial, FT_OPEN_BY_SERIAL_NUMBER, &p->fc);

        if (status != FT_OK)
            /* then try to match against the description string */
            status = FT_OpenEx (p->serial, FT_OPEN_BY_DESCRIPTION, &p->fc);
    }
    else
        /* give it a plain try */
        status = FT_Open (0, &p->fc);


Changed   status = FT_Open (0, &p->fc); to  status = FT_Open (1, &p->fc);


sending via e-mail now

Regards

 

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #20
I have patched the "usb-driver" - alt. Xilinx impact driver, to include support for the interface 2. I can now see the cpld from Xilinx Impact. :-) yay!

http://rmdir.de/~michael/xilinx/


Edit: of course ... attach :) (email has been sent to the maintainer)

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #21
Very cool robots !!!!

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #22
Nice! I added a section of the wiki with links to the patches so far:
http://dangerousprototypes.com/docs/Cla ... e_the_CPLD
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #23
Attached patch should (SHOULD (-: ) work for the ftd2xxx library. I don't have that library, and have not tried to compile the source. But it looks clean enough :-), most of it is copy/paste from old patch.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #24
We just did a test that forced it to the B interface and it works. Will work on this now, thank you.
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #25
We got this going, but there are a few issues.

interface seems to be reserved, so we changed it to iface.

the parameter passing isn't working correctly. It always goes to interface 0 unless we force it to p->iface=1 in the source.

This compile (attached) forces to iface one and does a detect ok, but it has file loading issues so it doesn't program.
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #26
Funny that is is reserved ... It compiles fine here. Attached are minor changes to get it working(small corrections like include), and to be compatible with libftdi numbering.

The parameter passing works OK here. I wonder where the problem is :-/

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #27
You said you want a production test. I was thinking about using the led as indicator and have some large AND inside the cpld to light it up one the test passed. But then i noticed the led is on input pin:-/

There is another way to have the board checked. The CPLD has border scan. I have never used it, (except few minutes ago) and it is a brilliant way to test board:-). I mean the jtag interface is already on-board and has to be tested anyways. You just use the jtag and execute small script in the urjtag that fiddles with the pins and checks result.

The file (/opt/Xilinx/12.3/ISE_DS/ISE/xbr/data/xc2c32_1532.bsd) is what you want to check out. It contains name for instructions (INTEST, and EXTEST are interesting) one for reading pin state (INTEST) and one for setting (EXTEST).
If you want to execute them use the following:
Code: [Select]
jtag> instruction INTEST
jtag> shift ir
This shifts in the INTEST instruction, and now to obtain data:
Code: [Select]
jtag> shift dr
jtag> dr
1101101101101001001101101001001001001001001001001001001111001001001000001111111111001001111001001 (0x000000009249279241FF93C9)
jtag> get signal IN_16
dr will just print the whole data register, get signal will get the specific pin state. The pin names are in the bsdl file.
To toggle the pin use EXTEST instruction and "set signal xxx"

Be sure to have the "target" voltage present for the cpld :-)

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #28
That's a good idea, and urjtag can be called from other apps too.

My idea was a small app for the FT2232 that alternated the pins (aa/55). Using a pass-through CPLD implementation would allow testing of the JTAG header. Nut the JTAG scan seems a lot easier.
Got a question? Please ask in the forum for the fastest answers.

Re: urJTAG for Bus Blaster v2 JTAG B

Reply #29
Is it possible to get a full path/diff of your working source? It looks like you're working from the last release (.10 #), we've been compiling from a development branch.
Got a question? Please ask in the forum for the fastest answers.